|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ cdm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.greenstone.gatherer.cdm
Class ClassifierManager

java.lang.Objectjavax.swing.AbstractListModel
org.greenstone.gatherer.cdm.DOMProxyListModel
org.greenstone.gatherer.cdm.ClassifierManager
- All Implemented Interfaces:
- javax.swing.ListModel, java.io.Serializable
- public class ClassifierManager
- extends DOMProxyListModel
This class is responsible for keeping track of all the classifiers assigned to this collection, and providing methods for adding and removing them.
- Version:
- 2.3
| Nested Class Summary | |
private class |
ClassifierManager.ClassifierControl
A class which provides controls for assigned and editing classifiers. |
| Field Summary | |
private Control |
controls
The controls for editing the contents of this manager. |
private static java.awt.Dimension |
LABEL_SIZE
The default size for a label. |
private java.util.ArrayList |
library
A list of known, but currently unassigned, classifiers. |
private DOMProxyListModel |
model
|
| Fields inherited from class org.greenstone.gatherer.cdm.DOMProxyListModel |
root |
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Constructor Summary | |
ClassifierManager()
Constructor. |
|
| Method Summary | |
void |
addClassifier(Classifier classifier)
Method to add a new classifier to library. |
void |
assignClassifier(Classifier classifier)
Method to assign a classifier. |
void |
destroy()
Destructor. |
private java.lang.Object[] |
getAvailable()
|
Classifier |
getBaseClassifier(java.lang.String name)
|
Classifier |
getClassifier(int index)
Method to retrieve the classifier with the given index. |
private java.lang.String |
getClassifierName(java.io.File classifier)
Method to extract just the classifiers name from a file object. |
Control |
getControls()
Method to retrieve the control for this manager. |
java.util.ArrayList |
getHierarchyClassifiers()
|
boolean |
isPhindClassifierAssigned()
Determine if the Phind classifier has been assigned. |
private void |
loadClassifier(java.io.File classifier)
Method to load the details of a single plug-in. |
private void |
loadClassifiers()
Method to initially load information from the standard plug-ins within the gsdl Perl library. |
void |
moveClassifier(Classifier classifier,
boolean direction,
boolean all)
Method to move a classifier in the list order. |
private Classifier |
parseXML(org.w3c.dom.Node root)
Parses a DOM tree model turning it into a Classifier and its associated arguments. |
void |
removeClassifier(Classifier classifier)
This method removes an assigned classifier. |
void |
saveClassifiers()
Method to cache the current contents of library (known classifiers) to file. |
| Methods inherited from class org.greenstone.gatherer.cdm.DOMProxyListModel |
add, add, add, addAfter, addBefore, append, children, contains, getElementAt, getSize, indexOf, refresh, refresh, remove, remove, setRoot |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
LABEL_SIZE
private static final java.awt.Dimension LABEL_SIZE
- The default size for a label.
library
private java.util.ArrayList library
- A list of known, but currently unassigned, classifiers.
controls
private Control controls
- The controls for editing the contents of this manager.
model
private DOMProxyListModel model
| Constructor Detail |
ClassifierManager
public ClassifierManager()
- Constructor.
| Method Detail |
addClassifier
public void addClassifier(Classifier classifier)
- Method to add a new classifier to library.
assignClassifier
public void assignClassifier(Classifier classifier)
- Method to assign a classifier.
destroy
public void destroy()
- Destructor.
getBaseClassifier
public Classifier getBaseClassifier(java.lang.String name)
getClassifier
public Classifier getClassifier(int index)
- Method to retrieve the classifier with the given index.
getControls
public Control getControls()
- Method to retrieve the control for this manager.
getHierarchyClassifiers
public java.util.ArrayList getHierarchyClassifiers()
isPhindClassifierAssigned
public boolean isPhindClassifierAssigned()
- Determine if the Phind classifier has been assigned.
moveClassifier
public void moveClassifier(Classifier classifier, boolean direction, boolean all)
- Method to move a classifier in the list order.
removeClassifier
public void removeClassifier(Classifier classifier)
- This method removes an assigned classifier. I was tempted to call it unassign, but remove is more consistant. Note that there is no way to remove a classifier from the library.
saveClassifiers
public void saveClassifiers()
- Method to cache the current contents of library (known classifiers) to file.
getAvailable
private java.lang.Object[] getAvailable()
getClassifierName
private java.lang.String getClassifierName(java.io.File classifier)
- Method to extract just the classifiers name from a file object.
loadClassifier
private void loadClassifier(java.io.File classifier)
- Method to load the details of a single plug-in.
loadClassifiers
private void loadClassifiers()
- Method to initially load information from the standard plug-ins within the gsdl Perl library.
parseXML
private Classifier parseXML(org.w3c.dom.Node root)
- Parses a DOM tree model turning it into a Classifier and its associated arguments.
|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ cdm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC