com.ebmwebsourcing.commons.schema
Class SchemaFactory

java.lang.Object
  extended by com.ebmwebsourcing.commons.schema.SchemaFactory
Direct Known Subclasses:
SchemaFactoryImpl

public abstract class SchemaFactory
extends java.lang.Object

This abstract class defines a factory API that enables applications to obtain a SchemaFactory capable of producing new Definitions, new SchemaReaders, and new SchemaWriters. Some ideas used here have been shamelessly copied from the wonderful JAXP and Xerces work.

Author:
Nicolas Salatge - eBM WebSourcing

Constructor Summary
SchemaFactory()
           
 
Method Summary
static Schema getDefaultSchema()
          Get the default schema
static SchemaFactory newInstance()
          Get a new instance of a SchemaFactory.
abstract  Schema newSchema()
          Create a new instance of a Definition.
abstract  SchemaReader newSchemaReader()
          Create a new instance of a SchemaReader.
abstract  SchemaReader newSchemaReader(java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> features)
          Create a new instance of a SchemaReader.
abstract  SchemaWriter newSchemaWriter()
          Create a new instance of a SchemaWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaFactory

public SchemaFactory()
Method Detail

newInstance

public static SchemaFactory newInstance()
                                 throws SchemaException
Get a new instance of a SchemaFactory. This method follows (almost) the same basic sequence of steps that JAXP follows to determine the fully-qualified class name of the class which implements SchemaFactory.

The steps in order are:

  1. Check the property file META-INF/services/javax.wsdl.factory.SchemaFactory.
  2. Check the javax.wsdl.factory.SchemaFactory system property.
  3. Check the lib/wsdl.properties file in the JRE directory. The key will have the same name as the above system property.
  4. Use the default class name provided by the implementation.

Once an instance of a SchemaFactory is obtained, invoke newDefinition(), newSchemaReader(), or newSchemaWriter(), to create the desired instances.

Throws:
SchemaException

newSchema

public abstract Schema newSchema()
Create a new instance of a Definition.


newSchemaReader

public abstract SchemaReader newSchemaReader()
Create a new instance of a SchemaReader.


newSchemaReader

public abstract SchemaReader newSchemaReader(java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> features)
Create a new instance of a SchemaReader.


newSchemaWriter

public abstract SchemaWriter newSchemaWriter()
Create a new instance of a SchemaWriter.


getDefaultSchema

public static Schema getDefaultSchema()
Get the default schema

Returns:
the default schema


Copyright © 2008 eBM WebSourcing. All Rights Reserved.