public class URITranslator extends SimpleValueTranslator<URI>
URI
.MAX_STRING_REPRESENTATION_LENGTH
Constructor and Description |
---|
URITranslator() |
Modifier and Type | Method and Description |
---|---|
Class<URI> |
getObjectClass()
Returns the Java class of object instances created by this translator.
|
URI |
representationToJava(String representation,
ReaderStreamDataProvider<?> streamDataProvider)
Converts the specified string representation to a new instance of the according Java object.
|
hasStringRepresentation, javaToRepresentation, readXMLRepresentation, writeXMLRepresentation
equals, hashCode
public URITranslator()
public Class<URI> getObjectClass()
ObjectTranslator
Note that ObjectTranslator.javaToRepresentation(Object, WriterStreamDataProvider)
and ObjectTranslator.writeXMLRepresentation(XMLStreamWriter, Object, WriterStreamDataProvider)
may also
accept instances of other classes. This is independent from the return value here.
public URI representationToJava(String representation, ReaderStreamDataProvider<?> streamDataProvider) throws InvalidObjectSourceDataException, UnsupportedOperationException
ObjectTranslator
If #getClass()
returns an interface for this instance, the concrete class of the returned object may
depend on the representation.
representation
- the string representation of the object to be createdstreamDataProvider
- the stream data provider of the calling reader (Maybe null
. Some translators will use it to gain
additional status information required for translating, e.g. prefix to namespace mapping for creating QNames.)InvalidObjectSourceDataException
- if the specified string representation cannot be parsed to a supported objectUnsupportedOperationException
- if objects handled by this instance can only be represented as XML