|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.nite.meta.impl.NiteMetaData
public class NiteMetaData
Handles the metadata associated with a corpus: during validation this structure stores important information about the parsed metadata file.
| Field Summary |
|---|
| Fields inherited from interface net.sourceforge.nite.meta.NMetaData |
|---|
LTXML1_LINKS, SIMPLE_CORPUS, STANDOFF_CORPUS, XPOINTER_LINKS |
| Constructor Summary | |
|---|---|
NiteMetaData(java.lang.String filename)
Constructor |
|
| Method Summary | |
|---|---|
void |
addObservation(NObservation observation)
add an observation to the corpus. |
NiteLayer |
findLayerWithName(java.lang.String name)
return a NiteLayer with this name or null if there are none. |
NObservation |
findObservationWithName(java.lang.String name)
find an observation with the given name |
java.util.List |
findPathBetween(NLayer top,
NLayer bottom)
find a metadata route between layers and return as a List of Codings |
NSignal |
findSignalWithName(java.lang.String name)
returns a signal with the given name. |
NStyle |
findStyleWithName(java.lang.String name)
returns a "styled display" (either an annotation board or a stylesheet-produced interface) with a given name. |
NUserCoding |
findUserCoding(NObservation observation,
java.lang.String name,
java.lang.String agent)
find a user coding with the given name |
java.lang.String |
getAgentAttributeName()
Return the name of the reserved agent attribute for the corpus - this attribute will not be expected on the input files but will be added to any elements that have agents on import. |
java.util.List |
getAgents()
returns an ArrayList of "NiteAgent"s |
java.util.List |
getAllElements()
returns a List of all the "NElement"s in all the codings in the corpus |
java.lang.String |
getAnnotationSpecPath()
|
java.lang.String |
getChildElementName()
get the name of the reserved element for NITE children in this corpus |
NCoding |
getCodingByName(java.lang.String name)
get the NCoding with the given name or null if it doesn't exist |
java.lang.String |
getCodingPath()
returns the directory path where codings are stored for the corpus - relative to the working directory in which java is running (or absolute if relcodingspath is absolute) |
java.util.List |
getCodings()
returns a List of "NCoding"s in the corpus |
java.lang.String |
getCommentAttributeName()
get the name of the reserved attribute for comments in this corpus |
java.lang.String |
getCorpusDescription()
returns the description of the corpus |
java.lang.String |
getCorpusID()
returns the ID of the corpus |
NCorpusResource |
getCorpusResourceByName(java.lang.String name)
get the NCorpusResource with the given name or null if it doesn't exist |
java.lang.String |
getCorpusResourcePath()
returns the directory path where object sets are stored for the corpus - relative to the working directory in which java is running (or absolute if relcorpusresourcepath is absolute) |
java.util.List |
getCorpusResources()
returns an ArrayList of "NiteCorpusResource"s |
int |
getCorpusType()
returns STANDOFF_CORPUS by default, or SIMPLE_CORPUS if that's specified on the top level metadata tag. |
int |
getCVSConnectionMethod()
get the connection method used by CVS (or null if there's no CVS information) |
java.lang.String |
getCVSModule()
get the module / base directory used by CVS (or null if there's no CVS information) |
java.lang.String |
getCVSProtocol()
get the protocol used by CVS (or null if there's no CVS information) |
java.lang.String |
getCVSRepository()
get the repository used by CVS (or null if there's no CVS information) |
java.lang.String |
getCVSServer()
get the CVS server (or null if there's no CVS information) |
java.util.List |
getDataViews()
returns a List of "NDataViews"s |
NElement |
getElementByName(java.lang.String element_name)
Find the element called "element_name". |
java.lang.String |
getEndTimeAttributeName()
get the name of the reserved attribute for end times in this corpus |
java.lang.String |
getExternalPointerElementName()
get the name of the reserved element for external NITE pointers in this corpus (this is only used for elements in EXTERNAL_POINTER_LAYER type layers |
java.lang.String |
getFilename()
returns the metadata filename |
java.lang.String |
getGVMAttributeName()
get the name of the reserved attribute for Graphical Visual Markup in this corpus |
java.lang.String |
getIDAttributeName()
get the name of the reserved attribute for IDs in this corpus |
java.lang.String |
getKeyStrokeAttributeName()
get the name of the reserved attribute for Graphical Visual Markup in this corpus |
NLayer |
getLayerByName(java.lang.String name)
get the NLayer with the given name or null if it doesn't exist. |
java.util.List |
getLayersByType(int type)
Find the layers of a given layer type. |
int |
getLinkType()
returns LTXML1_LINKS or XPOINTER_LINKS depending on the link type specified on the top level metadata tag. |
NObjectSet |
getObjectSetByName(java.lang.String name)
get the NObjectSet with the given name or null if it doesn't exist |
java.lang.String |
getObjectSetPath()
returns the directory path where object sets are stored for the corpus - relative to the working directory in which java is running (or absolute if relobjectsetpath is absolute) |
java.util.List |
getObjectSets()
returns an ArrayList of "NiteObjectSet"s |
java.lang.String |
getObservationAttributeName()
Return the name of the reserved observation attribute for the corpus - this attribute will not be expected on the input files but will be added to all elements on import. |
java.util.List |
getObservations()
returns an ArrayList of "NiteObservation"s |
java.util.List |
getObservationVariables()
Returns a list of NAttributes since the data structure is exactly the same. |
NObservation |
getObservationWithName(java.lang.String obsname)
returns the named observation or null if it doesn't exist |
java.util.List |
getOntologies()
returns an ArrayList of "NiteOntology"s |
NOntology |
getOntologyByName(java.lang.String name)
get the NOntology with the given name or null if it doesn't exist |
java.lang.String |
getOntologyPath()
returns the directory path where ontologies are stored for the corpus - relative to the working directory in which java is running (or absolute if relontologypath is absolute) |
java.lang.String |
getPointerElementName()
get the name of the reserved element for NITE pointers in this corpus |
java.util.List |
getPrograms()
returns a List of "NCallableProgram"s - programs that can be called on this corpus |
java.lang.String |
getRelativeCodingPath()
returns the directory path where codings are stored for the corpus, as it is in the metadata file - relative to the metadata file. |
java.lang.String |
getRelativeCorpusResourcePath()
returns the directory path where object sets are stored for the corpus, as it is in the metadata file - relative to the metadata file. |
java.lang.String |
getRelativeObjectSetPath()
returns the directory path where object sets are stored for the corpus, as it is in the metadata file - relative to the metadata file. |
java.lang.String |
getRelativeOntologyPath()
returns the directory path where signals are stored for the corpus, as it is in the metadata file - relative to the metadata file. |
java.lang.String |
getRelativeSignalPath()
returns the directory path where signals are stored for the corpus, as it is in the metadata file - relative to the metadata file. |
java.lang.String |
getRelativeStylePath()
returns the directory path where styles are stored for the corpus, as it is in the metadata file - relative to the metadata file. |
java.lang.String |
getSignalPath()
returns the directory path where signals are stored for the corpus - relative to the working directory in which java is running (or absolute if relsignalpath is absolute) |
java.lang.String |
getSignalPathModifier(NObservation obs)
returns the modifier to the signal path, replacing the string 'observation' with the provided Observation's name. |
java.lang.String |
getSignalPathModifier(java.lang.String obs)
returns the modifier to the signal path, replacing the string 'observation' with the provided Observation's name. |
java.util.List |
getSignals()
returns an ArrayList of "NiteSignal"s |
java.lang.String |
getStartTimeAttributeName()
get the name of the reserved attribute for start times in this corpus |
java.lang.String |
getStreamElementName()
get the name of the reserved element for NITE streams in this corpus |
java.lang.String |
getStylePath()
returns the directory path where styles are stored for the corpus - relative to the working directory in which java is running (or absolute if relstylepath is absolute) |
java.util.List |
getStyles()
returns an ArrayList of "NiteStyle"s |
NStyle |
getStyleWithName(java.lang.String name)
returns an "NStyle" with the given name, or null |
java.lang.String |
getTextElementName()
get the name of the reserved element for text in this corpus |
java.util.Set |
getValidPointersFrom(NLayer lay)
get the Set of String NLayer names that the elements in this layer can point to |
java.util.Set |
getValidPointersTo(java.lang.String lay)
get the Set of NLayers that can point to the elements in this named layer |
boolean |
isValidating()
Returns true if validation is on (default) or false if it's off. |
void |
setAgentAttributeName(java.lang.String agent)
set the name of the reserved attribute for agents in this corpus |
void |
setChildElementName(java.lang.String child_name)
change the name of a child element for serialization - the default value is "nite:child" |
void |
setCodingPath(java.lang.String path)
change the path where the codings are loaded and serialized from & to |
void |
setCommentAttributeName(java.lang.String comment)
set the name of the reserved attribute for comments in this corpus |
void |
setCorpusDescription(java.lang.String description)
sets the description of the corpus |
void |
setCorpusID(java.lang.String id)
Set the identifier of the corpus |
void |
setCorpusResourcePath(java.lang.String path)
change the path where the object sets are loaded and serialized from & to |
void |
setElementsAndAttributesToDefaults()
set all the distinguished element and attribute values to their defaults. |
void |
setEndTimeAttributeName(java.lang.String end)
set the name of the reserved attribute for end times in this corpus |
void |
setExternalPointerElementName(java.lang.String pointer_name)
change the name of an external pointer element for serialization - the default value is "nite:external_pointer" |
void |
setFilename(java.lang.String filename)
set the metadata filename for any future save (pass the full path or it will be assumed to be relative to the working directory) |
void |
setGVMAttributeName(java.lang.String GVM)
set the name of the reserved attribute for Graphical Visual Markup in this corpus |
void |
setIDAttributeName(java.lang.String id)
set the name of the reserved attribute for IDs in this corpus |
void |
setKeyStrokeAttributeName(java.lang.String key)
set the name of the reserved attribute for KeyStrokes in this corpus |
void |
setLinkType(int linktype)
Set the type of links this metadata has (or will be serialized with). |
void |
setObjectSetPath(java.lang.String path)
change the path where the object sets are loaded and serialized from & to |
void |
setObservationAttributeName(java.lang.String observation)
set the name of the reserved attribute for observations in this corpus |
void |
setOntologyPath(java.lang.String path)
change the path where the ontologies are loaded and serialized from & to |
void |
setPointerElementName(java.lang.String pointer_name)
change the name of a pointer element for serialization - the default value is "nite:pointer" |
void |
setStartTimeAttributeName(java.lang.String start)
set the name of the reserved attribute for start times in this corpus |
void |
setStreamElementName(java.lang.String element_name)
set the name of the reserved element for NITE streams in this corpus |
void |
setStylePath(java.lang.String path)
change the path where the "styles" are loaded from - styles are stylesheets and annotation board displays. |
void |
setUserCodingAttribute(NObservation obs,
NUserCoding nuc,
java.lang.String attname,
java.lang.String value)
change an attribute value on a user coding in the metadata. |
void |
setValidation(boolean validate)
Set validation on (true) or off (false). |
void |
writeMetaData()
save the metadata to the current filename (by default the file it was created from, or set using setFilename). |
void |
writeMetaData(java.lang.String filename)
save the metadata to a file with the given filename. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NiteMetaData(java.lang.String filename)
throws NiteMetaException
NiteMetaException| Method Detail |
|---|
public void writeMetaData()
writeMetaData in interface NMetaDatapublic void writeMetaData(java.lang.String filename)
writeMetaData in interface NMetaDatapublic NStyle findStyleWithName(java.lang.String name)
findStyleWithName in interface NMetaDatapublic NSignal findSignalWithName(java.lang.String name)
findSignalWithName in interface NMetaDatapublic NiteLayer findLayerWithName(java.lang.String name)
public java.lang.String getCorpusDescription()
getCorpusDescription in interface NMetaDatapublic void setCorpusDescription(java.lang.String description)
setCorpusDescription in interface NMetaDatapublic java.lang.String getCorpusID()
getCorpusID in interface NMetaDatapublic void setCorpusID(java.lang.String id)
setCorpusID in interface NMetaDatapublic int getCorpusType()
getCorpusType in interface NMetaDatapublic int getLinkType()
getLinkType in interface NMetaDatapublic void setLinkType(int linktype)
setLinkType in interface NMetaDatapublic void setValidation(boolean validate)
setValidation in interface NMetaDatapublic boolean isValidating()
isValidating in interface NMetaDatapublic java.util.List getAgents()
getAgents in interface NMetaDatapublic java.util.List getPrograms()
getPrograms in interface NMetaDatapublic java.util.List getDataViews()
getDataViews in interface NMetaDatapublic java.util.List getSignals()
getSignals in interface NMetaDatapublic java.util.List getObservationVariables()
getObservationVariables in interface NMetaDatapublic java.util.List getObservations()
getObservations in interface NMetaDatapublic NObservation getObservationWithName(java.lang.String obsname)
getObservationWithName in interface NMetaDatapublic NObservation findObservationWithName(java.lang.String name)
public NUserCoding findUserCoding(NObservation observation,
java.lang.String name,
java.lang.String agent)
public void addObservation(NObservation observation)
public java.util.List getStyles()
getStyles in interface NMetaDatapublic NStyle getStyleWithName(java.lang.String name)
getStyleWithName in interface NMetaDatapublic java.lang.String getFilename()
getFilename in interface NMetaData
public void setFilename(java.lang.String filename)
throws NiteMetaException
setFilename in interface NMetaDataNiteMetaExceptionpublic java.lang.String getChildElementName()
getChildElementName in interface NMetaDatapublic java.lang.String getPointerElementName()
getPointerElementName in interface NMetaDatapublic java.lang.String getExternalPointerElementName()
getExternalPointerElementName in interface NMetaDatapublic void setExternalPointerElementName(java.lang.String pointer_name)
setExternalPointerElementName in interface NMetaDatapublic void setPointerElementName(java.lang.String pointer_name)
setPointerElementName in interface NMetaDatapublic void setChildElementName(java.lang.String child_name)
setChildElementName in interface NMetaDatapublic java.lang.String getStreamElementName()
getStreamElementName in interface NMetaDatapublic void setStreamElementName(java.lang.String element_name)
setStreamElementName in interface NMetaDatapublic java.lang.String getTextElementName()
getTextElementName in interface NMetaDatapublic java.lang.String getStartTimeAttributeName()
getStartTimeAttributeName in interface NMetaDatapublic java.lang.String getEndTimeAttributeName()
getEndTimeAttributeName in interface NMetaDatapublic void setStartTimeAttributeName(java.lang.String start)
setStartTimeAttributeName in interface NMetaDatapublic void setEndTimeAttributeName(java.lang.String end)
setEndTimeAttributeName in interface NMetaDatapublic java.lang.String getIDAttributeName()
getIDAttributeName in interface NMetaDatapublic void setIDAttributeName(java.lang.String id)
setIDAttributeName in interface NMetaDatapublic java.lang.String getCommentAttributeName()
getCommentAttributeName in interface NMetaDatapublic void setCommentAttributeName(java.lang.String comment)
setCommentAttributeName in interface NMetaDatapublic java.lang.String getAgentAttributeName()
getAgentAttributeName in interface NMetaDatapublic void setAgentAttributeName(java.lang.String agent)
setAgentAttributeName in interface NMetaDatapublic java.lang.String getObservationAttributeName()
getObservationAttributeName in interface NMetaDatapublic void setObservationAttributeName(java.lang.String observation)
setObservationAttributeName in interface NMetaDatapublic java.lang.String getKeyStrokeAttributeName()
getKeyStrokeAttributeName in interface NMetaDatapublic void setKeyStrokeAttributeName(java.lang.String key)
setKeyStrokeAttributeName in interface NMetaDatapublic java.lang.String getGVMAttributeName()
getGVMAttributeName in interface NMetaDatapublic void setGVMAttributeName(java.lang.String GVM)
setGVMAttributeName in interface NMetaDatapublic void setElementsAndAttributesToDefaults()
setElementsAndAttributesToDefaults in interface NMetaDatapublic java.lang.String getCVSProtocol()
getCVSProtocol in interface NMetaDatapublic java.lang.String getCVSServer()
getCVSServer in interface NMetaDatapublic java.lang.String getCVSModule()
getCVSModule in interface NMetaDatapublic java.lang.String getCVSRepository()
getCVSRepository in interface NMetaDatapublic int getCVSConnectionMethod()
getCVSConnectionMethod in interface NMetaDatapublic java.lang.String getRelativeStylePath()
getRelativeStylePath in interface NMetaDatapublic java.lang.String getStylePath()
getStylePath in interface NMetaDatapublic void setStylePath(java.lang.String path)
setStylePath in interface NMetaDatapublic java.lang.String getAnnotationSpecPath()
public java.lang.String getRelativeCodingPath()
getRelativeCodingPath in interface NMetaDatapublic java.lang.String getCodingPath()
getCodingPath in interface NMetaDatapublic void setCodingPath(java.lang.String path)
setCodingPath in interface NMetaDatapublic java.lang.String getRelativeSignalPath()
getRelativeSignalPath in interface NMetaDatapublic java.lang.String getSignalPath()
getSignalPath in interface NMetaDatapublic java.lang.String getSignalPathModifier(NObservation obs)
getSignalPathModifier in interface NMetaDatapublic java.lang.String getSignalPathModifier(java.lang.String obs)
getSignalPathModifier in interface NMetaDatapublic java.lang.String getRelativeOntologyPath()
getRelativeOntologyPath in interface NMetaDatapublic java.lang.String getOntologyPath()
getOntologyPath in interface NMetaDatapublic void setOntologyPath(java.lang.String path)
setOntologyPath in interface NMetaDatapublic java.util.List getOntologies()
getOntologies in interface NMetaDatapublic java.util.List getObjectSets()
getObjectSets in interface NMetaDatapublic java.lang.String getRelativeObjectSetPath()
getRelativeObjectSetPath in interface NMetaDatapublic java.lang.String getObjectSetPath()
getObjectSetPath in interface NMetaDatapublic void setObjectSetPath(java.lang.String path)
setObjectSetPath in interface NMetaDatapublic java.util.List getCorpusResources()
getCorpusResources in interface NMetaDatapublic java.lang.String getRelativeCorpusResourcePath()
getRelativeCorpusResourcePath in interface NMetaDatapublic java.lang.String getCorpusResourcePath()
getCorpusResourcePath in interface NMetaDatapublic void setCorpusResourcePath(java.lang.String path)
setCorpusResourcePath in interface NMetaDatapublic java.util.List getCodings()
NMetaData
getCodings in interface NMetaDatapublic NCoding getCodingByName(java.lang.String name)
getCodingByName in interface NMetaDatapublic NLayer getLayerByName(java.lang.String name)
getLayerByName in interface NMetaDatapublic NObjectSet getObjectSetByName(java.lang.String name)
getObjectSetByName in interface NMetaDatapublic NOntology getOntologyByName(java.lang.String name)
getOntologyByName in interface NMetaDatapublic NCorpusResource getCorpusResourceByName(java.lang.String name)
getCorpusResourceByName in interface NMetaDatapublic java.util.List getAllElements()
getAllElements in interface NMetaDatapublic NElement getElementByName(java.lang.String element_name)
getElementByName in interface NMetaDatapublic java.util.List getLayersByType(int type)
getLayersByType in interface NMetaData
public void setUserCodingAttribute(NObservation obs,
NUserCoding nuc,
java.lang.String attname,
java.lang.String value)
public java.util.List findPathBetween(NLayer top,
NLayer bottom)
findPathBetween in interface NMetaDatapublic java.util.Set getValidPointersFrom(NLayer lay)
getValidPointersFrom in interface NMetaDatapublic java.util.Set getValidPointersTo(java.lang.String lay)
getValidPointersTo in interface NMetaData
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||