net.sourceforge.nite.meta.impl
Class NiteLayer

java.lang.Object
  extended by net.sourceforge.nite.meta.impl.NiteLayer
All Implemented Interfaces:
NLayer

public class NiteLayer
extends java.lang.Object
implements NLayer

A layer as referred to in the metadata

Author:
jonathan

Field Summary
 
Fields inherited from interface net.sourceforge.nite.meta.NLayer
EXTERNAL_POINTER_LAYER, FEATURAL_LAYER, STRUCTURAL_LAYER, TIMED_LAYER
 
Constructor Summary
NiteLayer(java.lang.String name, int type, java.lang.Object container)
           
NiteLayer(java.lang.String name, int type, java.lang.Object container, java.lang.String childlayer, java.lang.String recursivechild, java.lang.String program, java.lang.String content, boolean inheritstime)
           
 
Method Summary
 void addParentLayer(NiteLayer layer)
           
 void addProgramArgument(java.lang.String parameter, java.lang.String value)
          the arguments to pass to the program associated with the external pointer for this layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.
 NLayer getChildLayer()
          Get the layer below this in the hierarchy.
 java.lang.String getChildLayerName()
          get the name of the layer from which this layer draws children
 java.lang.Object getContainer()
          Returns the container to which this layer belongs.
 java.util.List getContentElements()
          get the list of elements valid in this layer - returns an ArrayList of NElements
 java.lang.String getContentType()
          the content type of this external layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.
 int getLayerType()
          The type of the layer - returns TIMED_LAYER or FEATURAL_LAYER or STRUCTURAL_LAYER or EXTERNAL_POINTER_LAYER
 java.lang.String getName()
          the name of the layer
 NLayer getParentLayerInCoding(java.lang.Object contain)
          Find the parent layer in the given coding
 java.util.List getParentLayers()
          get the parent(s) of this layer - returns an ArrayList of NLayers
 java.lang.String getPointsTo()
          Deprecated. Use getChildLayerName()
 java.lang.String getProgram()
          This stores the program associated with the external pointer for this layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.
 java.util.List getProgramArguments()
          the arguments to pass to the program associated with the external pointer for this layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.
 boolean getRecursive()
          Whether the sub-layer is pointed to recursively
 boolean inheritsTime()
          return true if this layer can inherit time from lower layers.
 boolean isTopLayerInCoding()
          Return true if this is the top layer in a file.
 void setChildLayer(NiteLayer layer)
           
 void setContentElements(java.util.ArrayList elements)
          set the list of elements valid in this layer - takes an ArrayList of NElements
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NiteLayer

public NiteLayer(java.lang.String name,
                 int type,
                 java.lang.Object container,
                 java.lang.String childlayer,
                 java.lang.String recursivechild,
                 java.lang.String program,
                 java.lang.String content,
                 boolean inheritstime)

NiteLayer

public NiteLayer(java.lang.String name,
                 int type,
                 java.lang.Object container)
Method Detail

getName

public java.lang.String getName()
the name of the layer

Specified by:
getName in interface NLayer

getLayerType

public int getLayerType()
The type of the layer - returns TIMED_LAYER or FEATURAL_LAYER or STRUCTURAL_LAYER or EXTERNAL_POINTER_LAYER

Specified by:
getLayerType in interface NLayer

getContainer

public java.lang.Object getContainer()
Returns the container to which this layer belongs. Containers are one of NCoding, NOntology or NObjectSet

Specified by:
getContainer in interface NLayer

getParentLayers

public java.util.List getParentLayers()
get the parent(s) of this layer - returns an ArrayList of NLayers

Specified by:
getParentLayers in interface NLayer

getParentLayerInCoding

public NLayer getParentLayerInCoding(java.lang.Object contain)
Find the parent layer in the given coding

Specified by:
getParentLayerInCoding in interface NLayer

getChildLayer

public NLayer getChildLayer()
Description copied from interface: NLayer
Get the layer below this in the hierarchy. Note that this child may not be in the same NCoding.

Specified by:
getChildLayer in interface NLayer

setChildLayer

public void setChildLayer(NiteLayer layer)

addParentLayer

public void addParentLayer(NiteLayer layer)

getContentElements

public java.util.List getContentElements()
get the list of elements valid in this layer - returns an ArrayList of NElements

Specified by:
getContentElements in interface NLayer

setContentElements

public void setContentElements(java.util.ArrayList elements)
set the list of elements valid in this layer - takes an ArrayList of NElements


getRecursive

public boolean getRecursive()
Whether the sub-layer is pointed to recursively

Specified by:
getRecursive in interface NLayer

getPointsTo

public java.lang.String getPointsTo()
Deprecated. Use getChildLayerName()

get the name of the layer from which this layer draws children


getChildLayerName

public java.lang.String getChildLayerName()
get the name of the layer from which this layer draws children

Specified by:
getChildLayerName in interface NLayer

isTopLayerInCoding

public boolean isTopLayerInCoding()
Return true if this is the top layer in a file.

Specified by:
isTopLayerInCoding in interface NLayer

inheritsTime

public boolean inheritsTime()
return true if this layer can inherit time from lower layers. This allows us to have structural layers that have temporally overlapping children

Specified by:
inheritsTime in interface NLayer

getProgram

public java.lang.String getProgram()
This stores the program associated with the external pointer for this layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.

Specified by:
getProgram in interface NLayer

getContentType

public java.lang.String getContentType()
the content type of this external layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.

Specified by:
getContentType in interface NLayer

getProgramArguments

public java.util.List getProgramArguments()
the arguments to pass to the program associated with the external pointer for this layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.

Specified by:
getProgramArguments in interface NLayer

addProgramArgument

public void addProgramArgument(java.lang.String parameter,
                               java.lang.String value)
the arguments to pass to the program associated with the external pointer for this layer: this value will only ever be non-null when the layer type is EXTERNAL_POINTER_LAYER.

Specified by:
addProgramArgument in interface NLayer