|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NOMCorpus
NOMCorpus is similar to the nomread version. The additions are methods that change the way the NOM is serialized.
Field Summary | |
---|---|
static double |
UNTIMED
|
Method Summary | |
---|---|
void |
clearData()
Removes all data in the NOM |
void |
clearDataForObservation(NObservation ob)
Removes any currently loaded data relating to the given observation |
void |
clearDataForObservation(java.lang.String ob)
Removes any currently loaded data relating to the named observation |
void |
completeLoad()
finish loading *all* files we know about from the corpus: this only makes sense if lazy loading is switched on, otherwise it will do nothing. |
boolean |
edited()
returns true if the corpus has unsaved edits |
void |
forceAnnotatorCoding(java.lang.String annotator,
java.lang.String coding)
Force one coding to be loaded for a specific annotator when loadData is called. |
java.lang.String |
generateID(java.lang.String element_name)
generates an Identifier that's globally unique - used when creating elements |
boolean |
getBatchMode()
Used by NOM program - not for client program use |
java.lang.String |
getCodingFilename(NObservation no,
NCoding co,
NAgent ag)
Return the actual file to which this data should be serialized (including any annotator-specific subdirectory). |
double |
getCorpusDuration()
returns the duration of the corpus (last end time - earliest start time) (or UNTIMED if there is are no timed elements) |
double |
getCorpusEndTime()
returns the latest end time of any element in the corpus (or UNTIMED if there is no timed element) |
double |
getCorpusStartTime()
returns the earliest start time of any element in the corpus (or UNTIMED if there is no timed element) |
NOMElement |
getElementByID(java.lang.String id)
Return a NOMWriteElement which has the given element ID: you can either pass an unadorned ID in which case NXT searches for the element in all already-loaded files, or you can specify the 'full' ID like this: colour#id (e.g. |
NOMElement |
getElementByID(java.lang.String colour,
java.lang.String id)
|
java.util.List |
getElementsByName(java.lang.String name)
Return a list of NOMWriteElements which have the given element name. |
java.lang.String |
getHrefAttr()
Link syntax information: get the name of the 'href' attribute |
java.lang.String |
getLinkAfterID()
Link syntax information: get the String that appears after an ID |
java.lang.String |
getLinkBeforeID()
Link syntax information: get the String that appears before an ID |
java.lang.String |
getLinkFileSeparator()
Link syntax information: get the String that separates a filename from an ID |
java.util.List |
getLoadedObservations()
returns a List of NObservation elements - each one the name of an observation that has been asked to be loaded (how much, if any of the observation data actually loaded depends on lazy loading). |
NOMMaker |
getMaker()
This is used by internal corpus-building routines to make sure we always use the right constructors. |
int |
getMaxDepth(NLayer layer)
Return the deepest nesting of elements in this recursive layer (if the layer is not recursive, returns 1 or 0) |
NMetaData |
getMetaData()
returns the metadata associated with this NOM |
java.util.List |
getPointersTo(NOMElement to_element)
Return the reverse index of pointers to the given element |
java.lang.String |
getRangeSeparator()
Link syntax information: get the String that appears between IDs in a range |
java.util.List |
getRootElements()
returns a List of NOMElements: the top level "stream" elements |
NOMElement |
getRootWithColour(java.lang.String colour)
returns the root NOMElement which has the given colour |
boolean |
isEditSafe()
Return true if the corpus can be edited safely - for internal use. |
boolean |
isLazyLoading()
Set to true (default) to lazy-load any future calls to load data; false means everything in future load calls is loaded up-front. |
boolean |
isLoadingFromFile()
Returns true if data is currently being loaded from file. |
boolean |
isValidating()
returns true if the corpus is validating (i.e. |
void |
loadData()
Load all data for the corpus into the NOMCorpus. |
void |
loadData(java.util.List observations,
java.util.List codings)
Load data for a specific set of observations into the NOMCorpus. |
void |
loadData(NObservation observation)
Load data for a single observation into the NOMCorpus. |
void |
loadReliability(NLayer top,
NLayer top_common,
java.lang.String coder_attribute_name,
java.lang.String path,
java.util.List observations)
Load data for the purpose of comparing different coders' data. |
void |
loadReliability(NLayer top,
NLayer top_common,
java.lang.String coder_attribute_name,
java.lang.String path,
java.util.List observations,
java.util.List other_layers)
Load data for the purpose of comparing different coders' data. |
boolean |
lock(NOMView view)
lock the corpus for edits - returns false if another view has locked the corpus. |
java.util.Iterator |
NOMWalker()
Provides an iterator which visits each element in the NOM exactly once. |
void |
preferAnnotatorCoding(java.lang.String annotator,
java.lang.String coding)
Prefer one coding to be loaded for a specific annotator when loadData is called. |
void |
registerID(java.lang.String colour,
java.lang.String id)
registers an Identifier as having been used and if necessary, notes an Integer in the ID hash for quick generation of IDs |
void |
removePointerIndex(NOMPointer point)
|
NOMElement |
resolveLink(java.lang.String xlink)
Resolve an individual xlink expression which points to exactly one NOM element. |
NOMElement |
resolveLink(java.lang.String xlink,
int linktype)
Resolve an individual xlink expression which points to exactly one NOM element - the second argument explicitly names the link type involved. |
void |
serializeCorpus()
Serialize the entire loaded corpus |
void |
serializeCorpus(java.util.List observations)
Serialize all loaded files for the given list of observations |
void |
serializeCorpusChanged()
Serialize all files which have been changed. |
boolean |
serializeInheritedTimes()
True if we should allow inherited times to be serialized |
boolean |
serializeMaximalRanges()
True if we should serialize ranges |
void |
setDefaultAnnotator(java.lang.String annotator)
Set the preferred annotator for *all* codings that is used on subsequent loadData calls. |
void |
setForceStreamElementNames(boolean bool)
Set to true to make future serialization calls serialize with stream element names conforming to meta.getStreamElementName(). |
void |
setLazyLoading(boolean bool)
Set to true (default) to lazy-load any future calls to load data; false means everything in future load calls is loaded up-front. |
void |
setSchemaLocation(java.lang.String location)
If this method is used with a non-null argument, we make sure the schema instance namespace is output on every stream-like element on serialization along with this as the noNamespaceSchemaLocation |
void |
setSerializeInheritedTimes(boolean bool)
Set to true to make future serialization calls serialize with inherited times on structural elements. |
void |
setSerializeMaximalRanges(boolean bool)
Set to true (default) to make future serialization calls serialize with ranges where possible. |
void |
setValidation(boolean validate)
Set validation for the corpus. |
boolean |
unlock(NOMView view)
unlock the corpus - returns false if the view isn't the one that has the lock. |
Methods inherited from interface net.sourceforge.nite.nom.link.NOMControl |
---|
deregisterViewer, notifyChange, notifyChange, notifyChange, registerViewer |
Field Detail |
---|
static final double UNTIMED
Method Detail |
---|
void loadData() throws NOMException
NOMException
void loadData(java.util.List observations, java.util.List codings) throws NOMException
NOMException
void loadData(NObservation observation) throws NOMException
NOMException
void loadReliability(NLayer top, NLayer top_common, java.lang.String coder_attribute_name, java.lang.String path, java.util.List observations) throws NOMException
NOMException
void loadReliability(NLayer top, NLayer top_common, java.lang.String coder_attribute_name, java.lang.String path, java.util.List observations, java.util.List other_layers) throws NOMException
NOMException
void setDefaultAnnotator(java.lang.String annotator)
void forceAnnotatorCoding(java.lang.String annotator, java.lang.String coding) throws NOMException
NOMException
void preferAnnotatorCoding(java.lang.String annotator, java.lang.String coding) throws NOMException
NOMException
void clearData()
void clearDataForObservation(NObservation ob)
void clearDataForObservation(java.lang.String ob)
NMetaData getMetaData()
java.util.List getLoadedObservations()
java.util.Iterator NOMWalker()
boolean isValidating()
void setValidation(boolean validate)
boolean getBatchMode()
boolean isLoadingFromFile()
int getMaxDepth(NLayer layer)
java.util.List getElementsByName(java.lang.String name)
NOMElement getElementByID(java.lang.String colour, java.lang.String id)
NOMElement getElementByID(java.lang.String id)
java.util.List getRootElements()
NOMElement getRootWithColour(java.lang.String colour)
double getCorpusStartTime()
double getCorpusEndTime()
double getCorpusDuration()
java.lang.String getLinkFileSeparator()
java.lang.String getLinkBeforeID()
java.lang.String getLinkAfterID()
java.lang.String getRangeSeparator()
java.lang.String getHrefAttr()
NOMElement resolveLink(java.lang.String xlink, int linktype)
java.util.List getPointersTo(NOMElement to_element)
void setLazyLoading(boolean bool)
boolean isLazyLoading()
void completeLoad()
boolean edited()
void setSerializeInheritedTimes(boolean bool)
void setForceStreamElementNames(boolean bool)
void setSchemaLocation(java.lang.String location)
boolean serializeInheritedTimes()
void setSerializeMaximalRanges(boolean bool)
boolean serializeMaximalRanges()
void serializeCorpusChanged() throws NOMException
NOMException
void serializeCorpus() throws NOMException
NOMException
void serializeCorpus(java.util.List observations) throws NOMException
NOMException
java.lang.String generateID(java.lang.String element_name)
void registerID(java.lang.String colour, java.lang.String id)
boolean isEditSafe()
boolean lock(NOMView view)
boolean unlock(NOMView view)
NOMElement resolveLink(java.lang.String xlink)
void removePointerIndex(NOMPointer point)
NOMMaker getMaker()
java.lang.String getCodingFilename(NObservation no, NCoding co, NAgent ag)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |