Particle.Factory, Particle.ParticleType
Constructor and Description |
---|
AttributeParticle(AttributeParticleConfig xml,
Schema schema) |
AttributeParticle(Schema schema,
String name) |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(String key)
Get the attribute value that corresponds to the given name.
|
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.
|
AttributeParticleConfig |
save() |
void |
setAttribute(String key,
String value)
Set an attribute.
|
void |
setType(Type type)
Set the Type of the element or attribute that is described by this
particle.
|
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.
|
public AttributeParticle(AttributeParticleConfig xml, Schema schema)
public AttributeParticleConfig save()
public String getAttribute(String key)
Particle
getAttribute
in interface Particle
key
- The name of the attribute to get the value for.public QName getName()
Particle
public Type getType()
Particle
public void setAttribute(String key, String value)
Particle
setAttribute
in interface Particle
key
- The name of the attribute to set.value
- The value to set.public void setType(Type type)
Particle
public void validate(Context context) throws org.apache.xmlbeans.XmlException
Particle
public Particle.ParticleType getPType()
Particle
Copyright © 2019. All Rights Reserved.