net.sourceforge.nite.meta
Interface NMetaData

All Known Implementing Classes:
NiteMetaData

public interface NMetaData

Handles the metadata associated with a corpus: during validation this structure stores important information about the parsed metadata file.

Author:
jonathan

Field Summary
static int LTXML1_LINKS
           
static int SIMPLE_CORPUS
           
static int STANDOFF_CORPUS
           
static int XPOINTER_LINKS
           
 
Method Summary
 java.util.List findPathBetween(NLayer top, NLayer bottom)
          find a metadata route between layers and return as a List of Steps
 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.
 java.lang.String getAgentAttributeName()
          get the name of the reserved attribute for agents in this corpus
 java.util.List getAgents()
          returns a List of "NAgent"s
 java.util.List getAllElements()
          returns a List of all the "NElement"s in all the codings in the corpus
 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 relcodingpath 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 identifier 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 corpusresources 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 a List of "NCorpusResource"s
 int getCorpusType()
          returns the corpus type - one of SIMPLE_CORPUS or STANDOFF_CORPUS
 int getCVSConnectionMethod()
          get the connection method used by CVS: returns either NiteMetaConstants.RSH or NiteMetaConstants.SSH
 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 layer which contains 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 keystrokes in this corpus (these are used mainly for ontologies to allow user-settable keystrokes associated with each member of an ontology)
 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 objectsets 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 a List of "NObjectSet"s
 java.lang.String getObservationAttributeName()
          get the name of the reserved attribute for observations in this corpus
 java.util.List getObservations()
          returns a List of "NObservation"s
 java.util.List getObservationVariables()
          Returns a list of NAttributes since the data 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 a List of "NOntology"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 (or absolute, if metadata author prefers).
 java.lang.String getRelativeCorpusResourcePath()
          returns the directory path where corpusresources are stored for the corpus, as it is in the metadata file - relative to the metadata file (or absolute, if metadata author prefers).
 java.lang.String getRelativeObjectSetPath()
          returns the directory path where objectsets are stored for the corpus, as it is in the metadata file - relative to the metadata file (or absolute, if metadata author prefers).
 java.lang.String getRelativeOntologyPath()
          returns the directory path where ontologies are stored for the corpus, as it is in the metadata file - relative to the metadata file (or absolute, if metadata author prefers).
 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 (or absolute, if metadata author prefers).
 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 (or absolute, if metadata author prefers).
 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 a List of "NSignal"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 a List of "NStyle"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 NITE 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 id)
          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 corpus resources 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
 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 agent)
          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 stream)
          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 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.
 

Field Detail

SIMPLE_CORPUS

static final int SIMPLE_CORPUS
See Also:
Constant Field Values

STANDOFF_CORPUS

static final int STANDOFF_CORPUS
See Also:
Constant Field Values

LTXML1_LINKS

static final int LTXML1_LINKS
See Also:
Constant Field Values

XPOINTER_LINKS

static final int XPOINTER_LINKS
See Also:
Constant Field Values
Method Detail

getCorpusType

int getCorpusType()
returns the corpus type - one of SIMPLE_CORPUS or STANDOFF_CORPUS


getCodings

java.util.List getCodings()
returns a List of "NCoding"s in the corpus


getCodingByName

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


getLayerByName

NLayer getLayerByName(java.lang.String name)
get the NLayer with the given name or null if it doesn't exist


getObjectSetByName

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


getOntologyByName

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


getCorpusResourceByName

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


getAgents

java.util.List getAgents()
returns a List of "NAgent"s


getAllElements

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


getSignals

java.util.List getSignals()
returns a List of "NSignal"s


getObservationVariables

java.util.List getObservationVariables()
Returns a list of NAttributes since the data is exactly the same


getObservations

java.util.List getObservations()
returns a List of "NObservation"s


getObservationWithName

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


getOntologies

java.util.List getOntologies()
returns a List of "NOntology"s


getObjectSets

java.util.List getObjectSets()
returns a List of "NObjectSet"s


getCorpusResources

java.util.List getCorpusResources()
returns a List of "NCorpusResource"s


getPrograms

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


getDataViews

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


getStyles

java.util.List getStyles()
returns a List of "NStyle"s


getStyleWithName

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


getStartTimeAttributeName

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


getEndTimeAttributeName

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


getIDAttributeName

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


getAgentAttributeName

java.lang.String getAgentAttributeName()
get the name of the reserved attribute for agents in this corpus


getObservationAttributeName

java.lang.String getObservationAttributeName()
get the name of the reserved attribute for observations in this corpus


getGVMAttributeName

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


getKeyStrokeAttributeName

java.lang.String getKeyStrokeAttributeName()
get the name of the reserved attribute for keystrokes in this corpus (these are used mainly for ontologies to allow user-settable keystrokes associated with each member of an ontology)


getCommentAttributeName

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


getStreamElementName

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


getPointerElementName

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


getExternalPointerElementName

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)


getChildElementName

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


getTextElementName

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


getCVSProtocol

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


getCVSServer

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


getCVSModule

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


getCVSRepository

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


getCVSConnectionMethod

int getCVSConnectionMethod()
get the connection method used by CVS: returns either NiteMetaConstants.RSH or NiteMetaConstants.SSH


getCorpusDescription

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


getCorpusID

java.lang.String getCorpusID()
returns the identifier of the corpus


getRelativeOntologyPath

java.lang.String getRelativeOntologyPath()
returns the directory path where ontologies are stored for the corpus, as it is in the metadata file - relative to the metadata file (or absolute, if metadata author prefers).


getOntologyPath

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)


getRelativeStylePath

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 (or absolute, if metadata author prefers).


getStylePath

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)


getRelativeSignalPath

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 (or absolute, if metadata author prefers).


getSignalPath

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)


getSignalPathModifier

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.


getSignalPathModifier

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.


getRelativeCodingPath

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 (or absolute, if metadata author prefers).


getCodingPath

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 relcodingpath is absolute)


getRelativeObjectSetPath

java.lang.String getRelativeObjectSetPath()
returns the directory path where objectsets are stored for the corpus, as it is in the metadata file - relative to the metadata file (or absolute, if metadata author prefers).


getObjectSetPath

java.lang.String getObjectSetPath()
returns the directory path where objectsets are stored for the corpus - relative to the working directory in which java is running (or absolute if relobjectsetpath is absolute)


getRelativeCorpusResourcePath

java.lang.String getRelativeCorpusResourcePath()
returns the directory path where corpusresources are stored for the corpus, as it is in the metadata file - relative to the metadata file (or absolute, if metadata author prefers).


getCorpusResourcePath

java.lang.String getCorpusResourcePath()
returns the directory path where corpusresources are stored for the corpus - relative to the working directory in which java is running (or absolute if relcorpusresourcepath is absolute)


getLinkType

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


setCodingPath

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


setOntologyPath

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


setObjectSetPath

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


setCorpusResourcePath

void setCorpusResourcePath(java.lang.String path)
change the path where the corpus resources are loaded and serialized from & to


setStylePath

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


setCorpusID

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


setCorpusDescription

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


setLinkType

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


setValidation

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.


isValidating

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.


setStartTimeAttributeName

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


setEndTimeAttributeName

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


setIDAttributeName

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


setAgentAttributeName

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


setObservationAttributeName

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


setGVMAttributeName

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


setKeyStrokeAttributeName

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


setCommentAttributeName

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


setStreamElementName

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


setPointerElementName

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


setExternalPointerElementName

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


setChildElementName

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


setElementsAndAttributesToDefaults

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


writeMetaData

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


writeMetaData

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


getElementByName

NElement getElementByName(java.lang.String element_name)
Find the layer which contains the element called "element_name". It is an error for more than one layer to contain the same element.


findStyleWithName

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


findSignalWithName

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


getLayersByType

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


getFilename

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


setFilename

void setFilename(java.lang.String filename)
                 throws NiteMetaException
set the metadata filename for any future save

Throws:
NiteMetaException

findPathBetween

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


getValidPointersFrom

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


getValidPointersTo

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