net.sourceforge.nite.meta.impl
Class NiteMetaData

java.lang.Object
  extended by net.sourceforge.nite.meta.impl.NiteMetaData
All Implemented Interfaces:
NMetaData

public class NiteMetaData
extends java.lang.Object
implements NMetaData

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

NiteMetaData

public NiteMetaData(java.lang.String filename)
             throws NiteMetaException
Constructor

Throws:
NiteMetaException
Method Detail

writeMetaData

public void writeMetaData()
save the metadata to the current filename (by default the file it was created from, or set using setFilename).

Specified by:
writeMetaData in interface NMetaData

writeMetaData

public void writeMetaData(java.lang.String filename)
save the metadata to a file with the given filename.

Specified by:
writeMetaData in interface NMetaData

findStyleWithName

public NStyle findStyleWithName(java.lang.String name)
returns a "styled display" (either an annotation board or a stylesheet-produced interface) with a given name.

Specified by:
findStyleWithName in interface NMetaData

findSignalWithName

public NSignal findSignalWithName(java.lang.String name)
returns a signal with the given name.

Specified by:
findSignalWithName in interface NMetaData

findLayerWithName

public NiteLayer findLayerWithName(java.lang.String name)
return a NiteLayer with this name or null if there are none.


getCorpusDescription

public java.lang.String getCorpusDescription()
returns the description of the corpus

Specified by:
getCorpusDescription in interface NMetaData

setCorpusDescription

public void setCorpusDescription(java.lang.String description)
sets the description of the corpus

Specified by:
setCorpusDescription in interface NMetaData

getCorpusID

public java.lang.String getCorpusID()
returns the ID of the corpus

Specified by:
getCorpusID in interface NMetaData

setCorpusID

public void setCorpusID(java.lang.String id)
Set the identifier of the corpus

Specified by:
setCorpusID in interface NMetaData

getCorpusType

public int getCorpusType()
returns STANDOFF_CORPUS by default, or SIMPLE_CORPUS if that's specified on the top level metadata tag.

Specified by:
getCorpusType in interface NMetaData

getLinkType

public int getLinkType()
returns LTXML1_LINKS or XPOINTER_LINKS depending on the link type specified on the top level metadata tag.

Specified by:
getLinkType in interface NMetaData

setLinkType

public void setLinkType(int linktype)
Set the type of links this metadata has (or will be serialized with). Must be either LTXML1_LINKS or XPOINTER_LINKS

Specified by:
setLinkType in interface NMetaData

setValidation

public void setValidation(boolean validate)
Set validation on (true) or off (false). Validation applies to the metadata file itself (though only as far as comparing declared observation variables with actual ones) and the data itself.

Specified by:
setValidation in interface NMetaData

isValidating

public boolean isValidating()
Returns true if validation is on (default) or false if it's off. Validation applies to the metadata file itself (though only as far as comparing declared observation variables with actual ones) and the data itself.

Specified by:
isValidating in interface NMetaData

getAgents

public java.util.List getAgents()
returns an ArrayList of "NiteAgent"s

Specified by:
getAgents in interface NMetaData

getPrograms

public java.util.List getPrograms()
returns a List of "NCallableProgram"s - programs that can be called on this corpus

Specified by:
getPrograms in interface NMetaData

getDataViews

public java.util.List getDataViews()
returns a List of "NDataViews"s

Specified by:
getDataViews in interface NMetaData

getSignals

public java.util.List getSignals()
returns an ArrayList of "NiteSignal"s

Specified by:
getSignals in interface NMetaData

getObservationVariables

public java.util.List getObservationVariables()
Returns a list of NAttributes since the data structure is exactly the same. Observation variables define the names and types of variables that are associated with each observation.

Specified by:
getObservationVariables in interface NMetaData

getObservations

public java.util.List getObservations()
returns an ArrayList of "NiteObservation"s

Specified by:
getObservations in interface NMetaData

getObservationWithName

public NObservation getObservationWithName(java.lang.String obsname)
returns the named observation or null if it doesn't exist

Specified by:
getObservationWithName in interface NMetaData

findObservationWithName

public NObservation findObservationWithName(java.lang.String name)
find an observation with the given name


findUserCoding

public NUserCoding findUserCoding(NObservation observation,
                                  java.lang.String name,
                                  java.lang.String agent)
find a user coding with the given name


addObservation

public void addObservation(NObservation observation)
add an observation to the corpus. Please note that adding an observation programatically will not change any associated NOM in any way - you will need to make a call to NOMCorpus.loadData with the appropriate arguments to make this observation ready for new annotations.


getStyles

public java.util.List getStyles()
returns an ArrayList of "NiteStyle"s

Specified by:
getStyles in interface NMetaData

getStyleWithName

public NStyle getStyleWithName(java.lang.String name)
returns an "NStyle" with the given name, or null

Specified by:
getStyleWithName in interface NMetaData

getFilename

public java.lang.String getFilename()
returns the metadata filename

Specified by:
getFilename in interface NMetaData

setFilename

public void setFilename(java.lang.String filename)
                 throws NiteMetaException
set the metadata filename for any future save (pass the full path or it will be assumed to be relative to the working directory)

Specified by:
setFilename in interface NMetaData
Throws:
NiteMetaException

getChildElementName

public java.lang.String getChildElementName()
get the name of the reserved element for NITE children in this corpus

Specified by:
getChildElementName in interface NMetaData

getPointerElementName

public java.lang.String getPointerElementName()
get the name of the reserved element for NITE pointers in this corpus

Specified by:
getPointerElementName in interface NMetaData

getExternalPointerElementName

public 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

Specified by:
getExternalPointerElementName in interface NMetaData

setExternalPointerElementName

public void setExternalPointerElementName(java.lang.String pointer_name)
change the name of an external pointer element for serialization - the default value is "nite:external_pointer"

Specified by:
setExternalPointerElementName in interface NMetaData

setPointerElementName

public void setPointerElementName(java.lang.String pointer_name)
change the name of a pointer element for serialization - the default value is "nite:pointer"

Specified by:
setPointerElementName in interface NMetaData

setChildElementName

public void setChildElementName(java.lang.String child_name)
change the name of a child element for serialization - the default value is "nite:child"

Specified by:
setChildElementName in interface NMetaData

getStreamElementName

public java.lang.String getStreamElementName()
get the name of the reserved element for NITE streams in this corpus

Specified by:
getStreamElementName in interface NMetaData

setStreamElementName

public void setStreamElementName(java.lang.String element_name)
set the name of the reserved element for NITE streams in this corpus

Specified by:
setStreamElementName in interface NMetaData

getTextElementName

public java.lang.String getTextElementName()
get the name of the reserved element for text in this corpus

Specified by:
getTextElementName in interface NMetaData

getStartTimeAttributeName

public java.lang.String getStartTimeAttributeName()
get the name of the reserved attribute for start times in this corpus

Specified by:
getStartTimeAttributeName in interface NMetaData

getEndTimeAttributeName

public java.lang.String getEndTimeAttributeName()
get the name of the reserved attribute for end times in this corpus

Specified by:
getEndTimeAttributeName in interface NMetaData

setStartTimeAttributeName

public void setStartTimeAttributeName(java.lang.String start)
set the name of the reserved attribute for start times in this corpus

Specified by:
setStartTimeAttributeName in interface NMetaData

setEndTimeAttributeName

public void setEndTimeAttributeName(java.lang.String end)
set the name of the reserved attribute for end times in this corpus

Specified by:
setEndTimeAttributeName in interface NMetaData

getIDAttributeName

public java.lang.String getIDAttributeName()
get the name of the reserved attribute for IDs in this corpus

Specified by:
getIDAttributeName in interface NMetaData

setIDAttributeName

public void setIDAttributeName(java.lang.String id)
set the name of the reserved attribute for IDs in this corpus

Specified by:
setIDAttributeName in interface NMetaData

getCommentAttributeName

public java.lang.String getCommentAttributeName()
get the name of the reserved attribute for comments in this corpus

Specified by:
getCommentAttributeName in interface NMetaData

setCommentAttributeName

public void setCommentAttributeName(java.lang.String comment)
set the name of the reserved attribute for comments in this corpus

Specified by:
setCommentAttributeName in interface NMetaData

getAgentAttributeName

public 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. If the value is null (i.e. there is no 'agentname' element in the metadata file), no agent attributes are added. This is a convenience function to allow access to agents from the query language.

Specified by:
getAgentAttributeName in interface NMetaData

setAgentAttributeName

public void setAgentAttributeName(java.lang.String agent)
set the name of the reserved attribute for agents in this corpus

Specified by:
setAgentAttributeName in interface NMetaData

getObservationAttributeName

public 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. If the value is null (i.e. there is no 'observationname' element in the metadata file), no observation attributes are added. This is a convenience function to allow access to observations from the query language.

Specified by:
getObservationAttributeName in interface NMetaData

setObservationAttributeName

public void setObservationAttributeName(java.lang.String observation)
set the name of the reserved attribute for observations in this corpus

Specified by:
setObservationAttributeName in interface NMetaData

getKeyStrokeAttributeName

public java.lang.String getKeyStrokeAttributeName()
get the name of the reserved attribute for Graphical Visual Markup in this corpus

Specified by:
getKeyStrokeAttributeName in interface NMetaData

setKeyStrokeAttributeName

public void setKeyStrokeAttributeName(java.lang.String key)
set the name of the reserved attribute for KeyStrokes in this corpus

Specified by:
setKeyStrokeAttributeName in interface NMetaData

getGVMAttributeName

public java.lang.String getGVMAttributeName()
get the name of the reserved attribute for Graphical Visual Markup in this corpus

Specified by:
getGVMAttributeName in interface NMetaData

setGVMAttributeName

public void setGVMAttributeName(java.lang.String GVM)
set the name of the reserved attribute for Graphical Visual Markup in this corpus

Specified by:
setGVMAttributeName in interface NMetaData

setElementsAndAttributesToDefaults

public void setElementsAndAttributesToDefaults()
set all the distinguished element and attribute values to their defaults.

Specified by:
setElementsAndAttributesToDefaults in interface NMetaData

getCVSProtocol

public java.lang.String getCVSProtocol()
get the protocol used by CVS (or null if there's no CVS information)

Specified by:
getCVSProtocol in interface NMetaData

getCVSServer

public java.lang.String getCVSServer()
get the CVS server (or null if there's no CVS information)

Specified by:
getCVSServer in interface NMetaData

getCVSModule

public java.lang.String getCVSModule()
get the module / base directory used by CVS (or null if there's no CVS information)

Specified by:
getCVSModule in interface NMetaData

getCVSRepository

public java.lang.String getCVSRepository()
get the repository used by CVS (or null if there's no CVS information)

Specified by:
getCVSRepository in interface NMetaData

getCVSConnectionMethod

public int getCVSConnectionMethod()
get the connection method used by CVS (or null if there's no CVS information)

Specified by:
getCVSConnectionMethod in interface NMetaData

getRelativeStylePath

public 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.

Specified by:
getRelativeStylePath in interface NMetaData

getStylePath

public 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)

Specified by:
getStylePath in interface NMetaData

setStylePath

public void setStylePath(java.lang.String path)
change the path where the "styles" are loaded from - styles are stylesheets and annotation board displays.

Specified by:
setStylePath in interface NMetaData

getAnnotationSpecPath

public java.lang.String getAnnotationSpecPath()

getRelativeCodingPath

public 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.

Specified by:
getRelativeCodingPath in interface NMetaData

getCodingPath

public 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)

Specified by:
getCodingPath in interface NMetaData

setCodingPath

public void setCodingPath(java.lang.String path)
change the path where the codings are loaded and serialized from & to

Specified by:
setCodingPath in interface NMetaData

getRelativeSignalPath

public 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.

Specified by:
getRelativeSignalPath in interface NMetaData

getSignalPath

public 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)

Specified by:
getSignalPath in interface NMetaData

getSignalPathModifier

public java.lang.String getSignalPathModifier(NObservation obs)
returns the modifier to the signal path, replacing the string 'observation' with the provided Observation's name. This allows a certain amount of flexibility in the placement of signal files. Set using pathmodifier="obsrevation" which means signals are assumed to be in subdirectories named exactly the same as the observationname.

Specified by:
getSignalPathModifier in interface NMetaData

getSignalPathModifier

public 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. This allows a certain amount of flexibility in the placement of signal files. Set using pathmodifier="obsrevation" which means signals are assumed to be in subdirectories named exactly the same as the observationname.

Specified by:
getSignalPathModifier in interface NMetaData

getRelativeOntologyPath

public 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.

Specified by:
getRelativeOntologyPath in interface NMetaData

getOntologyPath

public 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)

Specified by:
getOntologyPath in interface NMetaData

setOntologyPath

public void setOntologyPath(java.lang.String path)
change the path where the ontologies are loaded and serialized from & to

Specified by:
setOntologyPath in interface NMetaData

getOntologies

public java.util.List getOntologies()
returns an ArrayList of "NiteOntology"s

Specified by:
getOntologies in interface NMetaData

getObjectSets

public java.util.List getObjectSets()
returns an ArrayList of "NiteObjectSet"s

Specified by:
getObjectSets in interface NMetaData

getRelativeObjectSetPath

public 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.

Specified by:
getRelativeObjectSetPath in interface NMetaData

getObjectSetPath

public 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)

Specified by:
getObjectSetPath in interface NMetaData

setObjectSetPath

public void setObjectSetPath(java.lang.String path)
change the path where the object sets are loaded and serialized from & to

Specified by:
setObjectSetPath in interface NMetaData

getCorpusResources

public java.util.List getCorpusResources()
returns an ArrayList of "NiteCorpusResource"s

Specified by:
getCorpusResources in interface NMetaData

getRelativeCorpusResourcePath

public 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.

Specified by:
getRelativeCorpusResourcePath in interface NMetaData

getCorpusResourcePath

public 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)

Specified by:
getCorpusResourcePath in interface NMetaData

setCorpusResourcePath

public void setCorpusResourcePath(java.lang.String path)
change the path where the object sets are loaded and serialized from & to

Specified by:
setCorpusResourcePath in interface NMetaData

getCodings

public java.util.List getCodings()
Description copied from interface: NMetaData
returns a List of "NCoding"s in the corpus

Specified by:
getCodings in interface NMetaData

getCodingByName

public NCoding getCodingByName(java.lang.String name)
get the NCoding with the given name or null if it doesn't exist

Specified by:
getCodingByName in interface NMetaData

getLayerByName

public NLayer getLayerByName(java.lang.String name)
get the NLayer with the given name or null if it doesn't exist. Rather inefficient, but shouldn't be a problem unless the metadata is huge!

Specified by:
getLayerByName in interface NMetaData

getObjectSetByName

public NObjectSet getObjectSetByName(java.lang.String name)
get the NObjectSet with the given name or null if it doesn't exist

Specified by:
getObjectSetByName in interface NMetaData

getOntologyByName

public NOntology getOntologyByName(java.lang.String name)
get the NOntology with the given name or null if it doesn't exist

Specified by:
getOntologyByName in interface NMetaData

getCorpusResourceByName

public NCorpusResource getCorpusResourceByName(java.lang.String name)
get the NCorpusResource with the given name or null if it doesn't exist

Specified by:
getCorpusResourceByName in interface NMetaData

getAllElements

public java.util.List getAllElements()
returns a List of all the "NElement"s in all the codings in the corpus

Specified by:
getAllElements in interface NMetaData

getElementByName

public NElement getElementByName(java.lang.String element_name)
Find the element called "element_name".

Specified by:
getElementByName in interface NMetaData

getLayersByType

public java.util.List getLayersByType(int type)
Find the layers of a given layer type. The type must be one of FEATURAL_LAYER, STRUCTURAL_LAYER or TIMED_LAYER (see "NLayer")

Specified by:
getLayersByType in interface NMetaData

setUserCodingAttribute

public 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.


findPathBetween

public java.util.List findPathBetween(NLayer top,
                                      NLayer bottom)
find a metadata route between layers and return as a List of Codings

Specified by:
findPathBetween in interface NMetaData

getValidPointersFrom

public java.util.Set getValidPointersFrom(NLayer lay)
get the Set of String NLayer names that the elements in this layer can point to

Specified by:
getValidPointersFrom in interface NMetaData

getValidPointersTo

public java.util.Set getValidPointersTo(java.lang.String lay)
get the Set of NLayers that can point to the elements in this named layer

Specified by:
getValidPointersTo in interface NMetaData