An attribute or element in the schema. Has a name, a type, and zero or more attributes.
Modifiers | Name | Description |
---|---|---|
class |
Particle.Factory |
A static factory class for creating new instances. |
enum |
Particle.ParticleType |
An enum representing one of two particle types, element or attribute. |
Type Params | Return Type | Name and description |
---|---|---|
|
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. |
|
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. |
Get the attribute value that corresponds to the given name.
key
- The name of the attribute to get the value for.Get the QName of this Particle.
Get the ParticleType of the Particle, that is, attribute or element.
Get the Type of the element or attribute that is described by this particle.
Set an attribute.
key
- The name of the attribute to set.value
- The value to set.Set the Type of the element or attribute that is described by this particle.
type
- The Type to set.Validates an XML document contained in a given Context object, at the position specified by the cursor contained in same Context object.
context
- A Context object containing the XML data to be validated, and
other needed contextual variables.