net.sourceforge.nite.meta.impl
Class NiteVirtualResource

java.lang.Object
  extended by net.sourceforge.nite.meta.impl.NiteVirtualResource
All Implemented Interfaces:
NResource, NVirtualResource

public class NiteVirtualResource
extends java.lang.Object
implements NVirtualResource

A virtual resource is a grouping of other resources, for example a gold-standard set that can be used by multiple automatic processes. Methods are provided for querying its dependencies.

Author:
jonathan

Constructor Summary
NiteVirtualResource(NResourceGroup nrg, java.lang.String id, java.lang.String def)
           
 
Method Summary
 void addDependency(NResource res, java.lang.String observation)
          add a dependency with resource resolved and observation (regexp) as a String
 void addDependency(java.lang.String res, java.lang.String observation)
          add a dependency with resource and observation (regexp) as Strings
 boolean dependsOn(NResource depresource)
          returns true if this resource can trace a dependency on the given resource for any observation (i.e.
 java.lang.String getCoding()
          return the name of the coding this virtual resource implements
 java.util.List getDependencies()
          return a List of NResourceDependency elements
 java.lang.String getDescription()
          return the textual description of this resource
 java.lang.String getID()
          return the ID of this virtual resource
 java.lang.String getIncompatibleID()
          return the value of the 'notloadedwith' attribute - i.e.
 NResourceGroup getResourceGroup()
          return the NResourceGroup to which this NResource belongs
 boolean isDefault()
          return true if this resource has a 'default' attribute that is set to 'true'
 void setIncompatibleID(java.lang.String inc)
          set the value of the 'notloadedwith' attribute - i.e.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NiteVirtualResource

public NiteVirtualResource(NResourceGroup nrg,
                           java.lang.String id,
                           java.lang.String def)
Method Detail

getCoding

public java.lang.String getCoding()
return the name of the coding this virtual resource implements

Specified by:
getCoding in interface NResource

getID

public java.lang.String getID()
return the ID of this virtual resource

Specified by:
getID in interface NResource

addDependency

public void addDependency(java.lang.String res,
                          java.lang.String observation)
add a dependency with resource and observation (regexp) as Strings

Specified by:
addDependency in interface NResource

addDependency

public void addDependency(NResource res,
                          java.lang.String observation)
add a dependency with resource resolved and observation (regexp) as a String

Specified by:
addDependency in interface NResource

getDependencies

public java.util.List getDependencies()
return a List of NResourceDependency elements

Specified by:
getDependencies in interface NResource

dependsOn

public boolean dependsOn(NResource depresource)
returns true if this resource can trace a dependency on the given resource for any observation (i.e. it has a direct or indirect dependency)

Specified by:
dependsOn in interface NResource

getResourceGroup

public NResourceGroup getResourceGroup()
return the NResourceGroup to which this NResource belongs

Specified by:
getResourceGroup in interface NResource

isDefault

public boolean isDefault()
return true if this resource has a 'default' attribute that is set to 'true'

Specified by:
isDefault in interface NResource

getDescription

public java.lang.String getDescription()
return the textual description of this resource

Specified by:
getDescription in interface NResource

getIncompatibleID

public java.lang.String getIncompatibleID()
return the value of the 'notloadedwith' attribute - i.e. an ID of a resource that should never be loaded with this one.

Specified by:
getIncompatibleID in interface NResource

setIncompatibleID

public void setIncompatibleID(java.lang.String inc)
set the value of the 'notloadedwith' attribute - i.e. an ID of a resource that should never be loaded with this one.

Specified by:
setIncompatibleID in interface NResource