|
|||||||||
| Home >> All >> org >> bdgp >> apps >> dagedit >> [ datamodel overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.bdgp.apps.dagedit.datamodel
Class Term

java.lang.Objectorg.bdgp.apps.dagedit.datamodel.Term
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable, javax.swing.undo.StateEditable
- public class Term
- extends java.lang.Object
- implements javax.swing.undo.StateEditable, java.lang.Cloneable, java.io.Serializable
- extends java.lang.Object
| Field Summary | |
private static int |
autoID
|
protected java.util.Vector |
categories
|
protected java.util.Vector |
children
|
protected java.lang.String |
comment
|
protected java.util.Vector |
danglingParents
|
private boolean |
debug
|
protected java.lang.String |
definition
|
protected java.util.Vector |
defReferences
|
protected int |
depth
|
protected java.lang.String |
id
|
private static int |
idgen
|
protected java.lang.String |
idPrefix
|
private int |
intid
|
protected java.util.Vector |
parents
|
protected int |
productCount
|
protected java.util.Vector |
references
|
protected boolean |
root
|
protected java.util.Vector |
synonyms
|
protected java.lang.String |
term
|
| Fields inherited from interface javax.swing.undo.StateEditable |
RCSID |
| Constructor Summary | |
Term(java.lang.String term)
|
|
Term(java.lang.String term,
java.lang.String id)
|
|
Term(java.lang.String term,
java.lang.String id,
boolean isRoot)
|
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
autoID
private static int autoID
term
protected java.lang.String term
definition
protected java.lang.String definition
comment
protected java.lang.String comment
id
protected java.lang.String id
idPrefix
protected java.lang.String idPrefix
root
protected boolean root
children
protected java.util.Vector children
parents
protected java.util.Vector parents
danglingParents
protected java.util.Vector danglingParents
synonyms
protected java.util.Vector synonyms
references
protected java.util.Vector references
defReferences
protected java.util.Vector defReferences
categories
protected java.util.Vector categories
depth
protected int depth
productCount
protected int productCount
intid
private int intid
idgen
private static int idgen
debug
private boolean debug
| Constructor Detail |
Term
public Term(java.lang.String term)
Term
public Term(java.lang.String term, java.lang.String id)
Term
public Term(java.lang.String term, java.lang.String id, boolean isRoot)
| Method Detail |
addCategory
public void addCategory(TermCategory category)
removeCategory
public void removeCategory(TermCategory category)
belongsToCategory
public boolean belongsToCategory(TermCategory category)
getCategories
public java.util.Vector getCategories()
setCategories
public void setCategories(java.util.Vector categories)
setRoot
public void setRoot(boolean root)
isRoot
public boolean isRoot()
getComment
public java.lang.String getComment()
setComment
public void setComment(java.lang.String comment)
formatID
public static java.lang.String formatID(java.lang.String prefix, int id, int length)
formatID
public static java.lang.String formatID(java.lang.String prefix, java.lang.String idStr, int length)
isObsolete
public boolean isObsolete()
isNonTriviallyObsolete
public boolean isNonTriviallyObsolete()
isNonTriviallyObsolete
private boolean isNonTriviallyObsolete(java.util.Hashtable lookedAt)
getPaths
public javax.swing.tree.TreePath[] getPaths()
getPathsAsVector
public java.util.Vector getPathsAsVector()
getRelationshipsToParent
public java.util.Vector getRelationshipsToParent(Term in)
getRelationshipsForChild
public java.util.Vector getRelationshipsForChild(Term in)
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
getProductCount
public int getProductCount()
setProductCount
public void setProductCount(int in)
equals
public boolean equals(Term other)
hashCode
public int hashCode()
- Description copied from class:
java.lang.Object - Get a value that represents this Object, as uniquely as
possible within the confines of an int.
There are some requirements on this method which subclasses must follow:
- Semantic equality implies identical hashcodes. In other
words, if
a.equals(b)is true, thena.hashCode() == b.hashCode()must be as well. However, the reverse is not necessarily true, and two objects may have the same hashcode without being equal. - It must be consistent. Whichever value o.hashCode() returns on the first invocation must be the value returned on all later invocations as long as the object exists. Notice, however, that the result of hashCode may change between separate executions of a Virtual Machine, because it is not invoked on the same object.
Notice that since
hashCodeis used in java.util.Hashtable and other hashing classes, a poor implementation will degrade the performance of hashing (so don't blindly implement it as returning a constant!). Also, if calculating the hash is time-consuming, a class may consider caching the results.The default implementation returns
System.identityHashCode(this) - Semantic equality implies identical hashcodes. In other
words, if
getTerm
public java.lang.String getTerm()
setTerm
public void setTerm(java.lang.String term)
getDefinition
public java.lang.String getDefinition()
setDefinition
public void setDefinition(java.lang.String definition)
getIDPrefix
public java.lang.String getIDPrefix()
setIDPrefix
public void setIDPrefix(java.lang.String idPrefix)
getID
public java.lang.String getID()
setID
public void setID(java.lang.String prefix, java.lang.String id)
setID
public void setID(java.lang.String id)
getIDSuffix
public java.lang.String getIDSuffix()
setIDSuffix
public void setIDSuffix(java.lang.String id)
getChildren
public java.util.Vector getChildren()
setChildren
public void setChildren(java.util.Vector children)
setParents
public void setParents(java.util.Vector parents)
addChild
public void addChild(Term child, TermRelationshipType type)
addChild
public void addChild(TermRelationship relation)
removeChild
public void removeChild(Term child)
removeChild
public void removeChild(TermRelationship relation)
removeParent
public void removeParent(Term parent)
removeParent
public void removeParent(TermRelationship relation)
addParent
public void addParent(Term parent, TermRelationshipType type)
addParent
public void addParent(TermRelationship relation)
getParents
public java.util.Vector getParents()
removeAllParents
public void removeAllParents()
addDanglingParent
public void addDanglingParent(DanglingRelationship relation)
removeDanglingParent
public void removeDanglingParent(DanglingRelationship relation)
getDanglingParents
public java.util.Vector getDanglingParents()
removeAllChildren
public void removeAllChildren()
getSynonyms
public java.util.Vector getSynonyms()
addSynonym
public void addSynonym(Synonym synonym)
setSynonyms
public void setSynonyms(java.util.Vector synonyms)
getDbxrefs
public java.util.Vector getDbxrefs()
addDbxref
public void addDbxref(Dbxref ref)
setDbxrefs
public void setDbxrefs(java.util.Vector refs)
getDefDbxrefs
public java.util.Vector getDefDbxrefs()
addDefDbxref
public void addDefDbxref(Dbxref ref)
setDefDbxrefs
public void setDefDbxrefs(java.util.Vector refs)
hasAncestor
public boolean hasAncestor(Term term)
hasAncestor
private boolean hasAncestor(Term term, java.util.HashSet lookedAt)
storeState
public void storeState(java.util.Hashtable in)
- Description copied from interface:
javax.swing.undo.StateEditable - Stores any editable state information into the specified hash
table.
- Specified by:
storeStatein interfacejavax.swing.undo.StateEditable
setIntID
private void setIntID(int in)
clone
public java.lang.Object clone()
- Description copied from class:
java.lang.Object - This method may be called to create a new copy of the
Object. The typical behavior is as follows:
o == o.clone()is falseo.getClass() == o.clone().getClass()is trueo.equals(o)is true
However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>
Object.equals(Object)55 .If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.
Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.
All array types implement Cloneable, and override this method as follows (it should never fail):
public Object clone() { try { super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.getMessage()); } }
restoreState
public void restoreState(java.util.Hashtable in)
- Description copied from interface:
javax.swing.undo.StateEditable - Performs an edit action, taking any editable state information
from the specified hash table.
Note to implementors of this interface: To increase efficiency, the
StateEditclass StateEdit.removeRedundantState()>StateEdit.removeRedundantState()55 removes redundant state information. Therefore, implementations of this interface must be prepared for the case where certain keys were stored into the table by StateEditable.storeState(java.util.Hashtable)>StateEditable.storeState(java.util.Hashtable)55 , but are not present anymore when therestoreStatemethod gets called.- Specified by:
restoreStatein interfacejavax.swing.undo.StateEditable
getRoot
public Term getRoot()
getAllDescendants
public java.util.Enumeration getAllDescendants()
getAllDescendants
public java.util.Enumeration getAllDescendants(boolean includeSelf)
getUniqueChildNodesHash
private static void getUniqueChildNodesHash(java.util.Hashtable hash, Term term)
getAllDescendantsHash
public java.util.Hashtable getAllDescendantsHash()
getAllDescendantsHash
public java.util.Hashtable getAllDescendantsHash(boolean includeSelf)
getAllAncestors
public java.util.Enumeration getAllAncestors()
getAllAncestors
public java.util.Enumeration getAllAncestors(boolean includeSelf)
getUniqueParentNodesHash
private static void getUniqueParentNodesHash(java.util.Hashtable hash, Term term)
getAllAncestorsHash
public java.util.Hashtable getAllAncestorsHash()
getAllAncestorsHash
public java.util.Hashtable getAllAncestorsHash(boolean includeSelf)
cloneParentTree
public static Term cloneParentTree(Term term)
- Creates a clone of all the nodes down to term. The leaves of the
cloned tree are term, NOT a clone of term. This means that
even though the cloned parents of term refer to term, term does
not contain a reference to those parents
cloneSubtree
public static Term cloneSubtree(Term in)
compareTo
public int compareTo(java.lang.Object in)
|
|||||||||
| Home >> All >> org >> bdgp >> apps >> dagedit >> [ datamodel overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.bdgp.apps.dagedit.datamodel.Term