gov.nasa.pds.harvest.util
Class PDSNamespaceContext

java.lang.Object
  extended by gov.nasa.pds.harvest.util.PDSNamespaceContext
All Implemented Interfaces:
NamespaceContext

public class PDSNamespaceContext
extends Object
implements NamespaceContext

Class that provides support for handling namespaces in PDS4 data products.

Author:
mcayanan

Constructor Summary
PDSNamespaceContext()
          Constructor.
PDSNamespaceContext(List<Namespace> namespaces)
          Constructor.
 
Method Summary
 void addNamespace(Namespace namespace)
          Adds a namespace.
 String getNamespaceURI(String prefix)
          Gets the namespace URI.
 String getPrefix(String arg0)
          Method not needed
 Iterator getPrefixes(String arg0)
          Method not needed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDSNamespaceContext

public PDSNamespaceContext()
Constructor.


PDSNamespaceContext

public PDSNamespaceContext(List<Namespace> namespaces)
Constructor.

Parameters:
namespaces - A list of namespaces to support.
Method Detail

addNamespace

public void addNamespace(Namespace namespace)
Adds a namespace.

Parameters:
namespace - A namespace to support.

getNamespaceURI

public String getNamespaceURI(String prefix)
Gets the namespace URI.

Specified by:
getNamespaceURI in interface NamespaceContext
Parameters:
prefix - The prefix
Returns:
The URI to the given prefix. Returns the PDS namespace URI if the given prefix is empty or null.

getPrefix

public String getPrefix(String arg0)
Method not needed

Specified by:
getPrefix in interface NamespaceContext

getPrefixes

public Iterator getPrefixes(String arg0)
Method not needed

Specified by:
getPrefixes in interface NamespaceContext


Copyright © 2010-2014 Planetary Data System. All Rights Reserved.