|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultTreeModel
com.facetmap.simple.SimpleTaxonomy
There is a big problem with this class; namely, its Headings are stored in two different structures, neither of which is really definitive, and both of which are used. One of them (probably the Vector) must be eliminated soon.
| Field Summary | |
protected java.util.Vector |
index
|
protected java.util.Hashtable |
nameMap
|
protected java.lang.String |
stringId
|
protected java.lang.String |
title
|
| Fields inherited from class javax.swing.tree.DefaultTreeModel |
asksAllowsChildren, listenerList, root |
| Constructor Summary | |
|
SimpleTaxonomy(java.lang.String id,
java.lang.String title,
SimpleTaxHeading root)
|
protected |
SimpleTaxonomy(java.lang.String stringId,
java.lang.String title,
SimpleTaxHeading root,
java.lang.String rootName)
|
|
SimpleTaxonomy(java.lang.String id,
java.lang.String title,
java.lang.String rootHeadingTitle)
Construct Taxonomy with a dummy root Heading -- not recommended. |
| Method Summary | |
void |
appendHeadingInto(TaxonomicHeading child,
TaxonomicHeading parent)
Convenience method to insert a heading into a parent heading, in a position after all existing children. |
boolean |
containsHeading(java.lang.String name)
|
TaxonomicHeading |
createTaxonomicHeading(java.lang.String id,
java.lang.String title)
Creates a new Heading suitable for adding to this Taxonomy. |
void |
doAddToFacetSpace()
Contains any custom processing that must be done when this structure is added to a FacetSpace. |
Heading |
getHeading(java.lang.String name)
Retrieves the Heading, with the specified ID, that is contained by this Facet. |
int |
getHeadingCount()
|
java.lang.String |
getId()
Unique identifier. |
Heading |
getRootHeading()
A facet structure is rooted at the heading returned by this method. |
java.lang.String |
getStringId()
|
TaxonomicHeading |
getTaxonomicHeading(java.lang.String name)
|
java.lang.String |
getTitle()
The descriptive name of this structure, for display to users. |
void |
insertHeadingInto(TaxonomicHeading child,
TaxonomicHeading parent,
int indexWithinParent)
A special subclass method that accommodates the index. |
protected void |
setStringId(java.lang.String stringId)
|
void |
setTitle(java.lang.String title)
|
int |
size()
|
| Methods inherited from class javax.swing.tree.DefaultTreeModel |
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String title
protected java.lang.String stringId
protected java.util.Vector index
protected java.util.Hashtable nameMap
| Constructor Detail |
public SimpleTaxonomy(java.lang.String id,
java.lang.String title,
java.lang.String rootHeadingTitle)
public SimpleTaxonomy(java.lang.String id,
java.lang.String title,
SimpleTaxHeading root)
protected SimpleTaxonomy(java.lang.String stringId,
java.lang.String title,
SimpleTaxHeading root,
java.lang.String rootName)
| Method Detail |
public int getHeadingCount()
getHeadingCount in interface Taxonomypublic java.lang.String getId()
Facet
getId in interface Facet
public TaxonomicHeading createTaxonomicHeading(java.lang.String id,
java.lang.String title)
Taxonomy
createTaxonomicHeading in interface Taxonomypublic Heading getRootHeading()
Facet
getRootHeading in interface FacetSelection.getForwardSelections(int)
public void insertHeadingInto(TaxonomicHeading child,
TaxonomicHeading parent,
int indexWithinParent)
throws java.lang.IllegalArgumentException
insertHeadingInto in interface Taxonomyjava.lang.IllegalArgumentException - if you break the tree model
public void appendHeadingInto(TaxonomicHeading child,
TaxonomicHeading parent)
throws java.lang.IllegalArgumentException
appendHeadingInto in interface Taxonomyjava.lang.IllegalArgumentException
public Heading getHeading(java.lang.String name)
throws UnknownReferenceException
Facet
getHeading in interface TaxonomyUnknownReferenceException
public TaxonomicHeading getTaxonomicHeading(java.lang.String name)
throws UnknownReferenceException
getTaxonomicHeading in interface TaxonomyUnknownReferenceExceptionpublic boolean containsHeading(java.lang.String name)
containsHeading in interface Taxonomypublic int size()
public void setTitle(java.lang.String title)
setTitle in interface Facetpublic java.lang.String getTitle()
Facet
getTitle in interface Facetprotected void setStringId(java.lang.String stringId)
public java.lang.String getStringId()
public void doAddToFacetSpace()
Facet
doAddToFacetSpace in interface Facet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||