com.cafesoft.cams.attr
Class AttributeValueFactory

java.lang.Object
  |
  +--com.cafesoft.cams.attr.AttributeValueFactory

public class AttributeValueFactory
extends Object

AttributeValueFactory provides factory methods for creation of AttributeValue instances.

Since:
6/1/2004

Method Summary
 AttributeValue createAttributeValue(boolean value)
          Create a boolean AttributeValue.
 AttributeValue createAttributeValue(String value)
          Create a String AttributeValue.
 AttributeValue createAttributeValue(URI dataType, String value)
          Create an AttributeValue.
static AttributeValueFactory getInstance()
          Get the AttributeValueFactory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AttributeValueFactory getInstance()
Get the AttributeValueFactory instance.

Returns:
the AttributeValueFactory instance.

createAttributeValue

public AttributeValue createAttributeValue(URI dataType,
                                           String value)
                                    throws IllegalArgumentException,
                                           UnknownDataTypeException,
                                           AttributeValueParseException
Create an AttributeValue.

Parameters:
dataType - the DataType of the AttributeValue to be created.
value - a String representation of the value.
Returns:
the AttributeValue.
Throws:
IllegalArgumentException - if the DataType is null.
UnknownDataTypeException - if the DataType is unknown to the AttributeFactory.
AttributeValueParseException - if the String representation of the AttributeValue cannot be parsed to the specified DataType.

createAttributeValue

public AttributeValue createAttributeValue(String value)
Create a String AttributeValue.

Parameters:
value - a String representation of the AttributeValue.
Returns:
the AttributeValue.

createAttributeValue

public AttributeValue createAttributeValue(boolean value)
Create a boolean AttributeValue.

Parameters:
value - a boolean representation of the AttributeValue.
Returns:
the AttributeValue.


Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.