|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface Unisens
Unisens is the basic interface to a unisens dataset. It represents its structure. Each Unisens object is linked to its unisens.xml file, which is contained in every unisens dataset.
| Method Summary | |
|---|---|
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 |
| Method Detail |
|---|
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 Entry
java.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 deleted
void save()
throws java.io.IOException
java.io.IOExceptionContext createContext(java.lang.String schemaUrl)
schemaUrl - the URL to the XML schema describing the structure of context.xml
Group createGroup(java.lang.String id)
throws DuplicateIdException
id - the id of the Group
DuplicateIdException
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 counts
DuplicateIdException
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 counts
DuplicateIdException
CustomEntry createCustomEntry(java.lang.String id)
throws DuplicateIdException
id - the id of the Entry. Has to be unique within one unisens dataset.
DuplicateIdExceptionvoid closeAll()
Entry addEntry(Entry entry,
boolean deepCopy)
throws DuplicateIdException
entry - the entry that should be added.deepCopy - flag that indicates to copy the datafile
DuplicateIdException
Group addGroup(Group group,
boolean deepCopy)
throws DuplicateIdException
group - the group that should be added.deepCopy - flag that indicates to also copy the datafiles
DuplicateIdExceptionjava.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
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||