Package gov.nasa.pds.harvest.search.util
Class PDSNamespaceContext
- java.lang.Object
-
- gov.nasa.pds.harvest.search.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
Constructors Constructor Description PDSNamespaceContext()
Constructor.PDSNamespaceContext(List<Namespace> namespaces)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNamespace(Namespace namespace)
Adds a namespace.String
getNamespaceURI(String prefix)
Gets the namespace URI.String
getPrefix(String arg0)
Method not neededIterator
getPrefixes(String arg0)
Method not needed
-
-
-
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 interfaceNamespaceContext
- 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 interfaceNamespaceContext
-
getPrefixes
public Iterator getPrefixes(String arg0)
Method not needed- Specified by:
getPrefixes
in interfaceNamespaceContext
-
-