org.dom4j.tree

Class FlyweightProcessingInstruction

public class FlyweightProcessingInstruction extends AbstractProcessingInstruction

FlyweightProcessingInstruction is a Flyweight pattern implementation of a singly linked, read-only XML Processing Instruction.

This node could be shared across documents and elements though it does not support the parent relationship.

Version: $Revision: 1.7 $

Author: James Strachan

Field Summary
protected Stringtarget
The target of the PI
protected Stringtext
The values for the PI as a String
protected Mapvalues
The values for the PI in name/value pairs
Constructor Summary
FlyweightProcessingInstruction()
A default constructor for implementors to use.
FlyweightProcessingInstruction(String target, Map values)

This will create a new PI with the given target and values

FlyweightProcessingInstruction(String target, String text)

This will create a new PI with the given target and values

Method Summary
protected NodecreateXPathResult(Element parent)
StringgetTarget()
StringgetText()
StringgetValue(String name)
MapgetValues()
voidsetTarget(String target)

Field Detail

target

protected String target
The target of the PI

text

protected String text
The values for the PI as a String

values

protected Map values
The values for the PI in name/value pairs

Constructor Detail

FlyweightProcessingInstruction

public FlyweightProcessingInstruction()
A default constructor for implementors to use.

FlyweightProcessingInstruction

public FlyweightProcessingInstruction(String target, Map values)

This will create a new PI with the given target and values

Parameters: target is the name of the PI values is the Map of the values for the PI

FlyweightProcessingInstruction

public FlyweightProcessingInstruction(String target, String text)

This will create a new PI with the given target and values

Parameters: target is the name of the PI text is the values for the PI as text

Method Detail

createXPathResult

protected Node createXPathResult(Element parent)

getTarget

public String getTarget()

getText

public String getText()

getValue

public String getValue(String name)

getValues

public Map getValues()

setTarget

public void setTarget(String target)
Copyright B) 2005 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge