| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ProcessingInstruction defines behavior for an
XML processing instruction, modeled in Java. Methods
allow the user to obtain the target of the PI as well as its data.
The data can always be accessed as a String, and where appropriate
can be retrieved as name/value pairs.
| Constructor Summary | |
ProcessingInstruction(String target, Map data)This will create a new ProcessingInstruction
with the specified target and data. | |
ProcessingInstruction(String target, String data)This will create a new ProcessingInstruction
with the specified target and data. | |
| Method Summary | |
Object | clone()This will return a clone of this ProcessingInstruction. |
final boolean | equals(Object ob)This tests for equality of this ProcessingInstruction
to the supplied Object. |
String | getData()This will return the raw data from all instructions. |
Document | getDocument()This retrieves the owning Document for
this PI, or null if not a currently a member of a
Document. |
Element | getParent()This will return the parent of this ProcessingInstruction. |
final String | getSerializedForm()This will return the Comment in XML format,
usable in an XML document. |
String | getTarget()This will retrieve the target of the PI. |
String | getValue(String name)This will return the value for a specific name/value pair on the PI. |
final int | hashCode()This returns the hash code for this ProcessingInstruction. |
boolean | removeValue(String name)This will remove the name/value pair with the specified name. |
ProcessingInstruction | setData(String data)This will set the raw data for the PI. |
ProcessingInstruction | setData(Map data)This will set the name/value pairs within the passed Map as the pairs for the data of
this PI. |
ProcessingInstruction | setValue(String name, String value)This will set the value for the specified name/value pair. |
String | toString()This returns a String representation of the
ProcessingInstruction, suitable for debugging. |
| Constructor Detail |
public ProcessingInstruction(String target, Map data)
This will create a new ProcessingInstruction
with the specified target and data.
String target of PI.Map data for PI, in
name/value pairspublic ProcessingInstruction(String target, String data)
This will create a new ProcessingInstruction
with the specified target and data.
String target of PI.String data for PI.| Method Detail |
public Object clone()
This will return a clone of this ProcessingInstruction.
Object - clone of this
ProcessingInstruction.public final boolean equals(Object ob)
This tests for equality of this ProcessingInstruction
to the supplied Object.
Object to compare to.boolean - whether the
ProcessingInstruction is equal to the supplied
Object.public String getData()
This will return the raw data from all instructions.
String - data of PI.public Document getDocument()
This retrieves the owning Document for
this PI, or null if not a currently a member of a
Document.
Document owning this PI, or null.public Element getParent()
This will return the parent of this ProcessingInstruction.
If there is no parent, then this returns null.
ProcessingInstructionpublic final String getSerializedForm()
This will return the Comment in XML format,
usable in an XML document.
String - the serialized form of the
Comment.public String getTarget()
This will retrieve the target of the PI.
String - target of PI.public String getValue(String name)
This will return the value for a specific
name/value pair on the PI. If no such pair is
found for this PI, an empty String
will result.
String name of name/value pair
to lookup value for.String - value of name/value pair.public final int hashCode()
This returns the hash code for this ProcessingInstruction.
int - hash code.public boolean removeValue(String name)
This will remove the name/value pair with the specified name.
boolean - whether the requested
instruction was removed.public ProcessingInstruction setData(String data)
This will set the raw data for the PI.
String data of PI.ProcessingInstruction - this PI modified.public ProcessingInstruction setData(Map data)
This will set the name/value pairs within the passed
Map as the pairs for the data of
this PI. The keys should be the pair name
and the values should be the pair values.
ProcessingInstruction - modified PI.public ProcessingInstruction setValue(String name, String value)
This will set the value for the specified name/value pair. If no matching pair is found, the supplied pair is added to the PI data.
String name of pair.String value for pair.ProcessingInstruction this PI modified.public String toString()
This returns a String representation of the
ProcessingInstruction, suitable for debugging. If the XML
representation of the ProcessingInstruction is desired,
getSerializedForm() should be used.
String - information about the
ProcessingInstruction| Association Links |
to Class java.lang.String
to Class java.util.Map
to Class org.jdom.Element
to Class org.jdom.Document
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||