org.ipdr.utils
Class SchemaUtil

java.lang.Object
  extended by org.ipdr.utils.SchemaUtil

public class SchemaUtil
extends java.lang.Object

This class is added to validate the CompositeData against Schema object.


Field Summary
protected static Schema schema_
          To store the schema object.
 
Constructor Summary
SchemaUtil()
           
 
Method Summary
protected static java.lang.String subNameSpaceIDWithURI(java.lang.String nameComp)
          This method is used to replace the attribute names prefixed with nameSpaceID present in CompData with attribute names prefixed with nameSpaceURI.
static void validateAgainstSchema(CompositeData cData, Schema s)
          This method is used to validate a given CompositeData object against a schema object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schema_

protected static Schema schema_
To store the schema object.

Constructor Detail

SchemaUtil

public SchemaUtil()
Method Detail

validateAgainstSchema

public static void validateAgainstSchema(CompositeData cData,
                                         Schema s)
                                  throws IPDRException
This method is used to validate a given CompositeData object against a schema object.

Parameters:
cData - CompositeData to validate
s - Schema to validate against
Throws:
IPDRException

subNameSpaceIDWithURI

protected static java.lang.String subNameSpaceIDWithURI(java.lang.String nameComp)
                                                 throws IPDRException
This method is used to replace the attribute names prefixed with nameSpaceID present in CompData with attribute names prefixed with nameSpaceURI.

Parameters:
nameComp - Attribute name of string type
Returns:
nameCompWithURI Attribute name prefixed with nameSpaceURI of string type
Throws:
IPDRException