public interface Unisens
Modifier and Type | Method and Description |
---|---|
void |
addCustomAttribute(java.lang.String key,
java.lang.String value)
Add a ned custom attributes to this unisens dataset.
|
Entry |
addEntry(Entry entry,
boolean deepCopy)
Add an existing Entry to this unisens dataset.
|
Group |
addGroup(Group group,
boolean deepCopy)
Add an existing Group and its Entries to this unisens dataset.
|
void |
closeAll()
Closes all open Entries contained in this unisens dataset
|
Context |
createContext(java.lang.String schemaUrl)
Creates a context information to this uniens dataset.
|
CustomEntry |
createCustomEntry(java.lang.String id)
Creates a new CumstomEntry in this unisens dataset.
|
EventEntry |
createEventEntry(java.lang.String id,
double sampleRate)
Creates a new EventEntry in this unisens dataset.
|
Group |
createGroup(java.lang.String id)
Creates a new Group in this unisens dataset.
|
SignalEntry |
createSignalEntry(java.lang.String id,
java.lang.String[] channelNames,
DataType dataType,
double sampleRate)
Creates a new SignalEntry in this unisens dataset.
|
ValuesEntry |
createValuesEntry(java.lang.String id,
java.lang.String[] channelNames,
DataType dataType,
double sampleRate)
Creates a new ValuesEntry in this unisens dataset.
|
void |
deleteContext()
Removes the context information from this unisens dataset.
|
void |
deleteEntry(Entry entry)
Delete an Entry from this unisens dataset
|
void |
deleteGroup(Group group)
Deletes a Group from this unisens dataset.
|
java.lang.String |
getComment()
Gets the comment of this Unisens object.
|
Context |
getContext()
Gets the Context of this unisens dataset.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getCustomAttributes()
Returns the custom attributes of this unisens dataset.
|
double |
getDuration()
Gets the duration of this dataset in seconds.
|
java.util.List<Entry> |
getEntries()
Returns a List of all Entries contained in this unisens dataset.
|
Entry |
getEntry(java.lang.String id)
Returns the Entry identified by its id.
|
Group |
getGroup(java.lang.String id)
Returns the Group identified by its id.
|
java.util.List<Group> |
getGroups()
Returns a List of alls Groups contained in this unisens dataset.
|
java.lang.String |
getMeasurementId()
Gets the id of this unisens dataset.
|
java.lang.String |
getPath()
Returns the path of the dataset represented by this Unisens object.
|
java.util.Date |
getTimestampStart()
Gets the timestamp of the start of the data acquisition
|
java.lang.String |
getVersion()
Returns the version of the XML-Schema used in the unisens.xml file
|
void |
save()
Saves this unisens dataset.
|
void |
setComment(java.lang.String comment)
Sets the comment of this Unisens object.
|
void |
setDuration(double duration)
Sets the duration of this dataset in seconds.
|
void |
setDuration(long duration)
Deprecated.
use double parameter instead of long
|
void |
setMeasurementId(java.lang.String id)
Gets the id of this unisens dataset.
|
void |
setTimestampStart(java.util.Date timestampStart)
Sets the timestamp of the start of the data acquisition
|
java.lang.String getPath()
java.lang.String getComment()
void setComment(java.lang.String comment)
comment
- decription of the whole datasetdouble getDuration()
void setDuration(double duration)
duration
- the duration of this dataset in seconds@Deprecated void setDuration(long duration)
duration
- the duration of this dataset in secondssetDuration(double duration)
java.lang.String getMeasurementId()
void setMeasurementId(java.lang.String id)
id
- the Id of this dataset.java.util.Date getTimestampStart()
void setTimestampStart(java.util.Date timestampStart)
timestampStart
- the timestamp of the start of the data acquisitionjava.lang.String getVersion()
Context getContext()
java.util.List<Entry> getEntries()
Entry getEntry(java.lang.String id)
id
- the id of the Entryjava.util.List<Group> getGroups()
Group getGroup(java.lang.String id)
id
- id of the Group.void deleteContext()
void deleteGroup(Group group)
group
- the Group to be deletedvoid deleteEntry(Entry entry)
entry
- the Entry to be deletedvoid save() throws java.io.IOException
java.io.IOException
Context createContext(java.lang.String schemaUrl)
schemaUrl
- the URL to the XML schema describing the structure of context.xmlGroup createGroup(java.lang.String id) throws DuplicateIdException
id
- the id of the GroupDuplicateIdException
SignalEntry createSignalEntry(java.lang.String id, java.lang.String[] channelNames, DataType dataType, double sampleRate) throws DuplicateIdException
id
- the id of the Entry. Has to be unique within one unisens datasetchannelNames
- an Array of names of the channels. At least on channel has to be present.dataType
- the DataType of the data contained in this SignalEntry.sampleRate
- the sampleRate of the data in samples per second.DuplicateIdException
EventEntry createEventEntry(java.lang.String id, double sampleRate) throws DuplicateIdException
id
- the id of the Entry. Has to be unique within one unisens dataset.sampleRate
- the sampleRate of the data in samples per second. Points if time are
given as sample countsDuplicateIdException
ValuesEntry createValuesEntry(java.lang.String id, java.lang.String[] channelNames, DataType dataType, double sampleRate) throws DuplicateIdException
id
- the id of the Entry. Has to be unique within one unisens dataset.channelNames
- an Array of names of the channels. At least on channel has to be present.dataType
- the DataType of the data contained in this SignalEntry.sampleRate
- the sampleRate of the data in samples per second. Points in time are
given as sample countsDuplicateIdException
CustomEntry createCustomEntry(java.lang.String id) throws DuplicateIdException
id
- the id of the Entry. Has to be unique within one unisens dataset.DuplicateIdException
void closeAll()
Entry addEntry(Entry entry, boolean deepCopy) throws DuplicateIdException
entry
- the entry that should be added.deepCopy
- flag that indicates to copy the datafileDuplicateIdException
Group addGroup(Group group, boolean deepCopy) throws DuplicateIdException
group
- the group that should be added.deepCopy
- flag that indicates to also copy the datafilesDuplicateIdException
java.util.HashMap<java.lang.String,java.lang.String> getCustomAttributes()
createContext(String schemaUrl)
should be preferred.void addCustomAttribute(java.lang.String key, java.lang.String value)
createContext(String schemaUrl)
should be preferred.key
- the key of the new attributevalue
- the value of the new attribute