edu.upenn.cis.pdtb
Class PDTBNodeImpl

java.lang.Object
  extended byedu.upenn.cis.pdtb.PDTBNodeImpl
All Implemented Interfaces:
javax.swing.tree.MutableTreeNode, PDTBNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
PDTBEntityRelationImpl, PDTBRelationImpl, PDTBRelationListImpl, PDTBSupImpl

public abstract class PDTBNodeImpl
extends java.lang.Object
implements PDTBNode

Author:
nikhild, geraud

Nested Class Summary
 class PDTBNodeImpl.PDTBAttributeImpl
           
 
Field Summary
protected  ArraySet fAttributes
           
protected static java.util.Comparator fAttributesComparator
           
static java.util.Comparator fAttributesPriorityComparator
           
 
Fields inherited from interface edu.upenn.cis.pdtb.PDTBNode
AltLexRelationQName, Arg1QName, Arg2QName, EntityRelationQName, ExplicitRelationQName, ImplicitRelationQName, NoRelationQName, RelationListQName, Sup1QName, Sup2QName
 
Constructor Summary
PDTBNodeImpl()
          Creates a new instance of PDTBNodeImpl
 
Method Summary
 java.util.Enumeration children()
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 javax.swing.tree.TreeNode getParent()
           
 java.lang.Object getUserObject()
           
protected abstract  void initAttributes()
           
 void insert(javax.swing.tree.MutableTreeNode child, int index)
           
 boolean isLeaf()
           
 void pdtbAddFirstChild(PDTBNode firstChild)
           
 void pdtbAddLastChild(PDTBNode lastChild)
           
 java.util.Enumeration pdtbGetAttributes()
           
 PDTBNode pdtbGetFirstChild()
           
 PDTBNode pdtbGetLastChild()
           
 java.lang.String pdtbGetLocalName()
           
 java.lang.String pdtbGetNamespaceUri()
           
 PDTBNode pdtbGetNextSibling()
           
 PDTBNode pdtbGetPreviousSibling()
           
 java.lang.String pdtbGetQName()
           
 void pdtbRemoveAttribute(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
           
 void pdtbSetAttribute(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, java.lang.String prefix, java.lang.String value, int priority)
           
 void pdtbSetName(java.lang.String namespaceUri, java.lang.String localName, java.lang.String qName)
           
 void pdtbSetNextSibling(PDTBNode node)
           
 void pdtbSetPreviousSibling(PDTBNode node)
           
 void remove(int index)
           
 void remove(javax.swing.tree.MutableTreeNode aChild)
           
 void removeFromParent()
           
abstract  void save(java.io.Writer writer)
           
 void setParent(javax.swing.tree.MutableTreeNode newParent)
           
 void setUserObject(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeNode
getAllowsChildren
 

Field Detail

fAttributes

protected ArraySet fAttributes

fAttributesComparator

protected static final java.util.Comparator fAttributesComparator

fAttributesPriorityComparator

public static final java.util.Comparator fAttributesPriorityComparator
Constructor Detail

PDTBNodeImpl

public PDTBNodeImpl()
Creates a new instance of PDTBNodeImpl

Method Detail

initAttributes

protected abstract void initAttributes()

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

insert

public void insert(javax.swing.tree.MutableTreeNode child,
                   int index)
Specified by:
insert in interface javax.swing.tree.MutableTreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

pdtbGetFirstChild

public PDTBNode pdtbGetFirstChild()
Specified by:
pdtbGetFirstChild in interface PDTBNode

pdtbGetLastChild

public PDTBNode pdtbGetLastChild()
Specified by:
pdtbGetLastChild in interface PDTBNode

pdtbGetNextSibling

public PDTBNode pdtbGetNextSibling()
Specified by:
pdtbGetNextSibling in interface PDTBNode

pdtbGetPreviousSibling

public PDTBNode pdtbGetPreviousSibling()
Specified by:
pdtbGetPreviousSibling in interface PDTBNode

pdtbAddFirstChild

public void pdtbAddFirstChild(PDTBNode firstChild)
Specified by:
pdtbAddFirstChild in interface PDTBNode

pdtbAddLastChild

public void pdtbAddLastChild(PDTBNode lastChild)
Specified by:
pdtbAddLastChild in interface PDTBNode

pdtbSetNextSibling

public void pdtbSetNextSibling(PDTBNode node)
Specified by:
pdtbSetNextSibling in interface PDTBNode

pdtbSetPreviousSibling

public void pdtbSetPreviousSibling(PDTBNode node)
Specified by:
pdtbSetPreviousSibling in interface PDTBNode

remove

public void remove(javax.swing.tree.MutableTreeNode aChild)
Specified by:
remove in interface javax.swing.tree.MutableTreeNode

remove

public void remove(int index)
Specified by:
remove in interface javax.swing.tree.MutableTreeNode

removeFromParent

public void removeFromParent()
Specified by:
removeFromParent in interface javax.swing.tree.MutableTreeNode

setParent

public void setParent(javax.swing.tree.MutableTreeNode newParent)
Specified by:
setParent in interface javax.swing.tree.MutableTreeNode

setUserObject

public void setUserObject(java.lang.Object object)
Specified by:
setUserObject in interface javax.swing.tree.MutableTreeNode

getUserObject

public java.lang.Object getUserObject()
Specified by:
getUserObject in interface PDTBNode

pdtbSetAttribute

public void pdtbSetAttribute(java.lang.String namespaceURI,
                             java.lang.String localName,
                             java.lang.String qName,
                             java.lang.String prefix,
                             java.lang.String value,
                             int priority)
Specified by:
pdtbSetAttribute in interface PDTBNode

pdtbRemoveAttribute

public void pdtbRemoveAttribute(java.lang.String namespaceURI,
                                java.lang.String localName,
                                java.lang.String qName)
Specified by:
pdtbRemoveAttribute in interface PDTBNode

pdtbGetAttributes

public java.util.Enumeration pdtbGetAttributes()
Specified by:
pdtbGetAttributes in interface PDTBNode

pdtbGetNamespaceUri

public java.lang.String pdtbGetNamespaceUri()
Specified by:
pdtbGetNamespaceUri in interface PDTBNode

pdtbGetLocalName

public java.lang.String pdtbGetLocalName()
Specified by:
pdtbGetLocalName in interface PDTBNode

pdtbGetQName

public java.lang.String pdtbGetQName()
Specified by:
pdtbGetQName in interface PDTBNode

pdtbSetName

public void pdtbSetName(java.lang.String namespaceUri,
                        java.lang.String localName,
                        java.lang.String qName)
Specified by:
pdtbSetName in interface PDTBNode

save

public abstract void save(java.io.Writer writer)
                   throws java.io.IOException
Throws:
java.io.IOException