com.eviware.soapui.impl.wadl.inference.support
Class InferredSchemaImpl

java.lang.Object
  extended by com.eviware.soapui.impl.wadl.inference.support.InferredSchemaImpl
All Implemented Interfaces:
InferredSchema

public class InferredSchemaImpl
extends java.lang.Object
implements InferredSchema


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.eviware.soapui.impl.wadl.inference.InferredSchema
InferredSchema.Factory
 
Constructor Summary
InferredSchemaImpl()
           
InferredSchemaImpl(java.io.InputStream is)
           
 
Method Summary
 void deleteNamespace(java.lang.String ns)
           
 java.lang.String[] getNamespaces()
          Returns a list of inferred namespaces.
 org.apache.xmlbeans.SchemaTypeSystem getSchemaTypeSystem()
          Method for reading out the inferred schema, in its current form.
 org.apache.xmlbeans.SchemaTypeSystem getSchemaTypeSystem(org.apache.xmlbeans.SchemaTypeSystem sts)
           
 java.lang.String getXsdForNamespace(java.lang.String namespace)
          Returns a string representation of the XML Schema for a particular namespace, if available.
 void learningValidate(org.apache.xmlbeans.XmlObject xml, ConflictHandler handler)
          Attempts to validate the given XML against the inferred schema.
 void processValidXml(org.apache.xmlbeans.XmlObject xml)
          Expands the inferred schema to accept the input XML as valid.
 void save(java.io.OutputStream os)
          Writes the XML represented by this InferredSchema.
 boolean validate(org.apache.xmlbeans.XmlObject xml)
          Attempts to validate the given XML against the inferred schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InferredSchemaImpl

public InferredSchemaImpl()

InferredSchemaImpl

public InferredSchemaImpl(java.io.InputStream is)
                   throws org.apache.xmlbeans.XmlException,
                          java.io.IOException
Throws:
org.apache.xmlbeans.XmlException
java.io.IOException
Method Detail

getNamespaces

public java.lang.String[] getNamespaces()
Description copied from interface: InferredSchema
Returns a list of inferred namespaces.

Specified by:
getNamespaces in interface InferredSchema
Returns:
A Set containing all inferred namespaces.

getSchemaTypeSystem

public org.apache.xmlbeans.SchemaTypeSystem getSchemaTypeSystem()
Description copied from interface: InferredSchema
Method for reading out the inferred schema, in its current form.

Specified by:
getSchemaTypeSystem in interface InferredSchema
Returns:
The inferred schema.

getSchemaTypeSystem

public org.apache.xmlbeans.SchemaTypeSystem getSchemaTypeSystem(org.apache.xmlbeans.SchemaTypeSystem sts)
Specified by:
getSchemaTypeSystem in interface InferredSchema

getXsdForNamespace

public java.lang.String getXsdForNamespace(java.lang.String namespace)
Description copied from interface: InferredSchema
Returns a string representation of the XML Schema for a particular namespace, if available.

Specified by:
getXsdForNamespace in interface InferredSchema
Returns:
A String representation of the XML Schema describing the namespace.

learningValidate

public void learningValidate(org.apache.xmlbeans.XmlObject xml,
                             ConflictHandler handler)
                      throws org.apache.xmlbeans.XmlException
Description copied from interface: InferredSchema
Attempts to validate the given XML against the inferred schema. Any errors detected need to be resolved to either expand the schema, or the input will cause an XmlException to be thrown.

Specified by:
learningValidate in interface InferredSchema
Throws:
org.apache.xmlbeans.XmlException - for validation error.

processValidXml

public void processValidXml(org.apache.xmlbeans.XmlObject xml)
                     throws org.apache.xmlbeans.XmlException
Description copied from interface: InferredSchema
Expands the inferred schema to accept the input XML as valid.

Specified by:
processValidXml in interface InferredSchema
Parameters:
xml - An XmlObject that is assumed to be valid.
Throws:
org.apache.xmlbeans.XmlException

save

public void save(java.io.OutputStream os)
          throws java.io.IOException
Description copied from interface: InferredSchema
Writes the XML represented by this InferredSchema.

Specified by:
save in interface InferredSchema
Throws:
java.io.IOException

validate

public boolean validate(org.apache.xmlbeans.XmlObject xml)
Description copied from interface: InferredSchema
Attempts to validate the given XML against the inferred schema. Any errors detected will cause validation to halt and return false.

Specified by:
validate in interface InferredSchema
Returns:
Returns true if the content validated successfully, false if not.

deleteNamespace

public void deleteNamespace(java.lang.String ns)
Specified by:
deleteNamespace in interface InferredSchema


Copyright © 2005-2009 eviware.com. All Rights Reserved.