com.eviware.soapui.impl.wadl.inference
Interface InferredSchema

All Known Implementing Classes:
InferredSchemaImpl

public interface InferredSchema

XML Schema inferred from gathered XML data.

Author:
Dain Nilsson

Nested Class Summary
static class InferredSchema.Factory
          Static factory class for creating new instances.
 
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 schemaTypeSystem)
           
 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.
 

Method Detail

getSchemaTypeSystem

org.apache.xmlbeans.SchemaTypeSystem getSchemaTypeSystem()
Method for reading out the inferred schema, in its current form.

Returns:
The inferred schema.

processValidXml

void processValidXml(org.apache.xmlbeans.XmlObject xml)
                     throws org.apache.xmlbeans.XmlException
Expands the inferred schema to accept the input XML as valid.

Parameters:
xml - An XmlObject that is assumed to be valid.
Throws:
org.apache.xmlbeans.XmlException

validate

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

Parameters:
xml -
Returns:
Returns true if the content validated successfully, false if not.

learningValidate

void learningValidate(org.apache.xmlbeans.XmlObject xml,
                      ConflictHandler handler)
                      throws org.apache.xmlbeans.XmlException
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.

Parameters:
xml -
handler -
Throws:
org.apache.xmlbeans.XmlException - for validation error.

save

void save(java.io.OutputStream os)
          throws java.io.IOException
Writes the XML represented by this InferredSchema.

Parameters:
os -
Throws:
java.io.IOException

getXsdForNamespace

java.lang.String getXsdForNamespace(java.lang.String namespace)
Returns a string representation of the XML Schema for a particular namespace, if available.

Parameters:
namespace -
Returns:
A String representation of the XML Schema describing the namespace.

getNamespaces

java.lang.String[] getNamespaces()
Returns a list of inferred namespaces.

Returns:
A Set containing all inferred namespaces.

deleteNamespace

void deleteNamespace(java.lang.String ns)

getSchemaTypeSystem

org.apache.xmlbeans.SchemaTypeSystem getSchemaTypeSystem(org.apache.xmlbeans.SchemaTypeSystem schemaTypeSystem)


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