net.sourceforge.nite.meta
Interface NElement

All Known Implementing Classes:
NiteElement

public interface NElement

NElement describes an element type. It simply comprises of its attributes or pointers. Valid parents and children are defined at the NLayer level.


Field Summary
static int CODING
           
static int CORPUSRESOURCE
           
static int OBJECTSET
           
static int ONTOLOGY
           
 
Method Summary
 NAttribute getAttributeByName(java.lang.String attr)
          find the NAttribute with the given name in this Element, or return null
 java.util.List getAttributes()
          Find the attributes for this element - returns a List of NAttributes
 java.lang.Object getContainer()
          returns the Object to which this element belongs.
 int getContainerType()
          returns the type of the container of this element: if it's an element in an ontology, this returns ONTOLOGY etc.
 java.awt.Color getDisplayColor()
          return the colour used to display this type of element on the OTAB.
 java.lang.String getExternalPointerRole()
          return the role of any external pointer for this element: will only ever be non-null for elements in layers of type EXTERNAL_POINTER_LAYER.
 NLayer getLayer()
          returns the NLayer to which this element belongs.
 java.lang.String getName()
          returns the name of the element
 java.util.List getPointers()
          find the valid pointers on this element - returns a List of NPointers
 boolean textContentPermitted()
          returns true if text content is permitted in this element.
 

Field Detail

CODING

static final int CODING
See Also:
Constant Field Values

ONTOLOGY

static final int ONTOLOGY
See Also:
Constant Field Values

OBJECTSET

static final int OBJECTSET
See Also:
Constant Field Values

CORPUSRESOURCE

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

getName

java.lang.String getName()
returns the name of the element


getAttributes

java.util.List getAttributes()
Find the attributes for this element - returns a List of NAttributes


getAttributeByName

NAttribute getAttributeByName(java.lang.String attr)
find the NAttribute with the given name in this Element, or return null


getPointers

java.util.List getPointers()
find the valid pointers on this element - returns a List of NPointers


getLayer

NLayer getLayer()
returns the NLayer to which this element belongs. Note that we disallow the use of the same element name in multiple layers.


getContainerType

int getContainerType()
returns the type of the container of this element: if it's an element in an ontology, this returns ONTOLOGY etc.


getContainer

java.lang.Object getContainer()
returns the Object to which this element belongs. This can be an NLayer, an NCorpusResource, an NOntology or an NObjectSet.


textContentPermitted

boolean textContentPermitted()
returns true if text content is permitted in this element. Note that since mixed content is disallowed, this will override any content model suggested by the layer to which this element belongs.


getDisplayColor

java.awt.Color getDisplayColor()
return the colour used to display this type of element on the OTAB. If no colour is set in the metadata or programatically, the return will be black


getExternalPointerRole

java.lang.String getExternalPointerRole()
return the role of any external pointer for this element: will only ever be non-null for elements in layers of type EXTERNAL_POINTER_LAYER.