com.hp.hpl.jena.daml.common
Class XMLDatatypeRegistry
java.lang.Object
|
+--com.hp.hpl.jena.daml.common.XMLDatatypeRegistry
- public class XMLDatatypeRegistry
- extends java.lang.Object
Provides a registry that can map RDF values encoded using XML Schema type definitions
into Java objects or scalars. A basic set of mappings is provided, but other type
mappings can be added by the user.
- Version:
- CVS info: $Id: XMLDatatypeRegistry.java,v 1.1 2001/09/24 17:02:44 ijd Exp $
- Author:
- Ian Dickinson, HP Labs (email)
Constructor Summary |
XMLDatatypeRegistry()
Constructor for the registry, which will register a basic set of mappings. |
Method Summary |
java.util.Iterator |
getRegisteredTypes()
Answer an iteration over the types of URI's that are registered. |
DatatypeTranslator |
getTranslator(java.lang.String uri)
Answer the datatype translator for a a resource whose rdf:type
is the given URI. |
boolean |
isRegisteredType(java.lang.String typeURI)
Answer true if the given type URI is registered in this registry |
void |
registerTranslator(java.lang.String uri,
DatatypeTranslator translator)
Register a translator for the type whose uri is as given. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSD_NAMESPACE_URI
public static final java.lang.String XSD_NAMESPACE_URI
- The URI for XML schema datatypes (xsd) namespace
XSD_INTEGER
public static final Resource XSD_INTEGER
- Resource to denote the type of an xsd integer
XMLDatatypeRegistry
public XMLDatatypeRegistry()
- Constructor for the registry, which will register a basic set of mappings.
getTranslator
public DatatypeTranslator getTranslator(java.lang.String uri)
- Answer the datatype translator for a a resource whose
rdf:type
is the given URI.
- Parameters:
uri
- The uri of the type- Returns:
- the corresponding translator, if one is registered, or null otherwise.
registerTranslator
public void registerTranslator(java.lang.String uri,
DatatypeTranslator translator)
- Register a translator for the type whose uri is as given.
- Parameters:
uri
- The uri of the type to be registeredtranslator
- The translator that will map objects of the given type
between Java and XML/RDF.
getRegisteredTypes
public java.util.Iterator getRegisteredTypes()
- Answer an iteration over the types of URI's that are registered.
- Returns:
- an iteration, each element of which is a string representing a URI.
isRegisteredType
public boolean isRegisteredType(java.lang.String typeURI)
- Answer true if the given type URI is registered in this registry
- Parameters:
typeURI
- The URI of the type to be tested, as a string.- Returns:
- boolean true if the type is registered.
Copyright © 2001 Hewlett-Packard. All Rights Reserved.