Main Page   Packages   Namespace List   Class Hierarchy   Compound List   Compound Members  

ProcessingInstruction Class Reference

List of all members.

Public Methods

 ProcessingInstruction (String target, Map data)
 ProcessingInstruction (String target, String data)
Element getParent ()
ProcessingInstruction detach ()
Document getDocument ()
String getTarget ()
String getData ()
List getNames ()
ProcessingInstruction setData (String data)
ProcessingInstruction setData (Map data)
String getValue (String name)
ProcessingInstruction setValue (String name, String value)
boolean removeValue (String name)
String toString ()
final boolean equals (Object ob)
final int hashCode ()
Object clone ()

Protected Methods

 ProcessingInstruction ()
ProcessingInstruction setParent (Element parent)
ProcessingInstruction setDocument (Document document)

Protected Attributes

String target
String rawData
Map mapData
Object parent

Detailed Description

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.

Author:
Brett McLaughlin , Jason Hunter , Steven Gould
Version:
Revision:
1.24
,
Date:
2002/02/12 06:34:09


Constructor & Destructor Documentation

ProcessingInstruction::ProcessingInstruction   [inline, protected]
 

Default, no-args constructor for implementations to use if needed.

ProcessingInstruction::ProcessingInstruction String    target,
Map    data
[inline]
 

This will create a new ProcessingInstruction with the specified target and data.

Parameters:
target  String target of PI.
data  Map data for PI, in name/value pairs
Exceptions:
IllegalTargetException  if the given target is invalid as a processing instruction name.

ProcessingInstruction::ProcessingInstruction String    target,
String    data
[inline]
 

This will create a new ProcessingInstruction with the specified target and data.

Parameters:
target  String target of PI.
rawData  String data for PI.
Exceptions:
IllegalTargetException  if the given target is invalid as a processing instruction name.


Member Function Documentation

Object ProcessingInstruction::clone   [inline]
 

This will return a clone of this ProcessingInstruction.

Returns:
Object - clone of this ProcessingInstruction.

ProcessingInstruction ProcessingInstruction::detach   [inline]
 

This detaches the PI from its parent, or does nothing if the PI has no parent.

Returns:
ProcessingInstruction - this ProcessingInstruction modified.

final boolean ProcessingInstruction::equals Object    ob [inline]
 

This tests for equality of this ProcessingInstruction to the supplied Object.

Parameters:
ob  Object to compare to.
Returns:
boolean - whether the ProcessingInstruction is equal to the supplied Object.

String ProcessingInstruction::getData   [inline]
 

This will return the raw data from all instructions.

Returns:
String - data of PI.

Document ProcessingInstruction::getDocument   [inline]
 

This retrieves the owning Document for this PI, or null if not a currently a member of a Document.

Returns:
Document owning this PI, or null.

List ProcessingInstruction::getNames   [inline]
 

This will return a List containing the names of the "attribute" style pieces of name/value pairs in this PI's data.

Returns:
List - the List containing the "attribute" names.

Element ProcessingInstruction::getParent   [inline]
 

This will return the parent of this ProcessingInstruction. If there is no parent, then this returns null.

Returns:
parent of this ProcessingInstruction

String ProcessingInstruction::getTarget   [inline]
 

This will retrieve the target of the PI.

Returns:
String - target of PI.

String ProcessingInstruction::getValue String    name [inline]
 

This will return the value for a specific name/value pair on the PI. If no such pair is found for this PI, null is returned.

Parameters:
name  String name of name/value pair to lookup value for.
Returns:
String - value of name/value pair.

final int ProcessingInstruction::hashCode   [inline]
 

This returns the hash code for this ProcessingInstruction.

Returns:
int - hash code.

boolean ProcessingInstruction::removeValue String    name [inline]
 

This will remove the name/value pair with the specified name.

Returns:
boolean - whether the requested instruction was removed.

ProcessingInstruction ProcessingInstruction::setData Map    data [inline]
 

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.

Returns:
ProcessingInstruction - modified PI.

ProcessingInstruction ProcessingInstruction::setData String    data [inline]
 

This will set the raw data for the PI.

Parameters:
rawData  String data of PI.
Returns:
ProcessingInstruction - this PI modified.

ProcessingInstruction ProcessingInstruction::setDocument Document    document [inline, protected]
 

This sets the Document parent of this PI.

Parameters:
document  Document parent
Returns:
this PI modified

ProcessingInstruction ProcessingInstruction::setParent Element    parent [inline, protected]
 

This will set the parent of this ProcessingInstruction.

Parameters:
parent  Element to be new parent.
Returns:
this ProcessingInstruction modified.

ProcessingInstruction ProcessingInstruction::setValue String    name,
String    value
[inline]
 

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.

Parameters:
name  String name of pair.
value  String value for pair.
Returns:
ProcessingInstruction this PI modified.

String ProcessingInstruction::toString   [inline]
 

This returns a String representation of the ProcessingInstruction, suitable for debugging. If the XML representation of the ProcessingInstruction is desired, XMLOutputter::outputString should be used.

Returns:
String - information about the ProcessingInstruction


Member Data Documentation

Map ProcessingInstruction::mapData [protected]
 

The data for the PI in name/value pairs

Object ProcessingInstruction::parent [protected]
 

Parent element, document, or null if none

String ProcessingInstruction::rawData [protected]
 

The data for the PI as a String

String ProcessingInstruction::target [protected]
 

The target of the PI


The documentation for this class was generated from the following file:
Generated on Sat Mar 30 18:53:04 2002 for JDOM by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001