org.apache.xerces.validators.schema.identity
Class IDValue

java.lang.Object
  |
  +--org.apache.xerces.validators.schema.identity.IDValue

public class IDValue
extends java.lang.Object

Stores a value associated with a particular field of an identity constraint that has successfully matched some string in an instance document. This class also stores the DatatypeValidator associated with the element or attribute whose content is the string in question; this must be done here because type determination is dynamic.

This class also makes it its business to provide functionality to determine whether two instances are duplicates.

Author:
Neil Graham, IBM

Field Summary
protected  DatatypeValidator fValidator
           
protected  java.lang.String fValue
           
 
Constructor Summary
IDValue(java.lang.String value, DatatypeValidator val)
           
 
Method Summary
 boolean isDuplicateOf(IDValue value)
          Returns whether the supplied IDValue is a duplicate of this IDValue.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fValue

protected java.lang.String fValue

fValidator

protected DatatypeValidator fValidator
Constructor Detail

IDValue

public IDValue(java.lang.String value,
               DatatypeValidator val)
Method Detail

isDuplicateOf

public boolean isDuplicateOf(IDValue value)
Returns whether the supplied IDValue is a duplicate of this IDValue. It is a duplicate only if either of these conditions are true: - The Datatypes are the same or related by derivation and the values are in the same valuespace. - The datatypes are unrelated and the values are Stringwise identical.
Parameters:
value - The value to compare. once within a selection scope.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1999-2001 Apache XML Project. All Rights Reserved.