|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.opensagres.xdocreport.document.preprocessor.sax.BufferedElement
public class BufferedElement
Buffered element which stores start Tag element (ex: ) and end Tag element (ex: ). The start Tag element
stores too the BufferedElement
children.
Field Summary | |
---|---|
protected BufferedEndTagElement |
endTagElement
|
protected BufferedStartTagElement |
startTagElement
|
Constructor Summary | |
---|---|
BufferedElement(BufferedElement parent,
String uri,
String localName,
String name,
Attributes attributes)
|
Method Summary | |
---|---|
void |
addRegion(ISavable region)
Add a savable region in the current tag element. |
void |
append(char c)
Append content in the current tag element. |
void |
append(char[] ch,
int start,
int length)
Append content in the current tag element. |
void |
append(String content)
Append content in the current tag element. |
void |
end()
Set the current buffer with end tag element. |
List<BufferedElement> |
findChildren(BufferedElement element,
String name)
Returns the children element of the given element which match the given name. |
List<BufferedElement> |
findChildren(String name)
Returns the children element of this element which match the given name. |
BufferedElement |
findFirstChild(BufferedElement element,
String name)
Returns the first child element of this element which match the given name and null otherwise. |
BufferedElement |
findFirstChild(String name)
Returns the first child element of the given element which match the given name and null otherwise. |
BufferedElement |
findParent(BufferedElement element,
String name)
Returns the parent element of the given element which match the given name. |
BufferedElement |
findParent(String name)
Returns the parent element of this element which match the given name. |
String |
get(String key)
|
Attributes |
getAttributes()
Returns the static SAX attributes. |
BufferedEndTagElement |
getEndTagElement()
Returns the buffer of the end tag element. |
String |
getEndTagElementName()
Returns the name of this end tag element (ex : ). |
String |
getInnerText()
|
String |
getName()
|
BufferedElement |
getOwnerElement()
Returns the owner element. |
BufferedElement |
getParent()
Returns the parent buffered element of this element. |
BufferedStartTagElement |
getStartTagElement()
Returns the buffer of the start tag element. |
String |
getStartTagElementName()
Returns the name of this start tag element (ex : |
String |
getTextContent()
Returns the text content for this element. |
boolean |
isEnded()
Returns true if current buffer is end tag element and false otherwise. |
boolean |
isReseted()
|
boolean |
isString()
Returns false |
boolean |
match(String name)
Returns true if the given name match the name of this element and false otherwise. |
void |
put(String key,
String value)
|
void |
registerDynamicAttributes()
Register dynamic attributes if needed. |
void |
removeAll(Collection<BufferedElement> elements)
Remove the collection of element. |
void |
reset()
Reset the whole content of the element. |
void |
save(Writer writer)
Write the content of this element in the given writer. |
BufferedAttribute |
setAttribute(String name,
String value)
Set dynamic attribute. |
void |
setContentAfterEndTagElement(String after)
Set content on the after end tag element. |
void |
setContentBeforeStartTagElement(String before)
Set content on the before start tag element. |
void |
setInnerText(String innerText)
|
void |
setTextContent(String content)
Set text content for this element. |
void |
start()
Set the current buffer with start tag element. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final BufferedStartTagElement startTagElement
protected final BufferedEndTagElement endTagElement
Constructor Detail |
---|
public BufferedElement(BufferedElement parent, String uri, String localName, String name, Attributes attributes)
Method Detail |
---|
public boolean match(String name)
name
-
public BufferedStartTagElement getStartTagElement()
public BufferedEndTagElement getEndTagElement()
public void setContentBeforeStartTagElement(String before)
before
- public void setContentAfterEndTagElement(String after)
before
- public BufferedElement getParent()
getParent
in interface IBufferedRegion
public void save(Writer writer) throws IOException
save
in interface ISavable
IOException
public void addRegion(ISavable region)
addRegion
in interface IBufferedRegion
public boolean isString()
isString
in interface IBufferedRegion
public void append(String content)
append
in interface IBufferedRegion
public void append(char[] ch, int start, int length)
append
in interface IBufferedRegion
public void append(char c)
append
in interface IBufferedRegion
public void reset()
public boolean isReseted()
public void removeAll(Collection<BufferedElement> elements)
elements
- public String toString()
toString
in class Object
public BufferedElement getOwnerElement()
getOwnerElement
in interface ISavable
public BufferedElement findParent(String name)
element
- name
-
public BufferedElement findParent(BufferedElement element, String name)
element
- name
-
public List<BufferedElement> findChildren(String name)
name
-
public List<BufferedElement> findChildren(BufferedElement element, String name)
element
- name
-
public BufferedElement findFirstChild(String name)
name
-
public BufferedElement findFirstChild(BufferedElement element, String name)
name
-
public void start()
public void end()
public boolean isEnded()
public String getStartTagElementName()
public String getEndTagElementName()
public void setTextContent(String content)
content
- public String getTextContent()
public Attributes getAttributes()
public void registerDynamicAttributes()
public BufferedAttribute setAttribute(String name, String value)
name
- value
-
public String getName()
public String getInnerText()
public void setInnerText(String innerText)
public String get(String key)
public void put(String key, String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |