|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.simonstl.fragment.DocComponent
The DocComponent abstract class stores information about XML document components in a way which makes it easy use them in a streaming SAX environment.
Version 0.04 removes the isAttribute
property and getIsAttribute()
method.
Version 0.03 adds the cleanDuplicate()
method.
Version 0.02 adds the boolean isAttribute
and the getIsAttribute()
method.
version 0.01 is the initial release, based on version 0.05 of the Element class.
Field Summary | |
protected java.lang.String |
after
|
protected java.lang.String |
before
|
protected java.lang.String |
content
|
protected java.lang.String |
localName
|
protected java.lang.String |
nsURI
|
protected Element |
parentElement
|
protected java.lang.String |
prefix
|
protected java.lang.String |
type
|
Constructor Summary | |
DocComponent()
|
Method Summary | |
void |
addContent(DocComponent newComponent)
Sets the content for this component. |
abstract DocComponent |
cleanDuplicate()
Returns a clean copy of the component and its contents. |
void |
clearContent()
Clears the content for this component. |
java.lang.Object |
clone()
This method is here to provide clone-ability. |
abstract void |
eventComponent(FragmentFilter handler)
Describes the content for this component as a series of SAX events. |
java.lang.String |
getAfter()
Returns a string of content which may appear after the component |
java.lang.String |
getBefore()
Returns a string of content which may appear before the component |
java.lang.String |
getContent()
Returns the content for this component. |
abstract java.lang.String |
getKey()
Returns a key which can be used as a unique identifier for this component. |
java.lang.String |
getLocalName()
Returns the local name for the component |
java.lang.String |
getNsURI()
Returns the URI reference value for the namespace. |
Element |
getParentElement()
Gets the parent element for this component (unused). |
java.lang.String |
getPrefix()
Returns the prefix used to represent the namespace URI reference for this component. |
java.lang.String |
getType()
Sets the type for this component. |
boolean |
matchComponent(DocComponent compare)
Tests equality for rule-matching. |
boolean |
matchComponent(java.lang.String match)
Takes a string representing a component description and returns true or false to indicate whether or not it matches this component. |
abstract void |
print()
Prints a representation of the component to STDOUT |
void |
processComponentContent(FragmentRules rules)
Supports processing of content, if any. |
void |
setAfter(java.lang.String newAfter)
Sets a string of content which may appear after the component |
void |
setBefore(java.lang.String newBefore)
Sets a string of content which may appear before the component |
void |
setContent(java.lang.String newContent)
Sets the content for this component. |
void |
setLocalName(java.lang.String newLocalName)
Accepts a string which will serve as the local name for this component. |
void |
setNsURI(java.lang.String newNsURI)
Accepts a URI reference value which is used as the namespace for the component. |
void |
setParentElement(Element _parentElement)
Sets the parent element for this component (unused). |
void |
setPrefix(java.lang.String newPrefix)
Accepts a string which serves as the prefix for this component. |
void |
setType(java.lang.String _type)
Gets the type for this component. |
abstract java.lang.String |
toString()
Returns a representation of the component as a String. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String nsURI
protected java.lang.String localName
protected java.lang.String prefix
protected java.lang.String content
protected java.lang.String before
protected java.lang.String after
protected java.lang.String type
protected Element parentElement
Constructor Detail |
public DocComponent()
Method Detail |
public boolean matchComponent(java.lang.String match)
public abstract java.lang.String getKey()
public void setNsURI(java.lang.String newNsURI)
public java.lang.String getNsURI()
public void setLocalName(java.lang.String newLocalName)
public java.lang.String getLocalName()
public void setPrefix(java.lang.String newPrefix)
public java.lang.String getPrefix()
public void setContent(java.lang.String newContent)
public void addContent(DocComponent newComponent)
public void clearContent()
public java.lang.String getContent()
public void setBefore(java.lang.String newBefore)
public java.lang.String getBefore()
public void setAfter(java.lang.String newAfter)
public java.lang.String getAfter()
public java.lang.String getType()
public void setType(java.lang.String _type)
public boolean matchComponent(DocComponent compare)
public abstract void eventComponent(FragmentFilter handler) throws org.xml.sax.SAXException
FragmentFilter
supports some events (startChars and endChars) which
are extensions to the existing SAX models and which serve to keep the stacks under control.public abstract void print()
public abstract java.lang.String toString()
toString
in class java.lang.Object
public void processComponentContent(FragmentRules rules)
public void setParentElement(Element _parentElement)
public Element getParentElement()
public abstract DocComponent cleanDuplicate()
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |