org.jrdf.parser
Class NamespaceListenerImpl

java.lang.Object
  extended by org.jrdf.parser.NamespaceListenerImpl
All Implemented Interfaces:
Serializable, NamespaceListener

public final class NamespaceListenerImpl
extends Object
implements NamespaceListener, Serializable

Version:
$Id: NamespaceListenerImpl.java 3325 2010-10-02 01:00:12Z newmana $
Author:
Yuan-Fang Li
See Also:
Serialized Form

Constructor Summary
NamespaceListenerImpl(MapFactory mapFactory)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceListenerImpl

public NamespaceListenerImpl(MapFactory mapFactory)
Method Detail

hasPrefix

public boolean hasPrefix(String prefix)
Description copied from interface: NamespaceListener
Return true if the prefix has a mapping.

Specified by:
hasPrefix in interface NamespaceListener
Parameters:
prefix - the prefix to test.
Returns:
true if the prefix has a mapping.

removePrefix

public boolean removePrefix(String prefix)
Description copied from interface: NamespaceListener
Allows the removal of a prefix to URI binding.

Specified by:
removePrefix in interface NamespaceListener
Parameters:
prefix - the prefix to remove.
Returns:
true if there was a prefix already bound.

handleNamespace

public void handleNamespace(String prefix,
                            String uri)
Description copied from interface: NamespaceListener
Called by an RDF parser when it has encountered a new namespace declaration.

Specified by:
handleNamespace in interface NamespaceListener
Parameters:
prefix - The prefix that is used in the namespace declaration.
uri - The URI of the namespace.

getFullURI

public String getFullURI(String prefix)
Description copied from interface: NamespaceListener
Given a prefix return the full URI.

Specified by:
getFullURI in interface NamespaceListener
Parameters:
prefix - the local name/prefix of the uri.
Returns:
the fully qualified URI.