org.apache.jackrabbit.core.nodetype
Class ValueConstraint

java.lang.Object
  extended byorg.apache.jackrabbit.core.nodetype.ValueConstraint

public abstract class ValueConstraint
extends Object

ValueConstraint and its subclasses are used to check the syntax of a value constraint and to test if a specific value satisfies it.


Field Summary
static ValueConstraint[] EMPTY_ARRAY
           
protected static org.slf4j.Logger log
           
 
Constructor Summary
protected ValueConstraint(String definition)
           
 
Method Summary
static ValueConstraint create(int type, String definition, NamespaceResolver nsResolver)
           
 boolean equals(Object other)
           
 String getDefinition()
          Returns the original (raw) definition of this constraint.
 String getDefinition(NamespaceResolver nsResolver)
          For constraints that are not namespace prefix mapping sensitive this method returns the same result as getDefinition().
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.slf4j.Logger log

EMPTY_ARRAY

public static final ValueConstraint[] EMPTY_ARRAY
Constructor Detail

ValueConstraint

protected ValueConstraint(String definition)
Method Detail

getDefinition

public String getDefinition()
Returns the original (raw) definition of this constraint.

Returns:
the original (raw) definition of this constraint.

getDefinition

public String getDefinition(NamespaceResolver nsResolver)
For constraints that are not namespace prefix mapping sensitive this method returns the same result as getDefinition().

Those that are namespace prefix mapping sensitive (e.g. NameConstraint, PathConstraint and ReferenceConstraint) use the given nsResolver to reflect the current mapping in the returned value.

Returns:
the definition of this constraint.

create

public static ValueConstraint create(int type,
                                     String definition,
                                     NamespaceResolver nsResolver)
                              throws InvalidConstraintException
Throws:
InvalidConstraintException

equals

public boolean equals(Object other)

hashCode

public int hashCode()


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.