com.eviware.soapui.impl.wadl.inference.schema.particles
Class ElementParticle

java.lang.Object
  extended by com.eviware.soapui.impl.wadl.inference.schema.particles.ElementParticle
All Implemented Interfaces:
Particle

public class ElementParticle
extends java.lang.Object
implements Particle

Represents an xs:element, with a name, a type, etc.

Author:
Dain Nilsson

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.eviware.soapui.impl.wadl.inference.schema.Particle
Particle.Factory, Particle.ParticleType
 
Constructor Summary
ElementParticle(com.eviware.soapui.inferredSchema.ElementParticleConfig xml, Schema schema)
           
ElementParticle(Schema schema, java.lang.String name)
           
 
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.ElementParticleConfig 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.
 java.lang.String toString()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementParticle

public ElementParticle(Schema schema,
                       java.lang.String name)

ElementParticle

public ElementParticle(com.eviware.soapui.inferredSchema.ElementParticleConfig xml,
                       Schema schema)
Method Detail

save

public com.eviware.soapui.inferredSchema.ElementParticleConfig save()
Specified by:
save in interface Particle

getAttribute

public java.lang.String getAttribute(java.lang.String key)
Description copied from interface: Particle
Get the attribute value that corresponds to the given name.

Specified by:
getAttribute in interface Particle
Parameters:
key - The name of the attribute to get the value for.
Returns:
Returns the value for the attribute.

getName

public javax.xml.namespace.QName getName()
Description copied from interface: Particle
Get the QName of this Particle.

Specified by:
getName in interface Particle
Returns:
The QName describing the particles name and namespace.

getType

public Type getType()
Description copied from interface: Particle
Get the Type of the element or attribute that is described by this particle.

Specified by:
getType in interface Particle
Returns:
Returns the Type that corresponds to the particle.

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Description copied from interface: Particle
Set an attribute.

Specified by:
setAttribute in interface Particle
Parameters:
key - The name of the attribute to set.
value - The value to set.

setType

public void setType(Type type)
Description copied from interface: Particle
Set the Type of the element or attribute that is described by this particle.

Specified by:
setType in interface Particle
Parameters:
type - The Type to set.

validate

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

Specified by:
validate in interface Particle
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.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPType

public Particle.ParticleType getPType()
Description copied from interface: Particle
Get the ParticleType of the Particle, that is, attribute or element.

Specified by:
getPType in interface Particle
Returns:
Returns the type of particle this is.


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