|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.faces.data.export.atom.Element
public class Element
Represents a generic xml element.
Nested Class Summary | |
---|---|
protected static class |
Element.ElementContentType
|
protected static class |
Element.Property
|
Field Summary | |
---|---|
protected Map |
m_attributes
|
protected String |
m_base
|
protected BaseURI |
m_baseURI
|
protected List |
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
|
Constructor Summary | |
---|---|
Element()
|
|
Element(Object o)
|
Method Summary | |
---|---|
protected void |
enforceChildrenConformance(Element e)
Calls enforceConformance on child Element . |
protected void |
enforceChildrenConformance(List 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 |
getAttributes()
|
String |
getBase()
|
BaseUri |
getBaseUri()
Deprecated. use Element.getBaseURI() |
BaseURI |
getBaseURI()
|
List |
getChildren()
|
String |
getContent()
|
String |
getLang()
|
String |
getName()
|
Element |
getParent()
|
protected void |
initialize(Object o)
Initialize with specified object. |
protected Collection |
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 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 attributes)
|
void |
setBase(String base)
|
void |
setChildren(List 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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final Pattern STRIP_FROM_NORMAL_NAME
protected Map m_attributes
protected List m_children
protected Element m_parent
protected String m_content
protected String m_name
protected BaseURI m_baseURI
protected String m_base
protected String m_lang
Constructor Detail |
---|
public Element()
public Element(Object o)
Method Detail |
---|
public String toString()
toString
in class Object
public void enforceConformance()
protected void enforceChildrenConformance(List 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 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 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 Map getAttributes()
public void setAttributes(Map attributes)
public List getChildren()
public void setChildren(List children)
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()
Element.getBaseURI()
public String getLang()
public void setLang(String lang)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |