Package org.faceless.publisher.type
Class ProcessingInstruction
java.lang.Object
org.faceless.publisher.type.ProcessingInstruction
Represents a single XML processing-instruction, with a "type" and "data".
Presumes that the "data" parameters is broken into parameters the same way as
the "xml-stylesheet" processing instruction. Most are.
- See Also:
-
- processing-instruction specification
- xml-stylesheet procssing-instruction specification
-
Constructor Summary
ConstructorDescriptionCreate a new empty processing-instructionProcessingInstruction
(String type, String data) Create a new processing-instructionCreate a new empty processing-instruction that is a clone of that supplied -
Method Summary
Modifier and TypeMethodDescriptionRetrieve a parameter value from this processing-instructiongetData()
Return a "data" string representing the encoded parameters returned bygetParameters()
Return an unmodifiable map representing the key/value pairs on this processing-instructiongetType()
Return the type of this processing-instruction, as set bysetType(java.lang.String)
Put a new parameter key/value pair into this processing-instructionSet the type of this processing-instructiontoString()
-
Constructor Details
-
ProcessingInstruction
public ProcessingInstruction()Create a new empty processing-instruction -
ProcessingInstruction
Create a new empty processing-instruction that is a clone of that supplied- Parameters:
pi
- the processing-instruction to clone
-
ProcessingInstruction
Create a new processing-instruction- Parameters:
type
- the type, eg "link" or "xml-stylesheet"data
- the data value of the processing instruction, which will ba parsed into individual key/value pairs
-
-
Method Details
-
setType
Set the type of this processing-instruction- Parameters:
type
- the type, eg "link" or "xml-stylesheet"- Returns:
- this
-
getType
Return the type of this processing-instruction, as set bysetType(java.lang.String)
- Returns:
- the type
-
toString
-
put
Put a new parameter key/value pair into this processing-instruction- Parameters:
key
- the keyvalue
- the value, or null to remoe the key- Returns:
- this
-
get
Retrieve a parameter value from this processing-instruction- Parameters:
key
- the key- Returns:
- the value, or null if not found
-
getParameters
Return an unmodifiable map representing the key/value pairs on this processing-instruction- Returns:
- the map
-
getData
Return a "data" string representing the encoded parameters returned bygetParameters()
- Returns:
- the data string
-