MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.query.parser
Class SchemaParser

java.lang.Object
  extended by ch.ethz.mxquery.query.parser.SchemaParser
All Implemented Interfaces:
org.w3c.dom.DOMErrorHandler

public class SchemaParser
extends java.lang.Object
implements org.w3c.dom.DOMErrorHandler


Constructor Summary
SchemaParser()
           
 
Method Summary
static void addFunction(Context ctx, org.apache.xerces.xs.XSTypeDefinition typeDef, TypeDictionary dict)
          Adds a UDT constructor function to the gallery of functions of the current context
static org.w3c.dom.ls.LSInput createLSInput(java.lang.String schema)
          Convenience method that wraps a string in a LSINput interface implementation - to be used with the XSLoader
static XDMIterator getBaseTypeConstructor(Context ctx, int typeFootprint, TypeDictionary dict)
           
 boolean handleError(org.w3c.dom.DOMError error)
           
static void parseSchema(Context ctx, org.w3c.dom.ls.LSInput schema, java.lang.String targetNamespace, TypeDictionary dict, QueryLocation loc)
          Parses a string representing a schema and and updates the ISSDs : type Dictionary accordingly
static void parseSchema(Context ctx, java.lang.String uri, java.lang.String targetNamespace, TypeDictionary dict, QueryLocation loc)
          Parses a given schema file and and updates the ISSDs : type Dictionary accordingly
static void parseSchema(java.lang.String uri, java.lang.String targetNamespace, TypeDictionary dict, QueryLocation loc)
           
static void preLoadSchema(java.lang.String uri)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaParser

public SchemaParser()
Method Detail

parseSchema

public static void parseSchema(Context ctx,
                               java.lang.String uri,
                               java.lang.String targetNamespace,
                               TypeDictionary dict,
                               QueryLocation loc)
                        throws MXQueryException
Parses a given schema file and and updates the ISSDs : type Dictionary accordingly

Parameters:
uri -
targetNamespace -
dict -
Throws:
MXQueryException

parseSchema

public static void parseSchema(java.lang.String uri,
                               java.lang.String targetNamespace,
                               TypeDictionary dict,
                               QueryLocation loc)
                        throws MXQueryException
Throws:
MXQueryException

parseSchema

public static void parseSchema(Context ctx,
                               org.w3c.dom.ls.LSInput schema,
                               java.lang.String targetNamespace,
                               TypeDictionary dict,
                               QueryLocation loc)
                        throws java.lang.ClassCastException,
                               java.lang.ClassNotFoundException,
                               java.lang.InstantiationException,
                               java.lang.IllegalAccessException,
                               MXQueryException
Parses a string representing a schema and and updates the ISSDs : type Dictionary accordingly

Throws:
java.lang.ClassCastException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
MXQueryException

preLoadSchema

public static void preLoadSchema(java.lang.String uri)
                          throws MXQueryException
Throws:
MXQueryException

addFunction

public static void addFunction(Context ctx,
                               org.apache.xerces.xs.XSTypeDefinition typeDef,
                               TypeDictionary dict)
                        throws MXQueryException
Adds a UDT constructor function to the gallery of functions of the current context

Parameters:
ctx -
typeDef -
Throws:
MXQueryException

getBaseTypeConstructor

public static XDMIterator getBaseTypeConstructor(Context ctx,
                                                 int typeFootprint,
                                                 TypeDictionary dict)
                                          throws MXQueryException
Throws:
MXQueryException

createLSInput

public static org.w3c.dom.ls.LSInput createLSInput(java.lang.String schema)
Convenience method that wraps a string in a LSINput interface implementation - to be used with the XSLoader


handleError

public boolean handleError(org.w3c.dom.DOMError error)
Specified by:
handleError in interface org.w3c.dom.DOMErrorHandler

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich