CLASS ndi.dataset
ndi.dataset - Create a new ndi.dataset object
NDI_DATASET_OBJ=ndi.dataset(REFERENCE)
Creates a new ndi.dataset object. The dataset has a unique
reference REFERENCE. This class is an abstract class and typically
an end user will open a specific subclass such as ndi.dataset.dir.
ndi.dataset/GETPATH, ndi.dataset/GETREFERENCE
Superclasses
handle
Properties
none
Methods
Method | Description |
---|---|
add_ingested_session | ingets an ndi.session into an ndi.dataset |
add_linked_session | link an ndi.session to an ndi.dataset |
addlistener | ADDLISTENER Add listener for event. |
database_add | Add an ndi.document to an ndi.dataset object |
database_closebinarydoc | close an ndi.database.binarydoc |
database_existbinarydoc | checks if an ndi.database.binarydoc exists for an ndi.document |
database_openbinarydoc | open the ndi.database.binarydoc channel of an ndi.document |
database_rm | Remove an ndi.document with a given document ID from a dataset |
database_search | Search for an ndi.document in a database of an ndi.dataset object |
dataset | Create a new ndi.dataset object |
delete | DELETE Delete a handle object. |
document_session | DOCUMENT_SESSION return the ndi.session of an ndi.document object in an ndi.dataset |
eq | == (EQ) Test handle equality. |
findobj | FINDOBJ Find objects matching specified conditions. |
findprop | FINDPROP Find property of MATLAB handle object. |
ge | >= (GE) Greater than or equal relation for handles. |
getpath | Return the path of the dataset |
gt | > (GT) Greater than relation for handles. |
id | return the identifier of an ndi.dataset object |
isvalid | ISVALID Test handle validity. |
le | <= (LE) Less than or equal relation for handles. |
listener | LISTENER Add listener for event without binding the listener to the source object. |
lt | < (LT) Less than relation for handles. |
ne | ~= (NE) Not equal relation for handles. |
notify | NOTIFY Notify listeners of event. |
open_session | open an ndi.session object from an ndi.dataset |
reference | return the reference string for an ndi.dataset object |
session_list | return the session reference/identifier list for a dataset |
Methods help
add_ingested_session - ingets an ndi.session into an ndi.dataset
NDI_DATASET_OBJ = ADD_INGESTED_SESSION(NDI_DATASET_OBJ, NDI_SESSION_OBJ)
Add an ndi.session object to an ndi.dataset, by copying the session
documents into the dataset.
add_linked_session - link an ndi.session to an ndi.dataset
NDI_DATASET_OBJ = ADD_LINKED_SESSION(NDI_DATASET_OBJ, NDI_SESSION_OBJ)
Add an ndi.session object to an ndi.dataset, without ingesting the session
into the dataset. Instead, the ndi.session is linked to the dataset, but
the session remains where it is.
addlistener - ADDLISTENER Add listener for event.
el = ADDLISTENER(hSource, Eventname, callbackFcn) creates a listener
for the event named Eventname. The source of the event is the handle
object hSource. If hSource is an array of source handles, the listener
responds to the named event on any handle in the array. callbackFcn
is a function handle that is invoked when the event is triggered.
el = ADDLISTENER(hSource, PropName, Eventname, Callback) adds a
listener for a property event. Eventname must be one of
'PreGet', 'PostGet', 'PreSet', or 'PostSet'. Eventname can be
a string scalar or character vector. PropName must be a single
property name specified as string scalar or character vector, or a
collection of property names specified as a cell array of character
vectors or a string array, or as an array of one or more
meta.property objects. The properties must belong to the class of
hSource. If hSource is scalar, PropName can include dynamic
properties.
For all forms, addlistener returns an event.listener. To remove a
listener, delete the object returned by addlistener. For example,
delete(el) calls the handle class delete method to remove the listener
and delete it from the workspace.
ADDLISTENER binds the listener's lifecycle to the object that is the
source of the event. Unless you explicitly delete the listener, it is
destroyed only when the source object is destroyed. To control the
lifecycle of the listener independently from the event source object,
use listener or the event.listener constructor to create the listener.
See also LISTENER, EVENT.LISTENER, NDI.DATASET, NOTIFY, DELETE, META.PROPERTY, EVENTS
Help for ndi.dataset/addlistener is inherited from superclass handle
database_add - Add an ndi.document to an ndi.dataset object
NDI_DATASET_OBJ = DATABASE_ADD(NDI_DATASET_OBJ, NDI_DOCUMENT_OBJ)
Adds the ndi.document NDI_DOCUMENT_OBJ to the ndi.dataset NDI_DATASET_OBJ.
NDI_DOCUMENT_OBJ can also be a cell array of ndi.document objects, which will
all be added in turn.
The database can be queried by calling NDI_DATASET_OBJ/SEARCH
See also: ndi.dataset/database_search(), ndi.dataset/database_rm()
database_closebinarydoc - close an ndi.database.binarydoc
[NDI_BINARYDOC_OBJ] = DATABASE_CLOSEBINARYDOC(NDI_DATASET_OBJ, NDI_BINARYDOC_OBJ)
Close and lock an NDI_BINARYDOC_OBJ. The NDI_BINARYDOC_OBJ must be unlocked in the
database, which is why it is necessary to call this function through the dataset object.
database_existbinarydoc - checks if an ndi.database.binarydoc exists for an ndi.document
[TF, FILE_PATH] = DATABASE_EXISTBINARYDOC(NDI_DATASET_OBJ, NDI_DOCUMENT_OR_ID, FILENAME)
Return a boolean flag (TF) indicating if a binary document
exists for an ndi.document and, if it exists, the full file
path (FILE_PATH) to the file where the binary data is stored.
database_openbinarydoc - open the ndi.database.binarydoc channel of an ndi.document
NDI_BINARYDOC_OBJ = DATABASE_OPENBINARYDOC(NDI_DATASET_OBJ, NDI_DOCUMENT_OR_ID, FILENAME)
Return the open ndi.database.binarydoc object that corresponds to an ndi.document and
NDI_DOCUMENT_OR_ID can be either the document id of an ndi.document or an ndi.document object itsef.
The document is opened for reading only. Document binary streams may not be edited once the
document is added to the database.
Note that this NDI_BINARYDOC_OBJ must be closed with ndi.dataset/CLOSEBINARYDOC.
database_rm - Remove an ndi.document with a given document ID from a dataset
NDI_DATASET_OBJ = DATABASE_RM(NDI_DATASET_OBJ, DOC_UNIQUE_ID)
or
NDI_DATASET_OBJ = DATABASE_RM(NDI_DATASET_OBJ, DOC)
Removes an ndi.document with document id DOC_UNIQUE_ID from the
NDI_DATASET_OBJ database. In the second form, if an ndi.document or cell array
of NDI_DOCUMENTS is passed for DOC, then the document unique ids are retrieved
and they are removed in turn. If DOC/DOC_UNIQUE_ID is empty, no action is
taken.
This function also takes parameters as name/value pairs that modify its behavior:
Parameter (default) | Description
--------------------------------------------------------------------------------
ErrIfNotFound (0) | Produce an error if an ID to be deleted is not found.
See also: ndi.dataset/database_add(), ndi.dataset/database_search()
database_search - Search for an ndi.document in a database of an ndi.dataset object
NDI_DOCUMENT_OBJ = DATABASE_SEARCH(NDI_DATASET_OBJ, SEARCHPARAMETERS)T
Given search parameters, which is an ndi.query object, the database associated
with the ndi.dataset object NDI_DATASET_OBJ is searched.
Matches are returned in a cell list NDI_DOCUMENT_OBJ.
See also: ndi.dataset/database_add(), ndi.dataset/database_rm()
dataset - Create a new ndi.dataset object
NDI_DATASET_OBJ=ndi.dataset(REFERENCE)
Creates a new ndi.dataset object. The dataset has a unique
reference REFERENCE. This class is an abstract class and typically
an end user will open a specific subclass such as ndi.dataset.dir.
ndi.dataset/GETPATH, ndi.dataset/GETREFERENCE
Documentation for ndi.dataset/dataset
doc ndi.dataset
delete - DELETE Delete a handle object.
DELETE(H) deletes all handle objects in array H. After the delete
function call, H is an array of invalid objects.
See also NDI.DATASET, NDI.DATASET/ISVALID, CLEAR
Help for ndi.dataset/delete is inherited from superclass handle
document_session - DOCUMENT_SESSION return the ndi.session of an ndi.document object in an ndi.dataset
NDI_SESSION_OBJ = DOCUMENT_SESSION(NDI_DATASET_OBJ, NDI_DOCUMENT_OBJ)
Given an ndi.document, return an open ndi.session object that contains the
the document.
eq - == (EQ) Test handle equality.
Handles are equal if they are handles for the same object.
H1 == H2 performs element-wise comparisons between handle arrays H1 and
H2. H1 and H2 must be of the same dimensions unless one is a scalar.
The result is a logical array of the same dimensions, where each
element is an element-wise equality result.
If one of H1 or H2 is scalar, scalar expansion is performed and the
result will match the dimensions of the array that is not scalar.
TF = EQ(H1, H2) stores the result in a logical array of the same
dimensions.
See also NDI.DATASET, NDI.DATASET/GE, NDI.DATASET/GT, NDI.DATASET/LE, NDI.DATASET/LT, NDI.DATASET/NE
Help for ndi.dataset/eq is inherited from superclass handle
findobj - FINDOBJ Find objects matching specified conditions.
The FINDOBJ method of the HANDLE class follows the same syntax as the
MATLAB FINDOBJ command, except that the first argument must be an array
of handles to objects.
HM = FINDOBJ(H, <conditions>) searches the handle object array H and
returns an array of handle objects matching the specified conditions.
Only the public members of the objects of H are considered when
evaluating the conditions.
See also FINDOBJ, NDI.DATASET
Help for ndi.dataset/findobj is inherited from superclass handle
findprop - FINDPROP Find property of MATLAB handle object.
p = FINDPROP(H,PROPNAME) finds and returns the META.PROPERTY object
associated with property name PROPNAME of scalar handle object H.
PROPNAME can be a string scalar or character vector. It can be the
name of a property defined by the class of H or a dynamic property
added to scalar object H.
If no property named PROPNAME exists for object H, an empty
META.PROPERTY array is returned.
See also NDI.DATASET, NDI.DATASET/FINDOBJ, DYNAMICPROPS, META.PROPERTY
Help for ndi.dataset/findprop is inherited from superclass handle
ge - >= (GE) Greater than or equal relation for handles.
H1 >= H2 performs element-wise comparisons between handle arrays H1 and
H2. H1 and H2 must be of the same dimensions unless one is a scalar.
The result is a logical array of the same dimensions, where each
element is an element-wise >= result.
If one of H1 or H2 is scalar, scalar expansion is performed and the
result will match the dimensions of the array that is not scalar.
TF = GE(H1, H2) stores the result in a logical array of the same
dimensions.
See also NDI.DATASET, NDI.DATASET/EQ, NDI.DATASET/GT, NDI.DATASET/LE, NDI.DATASET/LT, NDI.DATASET/NE
Help for ndi.dataset/ge is inherited from superclass handle
getpath - Return the path of the dataset
P = GETPATH(NDI_DATASET_OBJ)
Returns the path of an ndi.dataset object.
The path is some sort of reference to the storage location of
the dataset. This might be a URL, or a file directory, depending upon
the subclass.
In the ndi.dataset class, this returns empty.
See also: ndidataset.
gt - > (GT) Greater than relation for handles.
H1 > H2 performs element-wise comparisons between handle arrays H1 and
H2. H1 and H2 must be of the same dimensions unless one is a scalar.
The result is a logical array of the same dimensions, where each
element is an element-wise > result.
If one of H1 or H2 is scalar, scalar expansion is performed and the
result will match the dimensions of the array that is not scalar.
TF = GT(H1, H2) stores the result in a logical array of the same
dimensions.
See also NDI.DATASET, NDI.DATASET/EQ, NDI.DATASET/GE, NDI.DATASET/LE, NDI.DATASET/LT, NDI.DATASET/NE
Help for ndi.dataset/gt is inherited from superclass handle
id - return the identifier of an ndi.dataset object
IDENTIFIER = ID(NDI_DATASET_OBJ)
Returns the unique identifier of an ndi.dataset object.
isvalid - ISVALID Test handle validity.
TF = ISVALID(H) performs an element-wise check for validity on the
handle elements of H. The result is a logical array of the same
dimensions as H, where each element is the element-wise validity
result.
A handle is invalid if it has been deleted or if it is an element
of a handle array and has not yet been initialized.
See also NDI.DATASET, NDI.DATASET/DELETE
Help for ndi.dataset/isvalid is inherited from superclass handle
le - <= (LE) Less than or equal relation for handles.
Handles are equal if they are handles for the same object. All
comparisons use a number associated with each handle object. Nothing
can be assumed about the result of a handle comparison except that the
repeated comparison of two handles in the same MATLAB session will
yield the same result. The order of handle values is purely arbitrary
and has no connection to the state of the handle objects being
compared.
H1 <= H2 performs element-wise comparisons between handle arrays H1 and
H2. H1 and H2 must be of the same dimensions unless one is a scalar.
The result is a logical array of the same dimensions, where each
element is an element-wise >= result.
If one of H1 or H2 is scalar, scalar expansion is performed and the
result will match the dimensions of the array that is not scalar.
TF = LE(H1, H2) stores the result in a logical array of the same
dimensions.
See also NDI.DATASET, NDI.DATASET/EQ, NDI.DATASET/GE, NDI.DATASET/GT, NDI.DATASET/LT, NDI.DATASET/NE
Help for ndi.dataset/le is inherited from superclass handle
listener - LISTENER Add listener for event without binding the listener to the source object.
el = LISTENER(hSource, Eventname, callbackFcn) creates a listener
for the event named Eventname. The source of the event is the handle
object hSource. If hSource is an array of source handles, the listener
responds to the named event on any handle in the array. callbackFcn
is a function handle that is invoked when the event is triggered.
el = LISTENER(hSource, PropName, Eventname, callback) adds a
listener for a property event. Eventname must be one of
'PreGet', 'PostGet', 'PreSet', or 'PostSet'. Eventname can be a
string sclar or character vector. PropName must be either a single
property name specified as a string scalar or character vector, or
a collection of property names specified as a cell array of character
vectors or a string array, or as an array of one ore more
meta.property objects. The properties must belong to the class of
hSource. If hSource is scalar, PropName can include dynamic
properties.
For all forms, listener returns an event.listener. To remove a
listener, delete the object returned by listener. For example,
delete(el) calls the handle class delete method to remove the listener
and delete it from the workspace. Calling delete(el) on the listener
object deletes the listener, which means the event no longer causes
the callback function to execute.
LISTENER does not bind the listener's lifecycle to the object that is
the source of the event. Destroying the source object does not impact
the lifecycle of the listener object. A listener created with LISTENER
must be destroyed independently of the source object. Calling
delete(el) explicitly destroys the listener. Redefining or clearing
the variable containing the listener can delete the listener if no
other references to it exist. To tie the lifecycle of the listener to
the lifecycle of the source object, use addlistener.
See also ADDLISTENER, EVENT.LISTENER, NDI.DATASET, NOTIFY, DELETE, META.PROPERTY, EVENTS
Help for ndi.dataset/listener is inherited from superclass handle
lt - < (LT) Less than relation for handles.
H1 < H2 performs element-wise comparisons between handle arrays H1 and
H2. H1 and H2 must be of the same dimensions unless one is a scalar.
The result is a logical array of the same dimensions, where each
element is an element-wise < result.
If one of H1 or H2 is scalar, scalar expansion is performed and the
result will match the dimensions of the array that is not scalar.
TF = LT(H1, H2) stores the result in a logical array of the same
dimensions.
See also NDI.DATASET, NDI.DATASET/EQ, NDI.DATASET/GE, NDI.DATASET/GT, NDI.DATASET/LE, NDI.DATASET/NE
Help for ndi.dataset/lt is inherited from superclass handle
ne - ~= (NE) Not equal relation for handles.
Handles are equal if they are handles for the same object and are
unequal otherwise.
H1 ~= H2 performs element-wise comparisons between handle arrays H1
and H2. H1 and H2 must be of the same dimensions unless one is a
scalar. The result is a logical array of the same dimensions, where
each element is an element-wise equality result.
If one of H1 or H2 is scalar, scalar expansion is performed and the
result will match the dimensions of the array that is not scalar.
TF = NE(H1, H2) stores the result in a logical array of the same
dimensions.
See also NDI.DATASET, NDI.DATASET/EQ, NDI.DATASET/GE, NDI.DATASET/GT, NDI.DATASET/LE, NDI.DATASET/LT
Help for ndi.dataset/ne is inherited from superclass handle
notify - NOTIFY Notify listeners of event.
NOTIFY(H, eventname) notifies listeners added to the event named
eventname for handle object array H that the event is taking place.
eventname can be a string scalar or character vector.
H is the array of handles to the event source objects, and 'eventname'
must be a character vector.
NOTIFY(H,eventname,ed) provides a way of encapsulating information
about an event which can then be accessed by each registered listener.
ed must belong to the EVENT.EVENTDATA class.
See also NDI.DATASET, NDI.DATASET/ADDLISTENER, NDI.DATASET/LISTENER, EVENT.EVENTDATA, EVENTS
Help for ndi.dataset/notify is inherited from superclass handle
open_session - open an ndi.session object from an ndi.dataset
NDI_SESSION_OBJ = OPEN_SESSION(NDI_DATASET_OBJ, SESSION_ID)
Open an ndi.session object with session identifier SESSION_ID that is stored
in the ndi.dataset NDI_DATASET_OBJ.
See also: ndi.session, ndi.dataset/session_list()
reference - return the reference string for an ndi.dataset object
REF_STRING = REFERENCE(NDI_DATASET_OBJ)
Returns the reference string for an ndi.dataset object. This can be any
string, it is not necessarily unique among datasets. The dataset identifier
returned by ID is unique.
See also: ndi.dataset/ID
session_list - return the session reference/identifier list for a dataset
[REF_LIST, ID_LIST] = SESSION_LIST(NDI_DATASET_OBJ)
Returns information about ndi.session objects contained in an ndi.dataset
object NDI_DATASET_OBJ. REF_LIST is a cell array of reference strings, and
ID_LIST is a cell array of unique identifier strings. The nth entry of
REF_LIST corresponds to the Nth entry of ID_LIST (that is, REF_LIST{n} is the
reference that corresponds to the ndi.session with unique identifier ID_LIST{n}.