com.eviware.soapui.impl.wadl.inference.schema
Interface Particle

All Known Implementing Classes:
AttributeParticle, ElementParticle, ReferenceParticle

public interface Particle

An attribute or element in the schema. Has a name, a type, and zero or more attributes.

Author:
Dain Nilsson

Nested Class Summary
static class Particle.Factory
          A static factory class for creating new instances.
static class Particle.ParticleType
          An enum representing one of two particle types, element or attribute.
 
Method Summary
 java.lang.String getAttribute(java.lang.String key)
          Get the attribute value that corresponds to the given name.
 javax.xml.namespace.QName getName()
          Get the QName of this Particle.
 Particle.ParticleType getPType()
          Get the ParticleType of the Particle, that is, attribute or element.
 Type getType()
          Get the Type of the element or attribute that is described by this particle.
 com.eviware.soapui.inferredSchema.ParticleConfig save()
           
 void setAttribute(java.lang.String key, java.lang.String value)
          Set an attribute.
 void setType(Type type)
          Set the Type of the element or attribute that is described by this particle.
 void validate(Context context)
          Validates an XML document contained in a given Context object, at the position specified by the cursor contained in same Context object.
 

Method Detail

getName

javax.xml.namespace.QName getName()
Get the QName of this Particle.

Returns:
The QName describing the particles name and namespace.

getPType

Particle.ParticleType getPType()
Get the ParticleType of the Particle, that is, attribute or element.

Returns:
Returns the type of particle this is.

getType

Type getType()
Get the Type of the element or attribute that is described by this particle.

Returns:
Returns the Type that corresponds to the particle.

setType

void setType(Type type)
Set the Type of the element or attribute that is described by this particle.

Parameters:
type - The Type to set.

getAttribute

java.lang.String getAttribute(java.lang.String key)
Get the attribute value that corresponds to the given name.

Parameters:
key - The name of the attribute to get the value for.
Returns:
Returns the value for the attribute.

setAttribute

void setAttribute(java.lang.String key,
                  java.lang.String value)
Set an attribute.

Parameters:
key - The name of the attribute to set.
value - The value to set.

validate

void validate(Context context)
              throws org.apache.xmlbeans.XmlException
Validates an XML document contained in a given Context object, at the position specified by the cursor contained in same Context object.

Parameters:
context - A Context object containing the XML data to be validated, and other needed contextual variables.
Throws:
org.apache.xmlbeans.XmlException - On unresolvable validation error.

save

com.eviware.soapui.inferredSchema.ParticleConfig save()


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