Modifier and Type | Class and Description |
---|---|
protected static class |
Element.ElementContentType |
protected static class |
Element.Property |
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
m_attributes |
protected String |
m_base |
protected BaseURI |
m_baseURI |
protected List<Element> |
m_children |
protected String |
m_content |
protected String |
m_lang |
protected String |
m_name |
protected Element |
m_parent |
protected static Pattern |
STRIP_FROM_NORMAL_NAME |
Modifier and Type | Method and Description |
---|---|
protected void |
enforceChildrenConformance(Element e)
Calls enforceConformance on child
Element . |
protected void |
enforceChildrenConformance(List<? extends Element> ee)
Calls enforceConformance on children
Element s. |
void |
enforceConformance()
Execute any additional logic needed to make this element
conform to the atom (or other) spec.
|
protected void |
escapeXMLContent(PrintWriter out,
String s)
Escapes xml content.
|
protected void |
escapeXMLName(PrintWriter out,
String s)
Escapes xml element or attribute name.
|
protected Object |
firstValue(Object o)
Returns the first value from a collection/array,
or simply the value itself.
|
Map<String,String> |
getAttributes() |
String |
getBase() |
BaseUri |
getBaseUri()
Deprecated.
use
getBaseURI() |
BaseURI |
getBaseURI() |
List<Element> |
getChildren() |
String |
getContent() |
String |
getLang() |
String |
getName() |
Element |
getParent() |
protected void |
initialize(Object o)
Initialize with specified object.
|
protected Collection<Object> |
multipleValues(Object o)
Returns a collection/array as a collection,
a non-null value as a collection containing that single value,
or a null value as an empty collection.
|
protected void |
printAttribute(PrintWriter out,
String name,
String value)
Prints an attribute with the specified name and value, escaping both name and value.
|
protected void |
printChildren(PrintWriter out,
int tabs,
Element e)
Prints the specified child
Element . |
protected void |
printChildren(PrintWriter out,
int tabs,
List<? extends Element> ee)
Prints the specified list of children
Element s. |
protected void |
printChildren(PrintWriter out,
int tabs,
String name,
String content)
Prints a child element with the specified name and content, escaping both name and content.
|
protected Element.ElementContentType |
printContent(PrintWriter out,
int tabs)
Prints the content for this element.
|
protected void |
printEndTag(PrintWriter out,
int tabs,
Element.ElementContentType type)
Prints the end tag for this element.
|
protected void |
printStartTag(PrintWriter out,
int tabs)
Prints the start tag for this element.
|
protected void |
printTextualContent(PrintWriter out,
String content)
Prints the specified textual content for this element, escaping as necessary.
|
void |
serialize(PrintWriter out,
int tabs)
Serialize this element, pretty-print to the specified tab stop.
|
void |
setAttributes(Map<String,String> attributes) |
void |
setBase(String base) |
void |
setChildren(List<Element> children) |
void |
setContent(String content) |
void |
setLang(String lang) |
void |
setName(String name) |
void |
setParent(Element parent) |
protected void |
setProperties(IContentProvider provider,
Collection<?> keys)
Set the normalized properties of this element.
|
String |
toString() |
protected static final Pattern STRIP_FROM_NORMAL_NAME
protected Element m_parent
protected String m_content
protected String m_name
protected BaseURI m_baseURI
protected String m_base
protected String m_lang
public Element()
public Element(Object o)
public void enforceConformance()
protected void enforceChildrenConformance(List<? extends Element> ee)
Element
s.protected void enforceChildrenConformance(Element e)
Element
.protected void initialize(Object o)
protected void setProperties(IContentProvider provider, Collection<?> keys)
protected Object firstValue(Object o)
protected Collection<Object> multipleValues(Object o)
public void serialize(PrintWriter out, int tabs)
protected void printStartTag(PrintWriter out, int tabs)
protected Element.ElementContentType printContent(PrintWriter out, int tabs)
protected void printAttribute(PrintWriter out, String name, String value)
protected void printChildren(PrintWriter out, int tabs, List<? extends Element> ee)
Element
s.protected void printChildren(PrintWriter out, int tabs, Element e)
Element
.protected void printChildren(PrintWriter out, int tabs, String name, String content)
protected void printTextualContent(PrintWriter out, String content)
protected void printEndTag(PrintWriter out, int tabs, Element.ElementContentType type)
ElementContentType.EMPTY
, prints " />" end of start tag.
Otherwise, prints full end tag.protected void escapeXMLName(PrintWriter out, String s)
protected void escapeXMLContent(PrintWriter out, String s)
public Element getParent()
public void setParent(Element parent)
public String getContent()
public void setContent(String content)
public String getName()
public void setName(String name)
public String getBase()
public void setBase(String base)
public BaseURI getBaseURI()
public BaseUri getBaseUri()
getBaseURI()
public String getLang()
public void setLang(String lang)