MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.datamodel.xdm
Class XDMScope

java.lang.Object
  extended by ch.ethz.mxquery.datamodel.xdm.XDMScope

public class XDMScope
extends java.lang.Object


Constructor Summary
XDMScope()
           
XDMScope(XDMScope par)
           
XDMScope(XDMScope par, boolean inherit)
           
 
Method Summary
 void addNamespace(Namespace ns)
          Add a prefix/namespace mapping.
 void addNamespace(java.lang.String prefix, java.lang.String uri)
          Add a prefix/namespace mapping.
static XDMScope combineSopes(boolean global, XDMScope ns, boolean inherit, boolean preserve, Set requiredNS, XDMScope curScope, XQStaticContext ctx)
           
 XDMScope copy()
           
 java.util.Hashtable getAllNamespaces()
           
 java.lang.String getBaseURI()
          get the base-uri (xml:base) for this scope/node
 java.lang.String getLanguage()
          get the language (xml:lang) of this scope/node
 java.util.Hashtable getLocalNamespaces()
           
 Namespace getNamespace(java.lang.String prefix)
           
 java.lang.String getNsURI(java.lang.String prefix)
          Gets the namespace URI associated with the given prefix
 XDMScope getParent()
           
 java.lang.String getPrefix(java.lang.String uri)
          get the (namespace-)prefix for a given URI.
 void setBaseURI(java.lang.String baseURI)
           
 void setLanguage(java.lang.String lang)
           
 void setParent(XDMScope par)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XDMScope

public XDMScope()

XDMScope

public XDMScope(XDMScope par)

XDMScope

public XDMScope(XDMScope par,
                boolean inherit)
Method Detail

addNamespace

public void addNamespace(Namespace ns)
                  throws MXQueryException
Add a prefix/namespace mapping.

Parameters:
ns - a namespace object
Throws:
MXQueryException

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.lang.String uri)
                  throws MXQueryException
Add a prefix/namespace mapping.

Parameters:
prefix - The prefix.
uri - The URI of the namespace.
Throws:
MXQueryException

getParent

public XDMScope getParent()

setParent

public void setParent(XDMScope par)

getAllNamespaces

public java.util.Hashtable getAllNamespaces()
Returns:
All the visible namespace prefix-URI mappings.

getLocalNamespaces

public java.util.Hashtable getLocalNamespaces()

getNsURI

public java.lang.String getNsURI(java.lang.String prefix)
Gets the namespace URI associated with the given prefix

Parameters:
prefix - The given prefix
Returns:
The associated namespace URI

getNamespace

public Namespace getNamespace(java.lang.String prefix)

getPrefix

public java.lang.String getPrefix(java.lang.String uri)
get the (namespace-)prefix for a given URI. This acutally iterates through the context entries. This iteration is acceptable, because this method is very rarely used.

Parameters:
uri - The URI to look for.
Returns:
TODO

copy

public XDMScope copy()

combineSopes

public static XDMScope combineSopes(boolean global,
                                    XDMScope ns,
                                    boolean inherit,
                                    boolean preserve,
                                    Set requiredNS,
                                    XDMScope curScope,
                                    XQStaticContext ctx)
                             throws MXQueryException
Throws:
MXQueryException

getLanguage

public java.lang.String getLanguage()
get the language (xml:lang) of this scope/node


setLanguage

public void setLanguage(java.lang.String lang)

getBaseURI

public java.lang.String getBaseURI()
get the base-uri (xml:base) for this scope/node


setBaseURI

public void setBaseURI(java.lang.String baseURI)

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich