project.biota.digir
Class SchemaConcept

java.lang.Object
  extended byproject.biota.digir.SchemaConcept

public class SchemaConcept
extends Object

A wrapper around java.lang.String to represent the name of a schema concept. The schema concepts are read at application startup, they are kept in a java.util.HashSet. When a DiGIR request comes in, each schema concept used in the request is checked for memebership in this java.util.HashSet. In order to ignore the difference in letter case, this class overrides the equals() and hashCode() methods of class java.lang.String.

Author:
Kimmy Lin
See Also:
String

Constructor Summary
SchemaConcept(String conceptName)
          Constructs a ConceptString object for a schema concept.
 
Method Summary
 boolean equals(Object obj)
          Overrides the String.equals() method.
 String getName()
          Gets the name of this schema concept.
 int hashCode()
          Overrides the String.hashCode() method.
 String toString()
          Returns the name of this schema concept.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemaConcept

public SchemaConcept(String conceptName)
Constructs a ConceptString object for a schema concept.

Parameters:
conceptName - the name of the schema concept
Method Detail

getName

public String getName()
Gets the name of this schema concept.

Returns:
the name of this schema concept.

toString

public String toString()
Returns the name of this schema concept.

Returns:
the name of this schema concept

equals

public boolean equals(Object obj)
Overrides the String.equals() method.

Parameters:
obj - the object to compare this String against
Returns:
true if the name of two schema concepts are equal, ignoring case

hashCode

public int hashCode()
Overrides the String.hashCode() method. It turns the name of the schema concept to upper case and gets the hash code of the upper-case name.

Returns:
a hash code value of the upper-case name of the schema concept


Copyright © 2004 University of Massachusetts at Boston. All Rights Reserved.