Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.greenstone.gatherer.cdm
Class SearchType  view SearchType download SearchType.java

java.lang.Object
  extended byorg.greenstone.gatherer.cdm.SearchType
All Implemented Interfaces:
java.lang.Comparable, DOMProxyListEntry

public class SearchType
extends java.lang.Object
implements DOMProxyListEntry

This class represents a single search type setting which means that, at the moment, it is either based on an Content element containing the string 'plain' or one on the string 'form'. The ordering of these elements within the SearchType element is important.

Version:
2.4

Field Summary
private  org.w3c.dom.Element element
          The Element this searchtype object will source its information from.
private  java.lang.String text
          A cached version of the string representation, for speed of painting (given toString() might be called several times during a list repaint).
 
Constructor Summary
SearchType()
          Constructor used only during DOMProxyListModel initialization.
SearchType(org.w3c.dom.Element element)
          Normal constructor.
SearchType(java.lang.String name)
          Creation of a brand new SearchType
 
Method Summary
 int compareTo(java.lang.Object object)
          Compare two objects for ordering.
 DOMProxyListEntry create(org.w3c.dom.Element element)
          Factory-like method to allow DOMProxyListModel to generate new entries.
 boolean equals(java.lang.Object object)
          Determine if this searchtype is equavilent to another object.
 org.w3c.dom.Element getElement()
          Retrieve the element this DOMProxyListEntry is based upon.
 java.lang.String getName()
          Retrieve the name of this searchtype.
 boolean isAssigned()
          Determine is this command has been assigned, either because it already existed in the collection configuration, or because it has been explicitly set by the user.
 void setAssigned(boolean assigned)
          Set the assigned state.
 void setElement(org.w3c.dom.Element element)
          Set the element that this DOMProxyListEntry is base on.
 void setName(java.lang.String name)
          Set the name of this searchtype.
 java.lang.String toString()
          Produce a text representation of this searchtype.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

element

private org.w3c.dom.Element element
The Element this searchtype object will source its information from.


text

private java.lang.String text
A cached version of the string representation, for speed of painting (given toString() might be called several times during a list repaint).

Constructor Detail

SearchType

public SearchType()
Constructor used only during DOMProxyListModel initialization.


SearchType

public SearchType(org.w3c.dom.Element element)
Normal constructor.


SearchType

public SearchType(java.lang.String name)
Creation of a brand new SearchType

Method Detail

compareTo

public int compareTo(java.lang.Object object)
Compare two objects for ordering.

Specified by:
compareTo in interface java.lang.Comparable

create

public DOMProxyListEntry create(org.w3c.dom.Element element)
Factory-like method to allow DOMProxyListModel to generate new entries.

Specified by:
create in interface DOMProxyListEntry

equals

public boolean equals(java.lang.Object object)
Determine if this searchtype is equavilent to another object.


getElement

public org.w3c.dom.Element getElement()
Retrieve the element this DOMProxyListEntry is based upon. Specified by the interface.

Specified by:
getElement in interface DOMProxyListEntry

getName

public java.lang.String getName()
Retrieve the name of this searchtype.


isAssigned

public boolean isAssigned()
Determine is this command has been assigned, either because it already existed in the collection configuration, or because it has been explicitly set by the user. Non-assigned entries imply they have been added by the GLI to ensure consistancy (and avoid NPE's!)

Specified by:
isAssigned in interface DOMProxyListEntry

setAssigned

public void setAssigned(boolean assigned)
Set the assigned state.

Specified by:
setAssigned in interface DOMProxyListEntry

setElement

public void setElement(org.w3c.dom.Element element)
Set the element that this DOMProxyListEntry is base on.

Specified by:
setElement in interface DOMProxyListEntry

setName

public void setName(java.lang.String name)
Set the name of this searchtype.


toString

public java.lang.String toString()
Produce a text representation of this searchtype.