|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.nite.nom.nomwrite.impl.NOMWriteContext
public class NOMWriteContext
NOMWriteContext holds information about the currently loaded files.
| Field Summary |
|---|
| Fields inherited from interface net.sourceforge.nite.nom.nomwrite.NOMContext |
|---|
METADATA, METADATA_MULTI, RESOURCE, RESOURCE_MULTI, UNLOADED |
| Constructor Summary | |
|---|---|
NOMWriteContext(NOMCorpus corpus)
constructor takes the NOM that we have information about |
|
| Method Summary | |
|---|---|
void |
addFile(java.lang.String observation,
NFile nfile,
java.lang.String filename,
int type,
NResource resource,
java.lang.String annotator)
add a loaded file to the context store - caller must work out type and should pass resource only if it's a resource load and annotator only if it's an old-style multi-annotator load. |
void |
clear()
clear information about loaded data |
void |
clear(java.lang.String observation)
clear information about loaded data for the given observation |
java.util.List |
getAnnotators(java.lang.String observation,
NFile nfile)
only returns a non-null List if the load type is METADATA_MULTI - if so, returns a List of String elements: the annotators IDs |
java.util.List |
getLoadedNFilesForObservation(java.lang.String observation)
return a List of NFile elements that have some loaded data corresponding to them for the given observation name. |
java.util.List |
getLoadedObservationNames()
|
int |
getLoadType(java.lang.String observation,
NFile nfile)
|
NResource |
getResource(java.lang.String observation,
NFile nfile)
only returns a non-null List if the load type RESOURCE - if so, returns the NResource itself |
java.util.List |
getResourceDescriptions(java.lang.String observation,
NFile nfile)
Only returns a non-null List if the type is RESOURCE or RESOURCE_MULTI - return all resources loaded for this combination of observation and NFile as a List of Strings: the result of calling getDescription on each NResource. |
java.util.List |
getResourceIDs(java.lang.String observation,
NFile nfile)
Only returns a non-null List if the type is RESOURCE or RESOURCE_MULTI - return all resources loaded for this combination of observation and NFile as a List of Strings: the result of calling getID on each NResource. |
java.util.Set |
getResources(java.lang.String observation,
NFile nfile)
Only returns a non-null Set if the type is RESOURCE or RESOURCE_MULTI - return all resources loaded for this combination of observation and NFile as a Set of NResource elements. |
java.lang.String |
getTextualContext()
return a String containing the context in plain text - formatted for human reading |
java.util.List |
getUnloadedNFilesForObservation(java.lang.String observation)
return a List of NFile elements that have no loaded data corresponding to them for the given observation name. |
java.lang.String |
getXMLContext()
return an XML formatted String containing the context |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NOMWriteContext(NOMCorpus corpus)
| Method Detail |
|---|
public java.util.List getLoadedObservationNames()
getLoadedObservationNames in interface NOMContext
public int getLoadType(java.lang.String observation,
NFile nfile)
getLoadType in interface NOMContext
public java.util.List getAnnotators(java.lang.String observation,
NFile nfile)
getAnnotators in interface NOMContext
public NResource getResource(java.lang.String observation,
NFile nfile)
getResource in interface NOMContext
public java.util.Set getResources(java.lang.String observation,
NFile nfile)
getResources in interface NOMContext
public java.util.List getResourceDescriptions(java.lang.String observation,
NFile nfile)
getResourceDescriptions in interface NOMContext
public java.util.List getResourceIDs(java.lang.String observation,
NFile nfile)
getResourceIDs in interface NOMContextpublic java.util.List getLoadedNFilesForObservation(java.lang.String observation)
getLoadedNFilesForObservation in interface NOMContextpublic java.util.List getUnloadedNFilesForObservation(java.lang.String observation)
getUnloadedNFilesForObservation in interface NOMContextpublic java.lang.String getTextualContext()
getTextualContext in interface NOMContextpublic java.lang.String getXMLContext()
getXMLContext in interface NOMContextpublic void clear()
clear in interface NOMContextpublic void clear(java.lang.String observation)
clear in interface NOMContext
public void addFile(java.lang.String observation,
NFile nfile,
java.lang.String filename,
int type,
NResource resource,
java.lang.String annotator)
addFile in interface NOMContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||