|
|||||||||
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 NMetaData
public void writeMetaData(java.lang.String filename)
writeMetaData
in interface NMetaData
public NStyle findStyleWithName(java.lang.String name)
findStyleWithName
in interface NMetaData
public NSignal findSignalWithName(java.lang.String name)
findSignalWithName
in interface NMetaData
public NiteLayer findLayerWithName(java.lang.String name)
public java.lang.String getCorpusDescription()
getCorpusDescription
in interface NMetaData
public void setCorpusDescription(java.lang.String description)
setCorpusDescription
in interface NMetaData
public java.lang.String getCorpusID()
getCorpusID
in interface NMetaData
public void setCorpusID(java.lang.String id)
setCorpusID
in interface NMetaData
public int getCorpusType()
getCorpusType
in interface NMetaData
public int getLinkType()
getLinkType
in interface NMetaData
public void setLinkType(int linktype)
setLinkType
in interface NMetaData
public void setValidation(boolean validate)
setValidation
in interface NMetaData
public boolean isValidating()
isValidating
in interface NMetaData
public java.util.List getAgents()
getAgents
in interface NMetaData
public java.util.List getPrograms()
getPrograms
in interface NMetaData
public java.util.List getDataViews()
getDataViews
in interface NMetaData
public java.util.List getSignals()
getSignals
in interface NMetaData
public java.util.List getObservationVariables()
getObservationVariables
in interface NMetaData
public java.util.List getObservations()
getObservations
in interface NMetaData
public NObservation getObservationWithName(java.lang.String obsname)
getObservationWithName
in interface NMetaData
public 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 NMetaData
public NStyle getStyleWithName(java.lang.String name)
getStyleWithName
in interface NMetaData
public java.lang.String getFilename()
getFilename
in interface NMetaData
public void setFilename(java.lang.String filename) throws NiteMetaException
setFilename
in interface NMetaData
NiteMetaException
public java.lang.String getChildElementName()
getChildElementName
in interface NMetaData
public java.lang.String getPointerElementName()
getPointerElementName
in interface NMetaData
public java.lang.String getExternalPointerElementName()
getExternalPointerElementName
in interface NMetaData
public void setExternalPointerElementName(java.lang.String pointer_name)
setExternalPointerElementName
in interface NMetaData
public void setPointerElementName(java.lang.String pointer_name)
setPointerElementName
in interface NMetaData
public void setChildElementName(java.lang.String child_name)
setChildElementName
in interface NMetaData
public java.lang.String getStreamElementName()
getStreamElementName
in interface NMetaData
public void setStreamElementName(java.lang.String element_name)
setStreamElementName
in interface NMetaData
public java.lang.String getTextElementName()
getTextElementName
in interface NMetaData
public java.lang.String getStartTimeAttributeName()
getStartTimeAttributeName
in interface NMetaData
public java.lang.String getEndTimeAttributeName()
getEndTimeAttributeName
in interface NMetaData
public void setStartTimeAttributeName(java.lang.String start)
setStartTimeAttributeName
in interface NMetaData
public void setEndTimeAttributeName(java.lang.String end)
setEndTimeAttributeName
in interface NMetaData
public java.lang.String getIDAttributeName()
getIDAttributeName
in interface NMetaData
public void setIDAttributeName(java.lang.String id)
setIDAttributeName
in interface NMetaData
public java.lang.String getCommentAttributeName()
getCommentAttributeName
in interface NMetaData
public void setCommentAttributeName(java.lang.String comment)
setCommentAttributeName
in interface NMetaData
public java.lang.String getAgentAttributeName()
getAgentAttributeName
in interface NMetaData
public void setAgentAttributeName(java.lang.String agent)
setAgentAttributeName
in interface NMetaData
public java.lang.String getObservationAttributeName()
getObservationAttributeName
in interface NMetaData
public void setObservationAttributeName(java.lang.String observation)
setObservationAttributeName
in interface NMetaData
public java.lang.String getKeyStrokeAttributeName()
getKeyStrokeAttributeName
in interface NMetaData
public void setKeyStrokeAttributeName(java.lang.String key)
setKeyStrokeAttributeName
in interface NMetaData
public java.lang.String getGVMAttributeName()
getGVMAttributeName
in interface NMetaData
public void setGVMAttributeName(java.lang.String GVM)
setGVMAttributeName
in interface NMetaData
public void setElementsAndAttributesToDefaults()
setElementsAndAttributesToDefaults
in interface NMetaData
public java.lang.String getCVSProtocol()
getCVSProtocol
in interface NMetaData
public java.lang.String getCVSServer()
getCVSServer
in interface NMetaData
public java.lang.String getCVSModule()
getCVSModule
in interface NMetaData
public java.lang.String getCVSRepository()
getCVSRepository
in interface NMetaData
public int getCVSConnectionMethod()
getCVSConnectionMethod
in interface NMetaData
public java.lang.String getRelativeStylePath()
getRelativeStylePath
in interface NMetaData
public java.lang.String getStylePath()
getStylePath
in interface NMetaData
public void setStylePath(java.lang.String path)
setStylePath
in interface NMetaData
public java.lang.String getAnnotationSpecPath()
public java.lang.String getRelativeCodingPath()
getRelativeCodingPath
in interface NMetaData
public java.lang.String getCodingPath()
getCodingPath
in interface NMetaData
public void setCodingPath(java.lang.String path)
setCodingPath
in interface NMetaData
public java.lang.String getRelativeSignalPath()
getRelativeSignalPath
in interface NMetaData
public java.lang.String getSignalPath()
getSignalPath
in interface NMetaData
public java.lang.String getSignalPathModifier(NObservation obs)
getSignalPathModifier
in interface NMetaData
public java.lang.String getSignalPathModifier(java.lang.String obs)
getSignalPathModifier
in interface NMetaData
public java.lang.String getRelativeOntologyPath()
getRelativeOntologyPath
in interface NMetaData
public java.lang.String getOntologyPath()
getOntologyPath
in interface NMetaData
public void setOntologyPath(java.lang.String path)
setOntologyPath
in interface NMetaData
public java.util.List getOntologies()
getOntologies
in interface NMetaData
public java.util.List getObjectSets()
getObjectSets
in interface NMetaData
public java.lang.String getRelativeObjectSetPath()
getRelativeObjectSetPath
in interface NMetaData
public java.lang.String getObjectSetPath()
getObjectSetPath
in interface NMetaData
public void setObjectSetPath(java.lang.String path)
setObjectSetPath
in interface NMetaData
public java.util.List getCorpusResources()
getCorpusResources
in interface NMetaData
public java.lang.String getRelativeCorpusResourcePath()
getRelativeCorpusResourcePath
in interface NMetaData
public java.lang.String getCorpusResourcePath()
getCorpusResourcePath
in interface NMetaData
public void setCorpusResourcePath(java.lang.String path)
setCorpusResourcePath
in interface NMetaData
public java.util.List getCodings()
NMetaData
getCodings
in interface NMetaData
public NCoding getCodingByName(java.lang.String name)
getCodingByName
in interface NMetaData
public NLayer getLayerByName(java.lang.String name)
getLayerByName
in interface NMetaData
public NObjectSet getObjectSetByName(java.lang.String name)
getObjectSetByName
in interface NMetaData
public NOntology getOntologyByName(java.lang.String name)
getOntologyByName
in interface NMetaData
public NCorpusResource getCorpusResourceByName(java.lang.String name)
getCorpusResourceByName
in interface NMetaData
public java.util.List getAllElements()
getAllElements
in interface NMetaData
public NElement getElementByName(java.lang.String element_name)
getElementByName
in interface NMetaData
public 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 NMetaData
public java.util.Set getValidPointersFrom(NLayer lay)
getValidPointersFrom
in interface NMetaData
public 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 |