|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NResourceData
Handles any resource file associated with a corpus: if present this must define all the information about where on disk codings live, and what competing versions of annotations exist.
| Method Summary | |
|---|---|
void |
addResource(java.lang.String coding,
NResource resource)
add a new resource |
void |
addResourceGroup(NResourceGroup nrg)
add a NResourceGroup element for resources that instantiate the named coding. |
void |
deleteResource(java.lang.String resourceid)
delete resource given its ID |
java.util.List |
getCoherentResourceGroups(java.lang.String coding)
Return the full list of real resources for a coding, except that if there are virtual resources, add them to the list and remove any resources they draw from. |
java.util.List |
getCoherentResourceGroups(java.lang.String coding,
java.lang.String observation)
Return the full list of real resources, except that if there are virtual resources, add them to the list and remove any resources they draw from. |
java.util.List |
getDefaultedResourcesForCoding(java.lang.String coding)
find a list of NResource elements that instantiate the named coding and have their default attribute set to true. |
java.util.List |
getIncompatibleResources(NResource res)
get a List of NResource elements that are incompatible with this one |
NResource |
getResourceByID(java.lang.String rid)
find a resource from its ID |
java.lang.String |
getResourceFilePath()
Return the path to the resource file (absolute) |
NResourceGroup |
getResourceGroupForCoding(java.lang.String coding)
find a NResourceGroup elements that instantiate the named coding. |
java.lang.String |
getResourcePath(NResource resource)
find the path to the resource: each resource has one location on disk which can be affected by: the location of the resource file (if paths are relative); the 'path' attribute of the resource-type element in the resource file; the 'path' attribute of the 'resource' element |
java.lang.String |
getResourcePath(java.lang.String resourceid)
find the path to the resource: each resource has one location on disk which can be affected by: the location of the resource file (if paths are relative); the 'path' attribute of the resource-type element in the resource file; the 'path' attribute of the 'resource' element |
java.util.List |
getResourcesForCoding(java.lang.String coding)
find a list of NResource elements that instantiate the named coding. |
java.util.List |
getVirtualResourcesForCoding(java.lang.String coding)
find a list of NVirtualResource elements that instantiate the named coding |
void |
setFilename(java.lang.String filename)
set the resource filename for any future save: relative paths are assumed to be relative to the metadata directory. |
void |
writeResourceFile()
save the resource file to the current filename (by default the file it was created from, or set using setFilename). |
void |
writeResourceFile(java.lang.String filename)
save the resource file to a file with the given filename. |
| Method Detail |
|---|
NResource getResourceByID(java.lang.String rid)
java.util.List getResourcesForCoding(java.lang.String coding)
java.util.List getDefaultedResourcesForCoding(java.lang.String coding)
java.util.List getVirtualResourcesForCoding(java.lang.String coding)
java.util.List getCoherentResourceGroups(java.lang.String coding)
java.util.List getCoherentResourceGroups(java.lang.String coding,
java.lang.String observation)
void deleteResource(java.lang.String resourceid)
void addResource(java.lang.String coding,
NResource resource)
java.lang.String getResourcePath(java.lang.String resourceid)
java.lang.String getResourcePath(NResource resource)
void writeResourceFile(java.lang.String filename)
void writeResourceFile()
void setFilename(java.lang.String filename)
java.lang.String getResourceFilePath()
java.util.List getIncompatibleResources(NResource res)
NResourceGroup getResourceGroupForCoding(java.lang.String coding)
void addResourceGroup(NResourceGroup nrg)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||