|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.model.xml.impl.util.DomUtil
public final class DomUtil
Helper methods which abstract some gruesome DOM specifics. It does not provide synchronization when invoked in parallel with the same objects.
| Nested Class Summary | |
|---|---|
static class |
DomUtil.DomErrorHandler
|
static class |
DomUtil.ElementByNameListFilter
Filters Elements by their nodeName + namespaceUri |
static class |
DomUtil.ElementByTypeListFilter
|
static class |
DomUtil.ElementNodeListFilter
Filter retaining only Nodes of type Node.ELEMENT_NODE |
static interface |
DomUtil.NodeListFilter
A DomUtil.NodeListFilter allows to filter a NodeList,
retaining only elements in the list which match the filter. |
| Constructor Summary | |
|---|---|
DomUtil()
|
|
| Method Summary | |
|---|---|
static List<DomElement> |
filterNodeList(NodeList nodeList,
DomUtil.NodeListFilter filter)
Allows to apply a DomUtil.NodeListFilter to a NodeList. |
static List<DomElement> |
filterNodeListByName(NodeList nodeList,
String namespaceUri,
String localName)
Filter a NodeList retaining all elements with a specific name |
static List<DomElement> |
filterNodeListByType(NodeList nodeList,
ModelInstanceImpl modelInstance,
Class<?> type)
Filter a NodeList retaining all elements with a specific type |
static List<DomElement> |
filterNodeListForElements(NodeList nodeList)
Filters a NodeList retaining all elements |
static DomDocument |
getEmptyDocument(DocumentBuilderFactory documentBuilderFactory)
Get an empty DOM document |
static DomDocument |
parseInputStream(DocumentBuilderFactory documentBuilderFactory,
InputStream inputStream)
Create a new DOM document from the input stream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DomUtil()
| Method Detail |
|---|
public static List<DomElement> filterNodeList(NodeList nodeList,
DomUtil.NodeListFilter filter)
DomUtil.NodeListFilter to a NodeList. This allows to remove all elements from a node list which do not match the Filter.
nodeList - the NodeList to filterfilter - the DomUtil.NodeListFilter to apply to the NodeList
public static List<DomElement> filterNodeListForElements(NodeList nodeList)
NodeList retaining all elements
nodeList - the the NodeList to filter
public static List<DomElement> filterNodeListByName(NodeList nodeList,
String namespaceUri,
String localName)
NodeList retaining all elements with a specific name
nodeList - the NodeList to filternamespaceUri - the namespace for the elementslocalName - the local element name to filter for
public static List<DomElement> filterNodeListByType(NodeList nodeList,
ModelInstanceImpl modelInstance,
Class<?> type)
NodeList retaining all elements with a specific type
nodeList - the NodeList to filtermodelInstance - the model instancetype - the type class to filter for
public static DomDocument getEmptyDocument(DocumentBuilderFactory documentBuilderFactory)
documentBuilderFactory - the factory to build to DOM document
ModelParseException - if unable to create a new document
public static DomDocument parseInputStream(DocumentBuilderFactory documentBuilderFactory,
InputStream inputStream)
documentBuilderFactory - the factory to build to DOM documentinputStream - the input stream to parse
ModelParseException - if a parsing or IO error is triggered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||