Package org.hl7.fhir.utilities.xhtml
Class XhtmlNode
- java.lang.Object
-
- org.hl7.fhir.utilities.xhtml.XhtmlFluent
-
- org.hl7.fhir.utilities.xhtml.XhtmlNode
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseDatatype,org.hl7.fhir.instance.model.api.IBaseXhtml,org.hl7.fhir.instance.model.api.IPrimitiveType<String>
- Direct Known Subclasses:
XhtmlDocument
public class XhtmlNode extends XhtmlFluent implements org.hl7.fhir.instance.model.api.IBaseXhtml
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXhtmlNode.Location
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>attributesprotected XhtmlNodeListchildNodesstatic StringNBSPstatic StringXMLNS
-
Method Summary
-
Methods inherited from class org.hl7.fhir.utilities.xhtml.XhtmlFluent
ah, ah, ahOrCode, ahOrCode, ahWithText, an, an, b, blockquote, br, code, code, codeWithText, div, div, h, h, h1, h2, h3, h4, hr, i, img, img, imgT, innerHTML, li, markdown, para, pre, pre, span, span, span, spanClss, table, td, th, th, tr, tr, tx, tx, ul
-
-
-
-
Field Detail
-
XMLNS
public static final String XMLNS
- See Also:
- Constant Field Values
-
attributes
protected Map<String,String> attributes
-
childNodes
protected XhtmlNodeList childNodes
-
-
Method Detail
-
getNodeType
public NodeType getNodeType()
-
setNodeType
public void setNodeType(NodeType nodeType)
-
hasAttributes
public boolean hasAttributes()
-
getAttributes
public Map<String,String> getAttributes()
-
hasChildren
public boolean hasChildren()
-
getChildNodes
public XhtmlNodeList getChildNodes()
-
getContent
public String getContent()
-
setContent
public XhtmlNode setContent(String content)
-
validate
public void validate(List<String> errors, String path, boolean inResource, boolean inPara, boolean inLink)
-
addTag
public XhtmlNode addTag(String name)
- Specified by:
addTagin classXhtmlFluent
-
addTag
public XhtmlNode addTag(int index, String name)
- Specified by:
addTagin classXhtmlFluent
-
addComment
public XhtmlNode addComment(String content)
-
addDocType
public XhtmlNode addDocType(String content)
-
addInstruction
public XhtmlNode addInstruction(String content)
-
addText
public XhtmlNode addText(String content)
- Specified by:
addTextin classXhtmlFluent
-
allChildrenAreText
public boolean allChildrenAreText()
-
getElement
public XhtmlNode getElement(String name)
-
getFirstElement
public XhtmlNode getFirstElement()
-
attributeNN
public XhtmlNode attributeNN(String name, String value)
-
hasAttribute
public boolean hasAttribute(String name)
-
hasAttribute
public boolean hasAttribute(String name, String value)
-
getAttribute
public String getAttribute(String name)
-
setAttribute
public XhtmlNode setAttribute(String name, String value)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase
-
equalsDeep
public boolean equalsDeep(XhtmlNode other)
-
getEmptyExpanded
public Boolean getEmptyExpanded()
-
hasEmptyExpanded
public boolean hasEmptyExpanded()
-
setEmptyExpanded
public void setEmptyExpanded(Boolean emptyExpanded)
-
getValueAsString
public String getValueAsString()
- Specified by:
getValueAsStringin interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<String>
-
setValueAsString
public void setValueAsString(String theValue) throws IllegalArgumentException
- Specified by:
setValueAsStringin interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<String>- Throws:
IllegalArgumentException
-
getElementByIndex
public XhtmlNode getElementByIndex(int i)
-
getValue
public String getValue()
- Specified by:
getValuein interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<String>
-
hasValue
public boolean hasValue()
- Specified by:
hasValuein interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<String>
-
setValue
public XhtmlNode setValue(String theValue) throws IllegalArgumentException
- Specified by:
setValuein interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<String>- Throws:
IllegalArgumentException
-
hasFormatComment
public boolean hasFormatComment()
Returns false- Specified by:
hasFormatCommentin interfaceorg.hl7.fhir.instance.model.api.IBase
-
getFormatCommentsPre
public List<String> getFormatCommentsPre()
NOT SUPPORTED - ThrowsUnsupportedOperationException- Specified by:
getFormatCommentsPrein interfaceorg.hl7.fhir.instance.model.api.IBase
-
getFormatCommentsPost
public List<String> getFormatCommentsPost()
NOT SUPPORTED - ThrowsUnsupportedOperationException- Specified by:
getFormatCommentsPostin interfaceorg.hl7.fhir.instance.model.api.IBase
-
getUserData
public Object getUserData(String theName)
- Specified by:
getUserDatain interfaceorg.hl7.fhir.instance.model.api.IBase
-
hasUserData
public boolean hasUserData(String theName)
-
setUserData
public void setUserData(String theName, Object theValue)
- Specified by:
setUserDatain interfaceorg.hl7.fhir.instance.model.api.IBase
-
getLocation
public XhtmlNode.Location getLocation()
-
setLocation
public void setLocation(XhtmlNode.Location location)
-
getNextElement
public XhtmlNode getNextElement(XhtmlNode c)
-
isNoPretty
public boolean isNoPretty()
-
addChildren
public XhtmlNode addChildren(List<XhtmlNode> children)
-
addChildren
public XhtmlNode addChildren(XhtmlNode x)
-
clear
public void clear()
-
backgroundColor
public XhtmlNode backgroundColor(String color)
-
isPara
public boolean isPara()
-
addChildren
protected void addChildren(XhtmlNodeList childNodes)
- Specified by:
addChildrenin classXhtmlFluent
-
startScript
public void startScript(String name)
-
paramValue
public void paramValue(String name, String value)
-
paramValue
public void paramValue(String name, int value)
-
execScript
public void execScript(String structure) throws FHIRException, IOException
To set up a script, you do the following: * call startScript - setting up the parameter infrastructure * define a set of parameters. Parameter values can be provided as string or integer, or: * you can use param(name) to render an arbitrarily complicated html fragment that will be inserted by the script * you can redefine parameters with the same name * call execScript() to execute the script. You can call this any number of times * call closeScript The script format is an xhtml fragment that can have any html in it, and also the following tags: param: - replace this tag with the named parameter (or delete it if no value) if:- condition is param op value, where value is a string, and op is =, != <, > - Parameters:
structure-- Throws:
FHIRExceptionIOException
-
closeScript
public void closeScript()
-
getElementById
public XhtmlNode getElementById(String id)
-
getChildren
public List<XhtmlNode> getChildren(String name)
-
strikethrough
public XhtmlNode strikethrough()
-
copyAllContent
public void copyAllContent(XhtmlNode other)
-
styleCells
public void styleCells(XhtmlNode x)
-
td
public XhtmlNode td()
- Overrides:
tdin classXhtmlFluent
-
txN
public XhtmlNode txN(String cnt)
- Overrides:
txNin classXhtmlFluent
-
iff
public XhtmlNode iff(boolean test)
- Overrides:
iffin classXhtmlFluent
-
wbr
public void wbr()
-
indexOfNode
protected int indexOfNode(XhtmlNode node)
- Specified by:
indexOfNodein classXhtmlFluent
-
stripAnchorsByName
public void stripAnchorsByName(Set<String> anchors)
-
addChildNodes
public void addChildNodes(List<XhtmlNode> nodes)
-
addChildNode
public void addChildNode(XhtmlNode node)
-
addChildNode
public void addChildNode(int index, XhtmlNode node)
-
isCheckParaGeneral
public static boolean isCheckParaGeneral()
-
setCheckParaGeneral
public static void setCheckParaGeneral(boolean checkParaGeneral)
-
isCheckParaTree
public boolean isCheckParaTree()
-
setCheckParaTree
public void setCheckParaTree(boolean checkParaTree)
-
-