kaos.xmlschema.repository
Class XMLRepositoryImpl

java.lang.Object
  extended by kaos.xmlschema.repository.XMLRepositoryImpl
All Implemented Interfaces:
XMLRepository

public class XMLRepositoryImpl
extends java.lang.Object
implements XMLRepository


Constructor Summary
XMLRepositoryImpl()
           
 
Method Summary
 java.util.List getAllSchema()
          to retrieve all schemas in the repositiry.
 java.util.Vector getSchema(java.lang.String dataName)
          to retrieve the schema for the given data type.
 XMLSchemaBuilderImpl getSchemaObject(java.lang.String dataName)
           
 void loadSchema(java.lang.String fileName)
          to load schema definitions of data types from a file.
 void putMultipleSchema(java.util.List schemaList)
          to store multiple schemas in the repositiry.
 void putSchema(java.lang.String dataName, java.lang.String dataSchema)
          to store the given schema definition under the name of that user defined data type
 void putSchemaObject(java.lang.String dataName, XMLSchemaBuilderImpl data)
           
 void removeSchema(java.lang.String dataName)
          to remove the schema for the given data type from this repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLRepositoryImpl

public XMLRepositoryImpl()
Method Detail

putMultipleSchema

public void putMultipleSchema(java.util.List schemaList)
to store multiple schemas in the repositiry.

Specified by:
putMultipleSchema in interface XMLRepository
Parameters:
schemaList - a list containing XMLSchemaContainer objects.

getAllSchema

public java.util.List getAllSchema()
to retrieve all schemas in the repositiry.

Specified by:
getAllSchema in interface XMLRepository

putSchema

public void putSchema(java.lang.String dataName,
                      java.lang.String dataSchema)
to store the given schema definition under the name of that user defined data type

Specified by:
putSchema in interface XMLRepository
Parameters:
dataName - the name of the defined data type.

putSchemaObject

public void putSchemaObject(java.lang.String dataName,
                            XMLSchemaBuilderImpl data)

getSchema

public java.util.Vector getSchema(java.lang.String dataName)
                           throws DatatypeException
to retrieve the schema for the given data type. please note that a derived data type can have as its parent a data type which is also dervied from some other data type. hence the method returns a vector, containing schema definitions for all such data types in the hierarchy.

Specified by:
getSchema in interface XMLRepository
Parameters:
dataName - the name of the data type to be retrieved.
Returns:
a vector containing all the data type definitions in the chain of inheritance.
Throws:
DatatypeException

getSchemaObject

public XMLSchemaBuilderImpl getSchemaObject(java.lang.String dataName)
                                     throws DatatypeException
Throws:
DatatypeException

removeSchema

public void removeSchema(java.lang.String dataName)
                  throws DatatypeException
to remove the schema for the given data type from this repository.

Specified by:
removeSchema in interface XMLRepository
Parameters:
dataName - the name of the data type to be removed.
Throws:
DatatypeException

loadSchema

public void loadSchema(java.lang.String fileName)
                throws DatatypeException
to load schema definitions of data types from a file.

Specified by:
loadSchema in interface XMLRepository
Parameters:
fileName - the name of the file or the url that stores schema definitions
Throws:
DatatypeException