public class ExtendedAttributeFactory extends BaseAttributeFactory
Modifier and Type | Method and Description |
---|---|
void |
addDatatype(String id,
AttributeProxy proxy)
Adds a proxy to the factory, which in turn will allow new attribute
types to be created using the factory.
|
AttributeValue |
createValue(Node root,
String type)
Creates a value based on the given DOM root node and data type.
|
AttributeValue |
createValue(Node root,
URI dataType)
Creates a value based on the given DOM root node and data type.
|
AttributeValue |
createValue(URI dataType,
String value)
Creates a value based on the given data type and text-encoded value.
|
static ExtendedAttributeFactory |
getFactory() |
createValue, getSupportedDatatypes
addAttributeProxy, createAttribute, createAttribute, createAttribute, createAttribute, getInstance, getInstance, registerFactory, setDefaultFactory
public void addDatatype(String id, AttributeProxy proxy)
BaseAttributeFactory
AttributeValue
class.addDatatype
in class BaseAttributeFactory
id
- the name of the attribute typeproxy
- the proxy used to create new attributes of the given typepublic AttributeValue createValue(URI dataType, String value) throws UnknownIdentifierException, ParsingException
BaseAttributeFactory
createValue
in class BaseAttributeFactory
dataType
- the type of the attributevalue
- the text-encoded representation of an attribute's valueAttributeValue
UnknownIdentifierException
- if the data type isn't known to
the factoryParsingException
- if the text is invalid or can't be parsed
by the appropriate proxypublic AttributeValue createValue(Node root, String type) throws UnknownIdentifierException, ParsingException
BaseAttributeFactory
createValue
in class BaseAttributeFactory
root
- the DOM root of an attribute valuetype
- the type of the attributeAttributeValue
UnknownIdentifierException
- if the type isn't known to
the factoryParsingException
- if the node is invalid or can't be parsed
by the appropriate proxypublic AttributeValue createValue(Node root, URI dataType) throws UnknownIdentifierException, ParsingException
BaseAttributeFactory
createValue
in class BaseAttributeFactory
root
- the DOM root of an attribute valuedataType
- the type of the attributeAttributeValue
UnknownIdentifierException
- if the data type isn't known to
the factoryParsingException
- if the node is invalid or can't be parsed
by the appropriate proxypublic static ExtendedAttributeFactory getFactory()
Copyright © 2023 JBoss by Red Hat. All rights reserved.