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

Quick Search    Search Deep

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

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

public class Index
extends java.lang.Object
implements java.lang.Comparable, DOMProxyListEntry

This class encapsulates a single indexing pair.

Version:
2.3d

Field Summary
private  org.w3c.dom.Element element
          The element this index is based upon.
private  java.lang.String id
          The unique, if cryptic, identifier of an index.
private  int level
          The level of this index (if old sckool MG).
static java.lang.String[] LEVEL
          An values of items in the index level enumeration.
private  java.util.ArrayList sources
           
 
Constructor Summary
Index()
          Default constructor, which should only be used during DOMProxyListModel creation.
Index(java.util.ArrayList sources)
          Constructor for a newly assigned index.
Index(org.w3c.dom.Element element)
          Constructor.
Index(int level, java.util.ArrayList sources)
          Constructor for a newly assigned index with specified level (old skool).
Index(java.lang.String level, java.util.ArrayList sources)
           
 
Method Summary
 int compareTo(java.lang.Object object)
          Method to compare two indexes.
 DOMProxyListEntry create(org.w3c.dom.Element element)
           
 boolean equals(java.lang.Object object)
          Method to test for the equality of two indexes.
 org.w3c.dom.Element getElement()
           
 java.lang.String getID()
           
 int getLevel()
          Method to get the value of level.
 java.lang.String getName()
          Tries to retrieve this indexes name according to the CollectionMetaManager.
 java.util.ArrayList getSources()
          Retrieve the sources of this index.
 boolean isAssigned()
           
 void setAssigned(boolean assigned)
           
 void setElement(org.w3c.dom.Element element)
           
 void setLevel(int new_level)
          Method to set the level of this index which can only be used for the default index.
 void setSources(java.util.ArrayList sources)
          Method to set the sources for this index which can only be used for the default index.
 java.lang.String toString()
          Method to turn this object into a string representation ready to be placed in the collection configuration file.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEVEL

public static final java.lang.String[] LEVEL
An values of items in the index level enumeration.


sources

private java.util.ArrayList sources

level

private int level
The level of this index (if old sckool MG).


element

private org.w3c.dom.Element element
The element this index is based upon.


id

private java.lang.String id
The unique, if cryptic, identifier of an index.

Constructor Detail

Index

public Index()
Default constructor, which should only be used during DOMProxyListModel creation.


Index

public Index(org.w3c.dom.Element element)
Constructor.


Index

public Index(java.util.ArrayList sources)
Constructor for a newly assigned index.


Index

public Index(int level,
             java.util.ArrayList sources)
Constructor for a newly assigned index with specified level (old skool).


Index

public Index(java.lang.String level,
             java.util.ArrayList sources)
Method Detail

compareTo

public int compareTo(java.lang.Object object)
Method to compare two indexes.

Specified by:
compareTo in interface java.lang.Comparable

create

public DOMProxyListEntry create(org.w3c.dom.Element element)
Specified by:
create in interface DOMProxyListEntry

equals

public boolean equals(java.lang.Object object)
Method to test for the equality of two indexes.


getElement

public org.w3c.dom.Element getElement()
Specified by:
getElement in interface DOMProxyListEntry

getLevel

public int getLevel()
Method to get the value of level.


getID

public java.lang.String getID()

getName

public java.lang.String getName()
Tries to retrieve this indexes name according to the CollectionMetaManager.


getSources

public java.util.ArrayList getSources()
Retrieve the sources of this index.


isAssigned

public boolean isAssigned()
Specified by:
isAssigned in interface DOMProxyListEntry

setAssigned

public void setAssigned(boolean assigned)
Specified by:
setAssigned in interface DOMProxyListEntry

setElement

public void setElement(org.w3c.dom.Element element)
Specified by:
setElement in interface DOMProxyListEntry

setLevel

public void setLevel(int new_level)
Method to set the level of this index which can only be used for the default index.


setSources

public void setSources(java.util.ArrayList sources)
Method to set the sources for this index which can only be used for the default index.


toString

public java.lang.String toString()
Method to turn this object into a string representation ready to be placed in the collection configuration file.