public class BufferedElement extends java.lang.Object implements IBufferedRegion
BufferedElement
children.| Modifier and Type | Field and Description |
|---|---|
protected BufferedEndTagElement |
endTagElement |
protected BufferedStartTagElement |
startTagElement |
| Constructor and Description |
|---|
BufferedElement(BufferedElement parent,
java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes attributes) |
| Modifier and Type | Method and Description |
|---|---|
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(java.lang.String content)
Append content in the current tag element.
|
void |
end()
Set the current buffer with end tag element.
|
BufferedElement |
findChildAt(BufferedElement element,
java.lang.String name,
int index)
Returns the first child element of this element which match the given
name and null otherwise.
|
BufferedElement |
findChildAt(java.lang.String name,
int index)
Returns the first child element of the given element which match the
given name and null otherwise.
|
java.util.List<BufferedElement> |
findChildren(BufferedElement element,
java.lang.String name)
Returns the children element of the given element which match the given
name.
|
java.util.List<BufferedElement> |
findChildren(java.lang.String name)
Returns the children element of this element which match the given name.
|
BufferedElement |
findFirstChild(BufferedElement element,
java.lang.String name)
Returns the first child element of this element which match the given
name and null otherwise.
|
BufferedElement |
findFirstChild(java.lang.String name)
Returns the first child element of the given element which match the
given name and null otherwise.
|
BufferedElement |
findParent(BufferedElement element,
java.lang.String name)
Returns the parent element of the given element which match the given
name.
|
BufferedElement |
findParent(java.lang.String name)
Returns the parent element of this element which match the given name.
|
java.lang.String |
get(java.lang.String key) |
org.xml.sax.Attributes |
getAttributes()
Returns the static SAX attributes.
|
BufferedEndTagElement |
getEndTagElement()
Returns the buffer of the end tag element.
|
java.lang.String |
getEndTagElementName()
Returns the name of this end tag element (ex : ).
|
java.lang.String |
getInnerText() |
java.lang.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.
|
java.lang.String |
getStartTagElementName()
Returns the name of this start tag element (ex :
|
java.lang.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(java.lang.String name)
Returns true if the given name match the name of this element and false
otherwise.
|
void |
put(java.lang.String key,
java.lang.String value) |
void |
registerDynamicAttributes()
Register dynamic attributes if needed.
|
void |
removeAll(java.util.Collection<BufferedElement> elements)
Remove the collection of element.
|
void |
reset()
Reset the whole content of the element.
|
void |
save(java.io.Writer writer)
Write the content of this element in the given writer.
|
BufferedAttribute |
setAttribute(java.lang.String name,
java.lang.String value)
Set dynamic attribute.
|
void |
setContentAfterEndTagElement(java.lang.String after)
Set content on the after end tag element.
|
void |
setContentBeforeStartTagElement(java.lang.String before)
Set content on the before start tag element.
|
void |
setInnerText(java.lang.String innerText) |
void |
setTextContent(java.lang.String content)
Set text content for this element.
|
void |
start()
Set the current buffer with start tag element.
|
java.lang.String |
toString() |
protected final BufferedStartTagElement startTagElement
protected final BufferedEndTagElement endTagElement
public BufferedElement(BufferedElement parent, java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attributes)
public boolean match(java.lang.String name)
name - public BufferedStartTagElement getStartTagElement()
public BufferedEndTagElement getEndTagElement()
public void setContentBeforeStartTagElement(java.lang.String before)
before - public void setContentAfterEndTagElement(java.lang.String after)
before - public BufferedElement getParent()
getParent in interface IBufferedRegionpublic void save(java.io.Writer writer)
throws java.io.IOException
public void addRegion(ISavable region)
addRegion in interface IBufferedRegionpublic boolean isString()
isString in interface IBufferedRegionpublic void append(java.lang.String content)
append in interface IBufferedRegionpublic void append(char[] ch,
int start,
int length)
append in interface IBufferedRegionpublic void append(char c)
append in interface IBufferedRegionpublic void reset()
public boolean isReseted()
public void removeAll(java.util.Collection<BufferedElement> elements)
elements - public java.lang.String toString()
toString in class java.lang.Objectpublic BufferedElement getOwnerElement()
getOwnerElement in interface ISavablepublic BufferedElement findParent(java.lang.String name)
element - name - public BufferedElement findParent(BufferedElement element, java.lang.String name)
element - name - public java.util.List<BufferedElement> findChildren(java.lang.String name)
name - public java.util.List<BufferedElement> findChildren(BufferedElement element, java.lang.String name)
element - name - public BufferedElement findFirstChild(java.lang.String name)
name - public BufferedElement findFirstChild(BufferedElement element, java.lang.String name)
name - public BufferedElement findChildAt(java.lang.String name, int index)
name - public BufferedElement findChildAt(BufferedElement element, java.lang.String name, int index)
name - public void start()
public void end()
public boolean isEnded()
public java.lang.String getStartTagElementName()
public java.lang.String getEndTagElementName()
public void setTextContent(java.lang.String content)
content - public java.lang.String getTextContent()
public org.xml.sax.Attributes getAttributes()
public void registerDynamicAttributes()
public BufferedAttribute setAttribute(java.lang.String name, java.lang.String value)
name - value - public java.lang.String getName()
public java.lang.String getInnerText()
public void setInnerText(java.lang.String innerText)
public java.lang.String get(java.lang.String key)
public void put(java.lang.String key,
java.lang.String value)
Copyright © 2024. All Rights Reserved.