edu.ucsb.adl.middleware
Class Query.IdentificationConstraint

java.lang.Object
  |
  +--edu.ucsb.adl.middleware.Query.Constraint
        |
        +--edu.ucsb.adl.middleware.Query.SimpleConstraint
              |
              +--edu.ucsb.adl.middleware.Query.IdentificationConstraint
Enclosing class:
Query

public static final class Query.IdentificationConstraint
extends Query.SimpleConstraint

An identification constraint.


Field Summary
 
Fields inherited from class edu.ucsb.adl.middleware.Query.SimpleConstraint
m_bucket, m_field, m_operator
 
Fields inherited from class edu.ucsb.adl.middleware.Query.Constraint
m_parent
 
Constructor Summary
Query.IdentificationConstraint(java.lang.String bucket, Query.Field field, java.lang.String operator, java.lang.String identifier, java.lang.String namespace)
          Constructs an IdentificationConstraint.
 
Method Summary
 java.lang.String getIdentifier()
          Returns the target identifier.
 java.lang.String getNamespace()
          Returns the target identifier's namespace.
 java.lang.String toHTML(java.lang.String mapServerURL)
          Converts the constraint to HTML.
 java.lang.String toXML(int level)
          Converts the constraint to XML.
 
Methods inherited from class edu.ucsb.adl.middleware.Query.SimpleConstraint
commonFieldsToXML, getBucket, getField, getOperator
 
Methods inherited from class edu.ucsb.adl.middleware.Query.Constraint
getParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Query.IdentificationConstraint

public Query.IdentificationConstraint(java.lang.String bucket,
                                      Query.Field field,
                                      java.lang.String operator,
                                      java.lang.String identifier,
                                      java.lang.String namespace)
Constructs an IdentificationConstraint.

Parameters:
bucket - The bucket to constrain, e.g., "identifiers".
field - The field to constrain, or null.
operator - The constraint operator, e.g., "matches".
identifier - The target identifier, e.g., "0-201-63274-8".
namespace - The target identifier's namespace (e.g., "ISBN"), or null.
Throws:
java.lang.NullPointerException - If bucket, operator, or identifier are null.
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Returns the target identifier.

Returns:
The target identifier.

getNamespace

public java.lang.String getNamespace()
Returns the target identifier's namespace.

Returns:
The namespace, or null.

toHTML

public java.lang.String toHTML(java.lang.String mapServerURL)
Converts the constraint to HTML.

Specified by:
toHTML in class Query.Constraint
Parameters:
mapServerURL - Unused.
Returns:
An HTML fragment consisting of a single <li> element.

toXML

public java.lang.String toXML(int level)
Converts the constraint to XML.

Specified by:
toXML in class Query.Constraint
Parameters:
level - The current indentation level; should be nonnegative.
Returns:
An XML fragment.