org.jrdf.parser
Interface NamespaceListener

All Known Implementing Classes:
NamespaceListenerImpl

public interface NamespaceListener

An interface defining methods for receiving namespace declarations from an RDF parser.


Method Summary
 String getFullURI(String prefix)
          Given a prefix return the full URI.
 void handleNamespace(String prefix, String uri)
          Called by an RDF parser when it has encountered a new namespace declaration.
 boolean hasPrefix(String prefix)
          Return true if the prefix has a mapping.
 boolean removePrefix(String prefix)
          Allows the removal of a prefix to URI binding.
 

Method Detail

hasPrefix

boolean hasPrefix(String prefix)
Return true if the prefix has a mapping.

Parameters:
prefix - the prefix to test.
Returns:
true if the prefix has a mapping.

handleNamespace

void handleNamespace(String prefix,
                     String uri)
Called by an RDF parser when it has encountered a new namespace declaration.

Parameters:
prefix - The prefix that is used in the namespace declaration.
uri - The URI of the namespace.

getFullURI

String getFullURI(String prefix)
Given a prefix return the full URI.

Parameters:
prefix - the local name/prefix of the uri.
Returns:
the fully qualified URI.

removePrefix

boolean removePrefix(String prefix)
Allows the removal of a prefix to URI binding.

Parameters:
prefix - the prefix to remove.
Returns:
true if there was a prefix already bound.