net.sourceforge.nite.nom.nomwrite.impl
Class NOMWriteObject

java.lang.Object
  extended by net.sourceforge.nite.nom.nomwrite.impl.NOMWriteElement
      extended by net.sourceforge.nite.nom.nomwrite.impl.NOMWriteObject
All Implemented Interfaces:
NOMElement, NOMObject

public class NOMWriteObject
extends NOMWriteElement
implements NOMObject

NOMObject extends NOMElement and represents an element within an object set. Such elements extend NOMElement so that they can be used in the query language. Objects may not have any children.

Author:
jonathan

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.nite.nom.nomwrite.impl.NOMWriteElement
NOMWriteElement.SharedElement, NOMWriteElement.XMLComment
 
Nested classes/interfaces inherited from interface net.sourceforge.nite.nom.nomwrite.NOMElement
NOMElement.SharedEl
 
Field Summary
 
Fields inherited from interface net.sourceforge.nite.nom.nomwrite.NOMElement
FEATURAL_LAYER, IMPLICIT_ORDER, STRUCTURAL_LAYER, TEMPORAL_ORDER, TIME_ALIGNED_LAYER, UNORDERED, UNTIMED
 
Constructor Summary
NOMWriteObject(NOMCorpus corpus, java.lang.String name)
          This constructor will be the most commonly used in application programs.
 
Method Summary
 void addChild(NOMElement child)
          adds a child to this element.
 void addChildAfter(NOMElement oldchild, NOMElement newchild)
          adds the NOMElement newchild immediately after the given existing child, or reports an exception if the child cannot be found
 void addChildBefore(NOMElement oldchild, NOMElement newchild)
          adds the NOMElement newchild immediately before the given existing child, or reports an exception if the child cannot be found
 void addFirstChild(NOMElement child)
          adds the NOMElement as the first child
 void addLastChild(NOMElement child)
          adds the NOMElement as the last child
 void deleteChild(NOMElement child)
          Delete an element.
 void removeChild(NOMElement child)
          Remove a nite:child from an element without actually deleting the element referred to.
 
Methods inherited from class net.sourceforge.nite.nom.nomwrite.impl.NOMWriteElement
addAfterSibling, addAttribute, addBeforeSibling, addChildAboveChildren, addExternalPointer, addPointer, addToCorpus, appendText, endElementString, findAncestorInLayer, findAncestorNamed, findAncestorsInFile, findAncestorsInLayer, findAncestorsNamed, findCommonAncestorInFile, findDescendantsInLayer, findDescendantsNamed, getAgent, getAgentName, getAttribute, getAttributeComparableValue, getAttributes, getChildOrder, getChildren, getChildrenWithInterleavedComments, getColour, getComment, getCorpus, getEndTime, getExternalPointerValue, getGVM, getID, getIDLink, getKeyStroke, getLayer, getLink, getMetadataElement, getName, getNextElement, getNextSibling, getNiteChildren, getObservation, getParentInFile, getParents, getPointers, getPointersTo, getPointerWithRole, getPreviousSibling, getRecursiveDepth, getRecursiveHeight, getShared, getStartTime, getText, getTimeType, getXLink, hasNextElement, inheritTimes, insertParent, isComment, isLeaf, isStreamElement, isStreamElementOld, removeAttribute, removeParentAndAdjust, removePointer, setComment, setDoubleAttribute, setEndTime, setGVM, setKeyStroke, setName, setStartTime, setStreamElement, setStringAttribute, setText, startElementString, updateTimes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.nite.nom.nomwrite.NOMElement
addAfterSibling, addAttribute, addBeforeSibling, addChildAboveChildren, addExternalPointer, addPointer, addToCorpus, appendText, findAncestorInLayer, findAncestorNamed, findAncestorsInFile, findAncestorsInLayer, findAncestorsNamed, findCommonAncestorInFile, findDescendantsInLayer, findDescendantsNamed, getAgent, getAgentName, getAttribute, getAttributeComparableValue, getAttributes, getChildOrder, getChildren, getChildrenWithInterleavedComments, getColour, getComment, getCorpus, getEndTime, getExternalPointerValue, getGVM, getID, getKeyStroke, getLayer, getLink, getMetadataElement, getName, getNextElement, getNextSibling, getObservation, getParentInFile, getParents, getPointers, getPointersTo, getPointerWithRole, getPreviousSibling, getRecursiveDepth, getRecursiveHeight, getShared, getStartTime, getText, getTimeType, getXLink, hasNextElement, insertParent, isComment, isStreamElement, removeAttribute, removeParentAndAdjust, removePointer, setComment, setDoubleAttribute, setEndTime, setGVM, setKeyStroke, setName, setStartTime, setStreamElement, setStringAttribute, setText
 

Constructor Detail

NOMWriteObject

public NOMWriteObject(NOMCorpus corpus,
                      java.lang.String name)
               throws NOMException
This constructor will be the most commonly used in application programs. The colour of the element is derived from the metadata and the ID is derived from that. IDs generated will be unique with respect to the corpus subset that is currently loaded.

Throws:
NOMException
Method Detail

addFirstChild

public void addFirstChild(NOMElement child)
                   throws NOMException
adds the NOMElement as the first child

Specified by:
addFirstChild in interface NOMElement
Overrides:
addFirstChild in class NOMWriteElement
Throws:
NOMException

addLastChild

public void addLastChild(NOMElement child)
                  throws NOMException
adds the NOMElement as the last child

Specified by:
addLastChild in interface NOMElement
Overrides:
addLastChild in class NOMWriteElement
Throws:
NOMException

addChildBefore

public void addChildBefore(NOMElement oldchild,
                           NOMElement newchild)
                    throws NOMException
adds the NOMElement newchild immediately before the given existing child, or reports an exception if the child cannot be found

Specified by:
addChildBefore in interface NOMElement
Overrides:
addChildBefore in class NOMWriteElement
Throws:
NOMException

addChildAfter

public void addChildAfter(NOMElement oldchild,
                          NOMElement newchild)
                   throws NOMException
adds the NOMElement newchild immediately after the given existing child, or reports an exception if the child cannot be found

Specified by:
addChildAfter in interface NOMElement
Overrides:
addChildAfter in class NOMWriteElement
Throws:
NOMException

removeChild

public void removeChild(NOMElement child)
                 throws NOMException
Remove a nite:child from an element without actually deleting the element referred to. Throw an error if we're trying to remove the child from its serialized parent.

Specified by:
removeChild in interface NOMElement
Overrides:
removeChild in class NOMWriteElement
Throws:
NOMException

deleteChild

public void deleteChild(NOMElement child)
                 throws NOMException
Delete an element. Remove the child from all its parents. Ranges need to be handled separately (in a different thread?)

Specified by:
deleteChild in interface NOMElement
Overrides:
deleteChild in class NOMWriteElement
Throws:
NOMException

addChild

public void addChild(NOMElement child)
              throws NOMException
adds a child to this element. Since no order is specified, add the child to the end of the list of children.

Specified by:
addChild in interface NOMElement
Overrides:
addChild in class NOMWriteElement
Throws:
NOMException