org.jboss.xb.binding.sunday.unmarshalling
Class XsdBinder

java.lang.Object
  extended by org.jboss.xb.binding.sunday.unmarshalling.XsdBinder

public class XsdBinder
extends Object

Version:
$Revision: 3021 $
Author:
Alexey Loubyansky

Method Summary
static SchemaBinding bind(InputStream xsdStream, String encoding)
           
static SchemaBinding bind(InputStream xsdStream, String encoding, SchemaBindingResolver resolver)
          Create a SchemaBinding from and xsd stream.
static SchemaBinding bind(InputStream xsdStream, String encoding, SchemaBindingResolver resolver, boolean processAnnotations)
          Create a SchemaBinding from and xsd stream.
static SchemaBinding bind(InputStream xsdStream, String encoding, String baseURI)
          Create a SchemaBinding from and xsd stream.
static SchemaBinding bind(InputStream xsdStream, String encoding, String baseURI, boolean processAnnotations)
          Create a SchemaBinding from and xsd stream.
static SchemaBinding bind(Reader xsdReader, String encoding)
           
static SchemaBinding bind(Reader xsdReader, String encoding, SchemaBindingResolver resolver)
          Create a SchemaBinding from and xsd reader.
static SchemaBinding bind(Reader xsdReader, String encoding, String baseURI)
          Create a SchemaBinding from and xsd reader.
static SchemaBinding bind(String xsdUrl)
          Create a SchemaBinding from and xsd url/uri.
static SchemaBinding bind(String xsdUrl, SchemaBindingResolver resolver)
          Create a SchemaBinding from and xsd url/uri.
static SchemaBinding bind(String xsd, String encoding)
          Create a SchemaBinding from and xsd string.
static SchemaBinding bind(String xsd, String encoding, SchemaBindingResolver resolver)
          Create a SchemaBinding from and xsd string.
static SchemaBinding bind(org.apache.xerces.xs.XSModel model, SchemaBindingResolver resolver)
           
static SchemaBinding bind(org.apache.xerces.xs.XSModel model, SchemaBindingResolver resolver, boolean processAnnotations)
           
static void bindElement(SchemaBinding schema, org.apache.xerces.xs.XSElementDeclaration element, int minOccurs, int maxOccurs, boolean maxOccursUnbounded)
          Deprecated. This method is added temporary to get anonymous type binding working in JBossWS. It will be removed when anonymous type binding in JBossWS is implemented properly. No one else should use this method.

This method binds an element declaration and adds it as a global element to the passed in schema binding.

static void bindType(SchemaBinding schema, org.apache.xerces.xs.XSTypeDefinition type)
          Deprecated. This method is added temporary to get anonymous type binding working in JBossWS. It will be removed when anonymous type binding in JBossWS is implemented properly. No one else should use this method.

This method binds a type definition and adds it as a global type to the passed in schema binding.

 SchemaBindingResolver getSchemaResolver()
           
 boolean isProcessAnnotations()
           
 boolean isSimpleContentWithIdAsSimpleType()
           
 boolean isUnresolvedContentBoundToDOM()
           
static XsdBinder newInstance()
          Creates a new instance of the binder the user can use to tune configuration before parsing the XSD.
 SchemaBinding parse(InputStream xsdStream, String encoding)
           
 SchemaBinding parse(Reader xsdReader, String encoding)
           
 SchemaBinding parse(String xsdUrl)
           
 void setProcessAnnotations(boolean processAnnotations)
           
 void setSchemaResolver(SchemaBindingResolver resolver)
           
 void setSimpleContentWithIdAsSimpleType(boolean simpleContentWithIdAsSimpleType)
           
 void setUnresolvedContentBoundToDOM(boolean toDOM)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static XsdBinder newInstance()
Creates a new instance of the binder the user can use to tune configuration before parsing the XSD.

Returns:
a new instance of the XsdBinder

bind

public static SchemaBinding bind(String xsdUrl)
Create a SchemaBinding from and xsd url/uri.

Parameters:
xsdUrl -
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(String xsdUrl,
                                 SchemaBindingResolver resolver)
Create a SchemaBinding from and xsd url/uri.

Parameters:
xsdUrl -
resolver - the resolver will be used to resolve imported schemas in the schema being loaded and also will be set on the returned instance of SchemaBinding
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(InputStream xsdStream,
                                 String encoding)

bind

public static SchemaBinding bind(InputStream xsdStream,
                                 String encoding,
                                 String baseURI)
Create a SchemaBinding from and xsd stream.

Parameters:
xsdStream - - the xsd InputStream
encoding - - optional stream encoding
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(InputStream xsdStream,
                                 String encoding,
                                 String baseURI,
                                 boolean processAnnotations)
Create a SchemaBinding from and xsd stream.

Parameters:
xsdStream - - the xsd InputStream
encoding - - optional stream encoding
processAnnotations - - process annotations
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(InputStream xsdStream,
                                 String encoding,
                                 SchemaBindingResolver resolver)
Create a SchemaBinding from and xsd stream.

Parameters:
xsdStream - - the xsd InputStream
encoding - - optional stream encoding
resolver - the resolver will be used to resolve imported schemas in the schema being loaded and also will be set on the returned instance of SchemaBinding
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(InputStream xsdStream,
                                 String encoding,
                                 SchemaBindingResolver resolver,
                                 boolean processAnnotations)
Create a SchemaBinding from and xsd stream.

Parameters:
xsdStream - - the xsd InputStream
encoding - - optional stream encoding
resolver - the resolver will be used to resolve imported schemas in the schema being loaded and also will be set on the returned instance of SchemaBinding
processAnnotations - whether to process annotations
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(Reader xsdReader,
                                 String encoding)

bind

public static SchemaBinding bind(Reader xsdReader,
                                 String encoding,
                                 String baseURI)
Create a SchemaBinding from and xsd reader.

Parameters:
xsdReader - - xsd reader
encoding - - optional reader encoding
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(Reader xsdReader,
                                 String encoding,
                                 SchemaBindingResolver resolver)
Create a SchemaBinding from and xsd reader.

Parameters:
xsdReader - - xsd reader
encoding - - optional reader encoding
resolver - the resolver will be used to resolve imported schemas in the schema being loaded and also will be set on the returned instance of SchemaBinding
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(String xsd,
                                 String encoding)
Create a SchemaBinding from and xsd string.

Parameters:
xsd - - xsd string
encoding - - optional string encoding
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(String xsd,
                                 String encoding,
                                 SchemaBindingResolver resolver)
Create a SchemaBinding from and xsd string.

Parameters:
xsd - - xsd string
encoding - - optional string encoding
resolver - the resolver will be used to resolve imported schemas in the schema being loaded and also will be set on the returned instance of SchemaBinding
Returns:
SchemaBinding mapping

bind

public static SchemaBinding bind(org.apache.xerces.xs.XSModel model,
                                 SchemaBindingResolver resolver)

bind

public static SchemaBinding bind(org.apache.xerces.xs.XSModel model,
                                 SchemaBindingResolver resolver,
                                 boolean processAnnotations)

bindType

public static void bindType(SchemaBinding schema,
                            org.apache.xerces.xs.XSTypeDefinition type)
Deprecated. This method is added temporary to get anonymous type binding working in JBossWS. It will be removed when anonymous type binding in JBossWS is implemented properly. No one else should use this method.

This method binds a type definition and adds it as a global type to the passed in schema binding.

Parameters:
schema - schema binding the type should be added to
type - type definition to be bound

bindElement

public static void bindElement(SchemaBinding schema,
                               org.apache.xerces.xs.XSElementDeclaration element,
                               int minOccurs,
                               int maxOccurs,
                               boolean maxOccursUnbounded)
Deprecated. This method is added temporary to get anonymous type binding working in JBossWS. It will be removed when anonymous type binding in JBossWS is implemented properly. No one else should use this method.

This method binds an element declaration and adds it as a global element to the passed in schema binding.

Parameters:
schema - schema binding the type should be added to
element - element declaration to be bound
minOccurs -
maxOccurs -
maxOccursUnbounded -

setProcessAnnotations

public void setProcessAnnotations(boolean processAnnotations)

isProcessAnnotations

public boolean isProcessAnnotations()

setSchemaResolver

public void setSchemaResolver(SchemaBindingResolver resolver)

getSchemaResolver

public SchemaBindingResolver getSchemaResolver()

setSimpleContentWithIdAsSimpleType

public void setSimpleContentWithIdAsSimpleType(boolean simpleContentWithIdAsSimpleType)

isSimpleContentWithIdAsSimpleType

public boolean isSimpleContentWithIdAsSimpleType()

setUnresolvedContentBoundToDOM

public void setUnresolvedContentBoundToDOM(boolean toDOM)

isUnresolvedContentBoundToDOM

public boolean isUnresolvedContentBoundToDOM()

parse

public SchemaBinding parse(String xsdUrl)

parse

public SchemaBinding parse(InputStream xsdStream,
                           String encoding)

parse

public SchemaBinding parse(Reader xsdReader,
                           String encoding)


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.