sk.uniba.euromath.document.schema.impl
Class SchemaFactoryImpl

java.lang.Object
  extended by sk.uniba.euromath.document.schema.impl.SchemaFactoryImpl
All Implemented Interfaces:
ISchemaFactory

public final class SchemaFactoryImpl
extends Object
implements ISchemaFactory

Implementation of Schema factory. Is not intended to be used by clients.

Author:
Martin Vysny

Field Summary
 
Fields inherited from interface sk.uniba.euromath.document.schema.plug.ISchemaFactory
EXTENSION_POINT_ID
 
Constructor Summary
SchemaFactoryImpl()
           
 
Method Summary
 ISchema getSchema(String namespaceURI, IValidationContextP context)
          Produces a schema object from file represented by url.
 Set<? extends String> getSupported()
          Returns set of supported namespaces.
protected  boolean isDTD(String fileName)
          Returns true if the schema specified is DTD.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaFactoryImpl

public SchemaFactoryImpl()
Method Detail

isDTD

protected final boolean isDTD(String fileName)
Returns true if the schema specified is DTD. Currently, schema is DTD if its fileName ends with ".DTD".

Parameters:
fileName - schema file to query.
Returns:
true if the schema is DTD.

getSupported

public Set<? extends String> getSupported()
Description copied from interface: ISchemaFactory
Returns set of supported namespaces. The set won't get modified.

Specified by:
getSupported in interface ISchemaFactory
Returns:
set of all namespaces that this factory understands.

getSchema

public ISchema getSchema(String namespaceURI,
                         IValidationContextP context)
                  throws SchemaException,
                         IOException
Description copied from interface: ISchemaFactory
Produces a schema object from file represented by url. This schema should accept elements from this namespace.

Specified by:
getSchema in interface ISchemaFactory
Parameters:
namespaceURI - the namespace URI the schema will validate.
context - the validation context.
Returns:
Schema object, it must never be null.
Throws:
SchemaException - when error in loading of schema occurs.
IOException - if i/o error occurs during schema loading.


Copyright © 2003-2006 null. All Rights Reserved.