org.apache.jackrabbit.rmi.value
Class NameValue

java.lang.Object
  extended by org.apache.jackrabbit.rmi.value.BaseNonStreamValue
      extended by org.apache.jackrabbit.rmi.value.NameValue
All Implemented Interfaces:
Serializable, Value, StatefulValue

public class NameValue
extends BaseNonStreamValue
implements Serializable, StatefulValue

The NameValue class implements the committed value state for Name values as a part of the State design pattern (Gof) used by this package.

Since:
0.16.4.1
See Also:
Serialized Form

Constructor Summary
protected NameValue(String value)
          Creates an instance for the given name value.
 
Method Summary
 String getString()
          Returns the string representation of the Name value.
 int getType()
          Returns PropertyType.NAME.
protected static String toName(String value)
          Checks whether the string value adheres to the name syntax.
 
Methods inherited from class org.apache.jackrabbit.rmi.value.BaseNonStreamValue
getBoolean, getDate, getDouble, getLong, getStream, getValueFormatException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.Value
getBoolean, getDate, getDouble, getLong, getStream
 

Constructor Detail

NameValue

protected NameValue(String value)
             throws ValueFormatException
Creates an instance for the given name value.

Throws:
ValueFormatException
Method Detail

toName

protected static String toName(String value)
                        throws ValueFormatException
Checks whether the string value adheres to the name syntax.

Parameters:
value - The string to check for synthactical compliance with a name value.
Returns:
The input value.
Throws:
ValueFormatException - if the string value is not a synthactically correct name.

getType

public int getType()
Returns PropertyType.NAME.

Specified by:
getType in interface Value

getString

public String getString()
                 throws ValueFormatException,
                        RepositoryException
Returns the string representation of the Name value.

Specified by:
getString in interface Value
Throws:
ValueFormatException
RepositoryException


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