javolution.xml.stream.NamespaceContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javolution-core-java-msftbx Show documentation
Show all versions of javolution-core-java-msftbx Show documentation
Only the Java Core part of Javolution library, with slight modifications for use in MSFTBX.
/*
* Javolution - Java(TM) Solution for Real-Time and Embedded Systems
* Copyright (C) 2012 - Javolution (http://javolution.org/)
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software is
* freely granted, provided that this notice is preserved.
*/
package javolution.xml.stream;
import java.util.Iterator;
import javolution.text.CharArray;
/**
* This interface represents the XML namespace context stack while parsing.
*
* @author Jean-Marie Dautelle
* @version 4.0, September 12, 2006
*/
public interface NamespaceContext {
/**
* Returns the namespace URI bound to a prefix in the current scope
* or null
if the prefix is unbound.
*
* @param prefix prefix to look up
* @return the namespace URI.
* @throws IllegalArgumentException if prefix
is
* null
*/
CharArray getNamespaceURI(CharSequence prefix);
/**
* Returns the prefix bound to the namespace URI in the current scope
* or null
if the namespace URI is unbound.
*
* @param namespaceURI URI of the namespace to lookup.
* @return the prefix bound to the namespace URI.
* @throws IllegalArgumentException if namespaceURI
is
* null
*/
CharArray getPrefix(CharSequence namespaceURI);
/**
* Returns all prefixes bound to a namespace URI in the current scope
* (including predefined prefixes).
*
* @param namespaceURI URI of Namespace to lookup
* @return an Iterator
over {@link CharArray} prefixes.
* @throws IllegalArgumentException if namespaceURI
is
* null
*/
Iterator getPrefixes(CharSequence namespaceURI);
}