com.eviware.soapui.impl.wadl.inference.schema
Class SchemaSystem

java.lang.Object
  extended by com.eviware.soapui.impl.wadl.inference.schema.SchemaSystem

public class SchemaSystem
extends java.lang.Object

Represents a set of namespaces with inferred schemas.

Author:
Dain Nilsson

Constructor Summary
SchemaSystem()
          Constructs a new SchemaSystem object.
SchemaSystem(com.eviware.soapui.inferredSchema.SchemaSetConfig xml)
          Constructs a SchemaSystem object using previously saved data.
 
Method Summary
 void deleteNamespace(java.lang.String ns)
           
 java.util.Set<java.lang.String> getNamespaces()
          Get a list of contained namespaces.
 Schema getSchemaForNamespace(java.lang.String namespace)
          Returns the matching Schema for the given namespace.
 Type getType(javax.xml.namespace.QName qname)
          Get an existing Type by its QName.
 Schema newSchema(java.lang.String namespace)
          Create a blank new Schema under this SchemaSystem for a given namespace.
 void save(com.eviware.soapui.inferredSchema.SchemaSetConfig xml)
          Saves the SchemaSystem to an XmlObject.
 void validate(org.apache.xmlbeans.XmlObject xmlo, ConflictHandler handler)
          Validate an XmlObject against the contained inferred schemas.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaSystem

public SchemaSystem()
Constructs a new SchemaSystem object.


SchemaSystem

public SchemaSystem(com.eviware.soapui.inferredSchema.SchemaSetConfig xml)
Constructs a SchemaSystem object using previously saved data.

Parameters:
xml - The XmlObject to which data has previously been saved.
Method Detail

save

public void save(com.eviware.soapui.inferredSchema.SchemaSetConfig xml)
Saves the SchemaSystem to an XmlObject.

Parameters:
xml - A blank XmlObject to save to.

newSchema

public Schema newSchema(java.lang.String namespace)
Create a blank new Schema under this SchemaSystem for a given namespace.

Parameters:
namespace - The namespace for which to create a Schema.
Returns:
The newly created Schema.

getSchemaForNamespace

public Schema getSchemaForNamespace(java.lang.String namespace)
Returns the matching Schema for the given namespace.

Parameters:
namespace - A namespace that already exists within the SchemaSystem.
Returns:
Returns the Schema corresponding to the given namespace if one exists. Otherwise returns null.

getType

public Type getType(javax.xml.namespace.QName qname)
Get an existing Type by its QName.

Parameters:
qname - A QName containing the namespace URI of the schema in which the Type exists, and also the name of the type.
Returns:
Returns the Type, if one is found. Otherwise returns null.

validate

public void validate(org.apache.xmlbeans.XmlObject xmlo,
                     ConflictHandler handler)
              throws org.apache.xmlbeans.XmlException
Validate an XmlObject against the contained inferred schemas. Upon validation errors, the ConflictHandler is used to determine if a schema should be adjusted, or if validation should fail.

Parameters:
xmlo - An XmlObject containing the document to be validated.
handler - A ConflictHandler to use on validation errors.
Throws:
org.apache.xmlbeans.XmlException - On unresolvable validation error.

getNamespaces

public java.util.Set<java.lang.String> getNamespaces()
Get a list of contained namespaces.

Returns:
Returns the contained namespaces, as a Set.

deleteNamespace

public void deleteNamespace(java.lang.String ns)


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