org.jrdf.writer
Interface RdfNamespaceMap

All Known Implementing Classes:
RdfNamespaceMapImpl

public interface RdfNamespaceMap

Contains mappings between namespaces and partial URIs.

Author:
TurnerRX

Method Summary
 Set<Map.Entry<String,String>> getNameEntries()
          Returns the Names mapping entry set.
 String getNamespace(URIReference resource)
          Returns the namespace that is mapped to the resource URI (prefix), or null if the URI is not mapped.
 void load(Graph graph)
          Loads namespaces from the graph.
 String replaceNamespace(URIReference resource)
          Returns a string representing the resource URI with its URI prefix replaced by the mapped namespace.
 void reset()
          Reset the name and uri mappings.
 

Method Detail

load

void load(Graph graph)
          throws GraphException
Loads namespaces from the graph.

Parameters:
graph - Graph containing URIs to load from.
Throws:
GraphException - If the graph cannot be read.

replaceNamespace

String replaceNamespace(URIReference resource)
                        throws NamespaceException
Returns a string representing the resource URI with its URI prefix replaced by the mapped namespace.

Parameters:
resource - URIReference resource URI
Returns:
String namespaced representation of resource URI
Throws:
NamespaceException - If there is no mapping for the partial resource URI.

getNamespace

String getNamespace(URIReference resource)
Returns the namespace that is mapped to the resource URI (prefix), or null if the URI is not mapped.

Parameters:
resource - URIReference resource URI to look up.
Returns:
String mapped namespace

getNameEntries

Set<Map.Entry<String,String>> getNameEntries()
Returns the Names mapping entry set.

Returns:
name map entries.

reset

void reset()
Reset the name and uri mappings.