Package com.mxgraph.io.graphml
Class mxGraphMlUtils
- java.lang.Object
-
- com.mxgraph.io.graphml.mxGraphMlUtils
-
public class mxGraphMlUtils extends java.lang.ObjectThis class implements several GML utility methods.
-
-
Constructor Summary
Constructors Constructor Description mxGraphMlUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanchildsHasTag(org.w3c.dom.Element element, java.lang.String tag)Checks if the childrens of element has a Node with name = tag.static org.w3c.dom.ElementchildsTag(org.w3c.dom.Element element, java.lang.String tag)Returns the first Element that has name = tag in the childrens of element.static java.util.List<org.w3c.dom.Element>childsTags(org.w3c.dom.Element element, java.lang.String tag)Returns a list with the elements included in the childrens of element that have name = tag.static java.util.List<org.w3c.dom.Node>copyNodeList(org.w3c.dom.NodeList nodeList)Copy a given NodeList into a Liststatic java.util.HashMap<java.lang.String,java.lang.Object>getStyleMap(java.lang.String style, java.lang.String asig)Create a style map from a String with style definitions.static java.lang.StringgetStyleString(java.util.Map<java.lang.String,java.lang.Object> styleMap, java.lang.String asig)Returns the string that represents the content of a given style map.static booleannodeListHasTag(org.w3c.dom.NodeList nl, java.lang.String tag)Checks if the NodeList has a Node with name = tag.static org.w3c.dom.ElementnodeListTag(org.w3c.dom.NodeList nl, java.lang.String tag)Returns the first Element that has name = tag in Node List.static java.util.List<org.w3c.dom.Element>nodeListTags(org.w3c.dom.NodeList nl, java.lang.String tag)Returns a list with the elements included in the Node List that have name = tag.
-
-
-
Method Detail
-
nodeListHasTag
public static boolean nodeListHasTag(org.w3c.dom.NodeList nl, java.lang.String tag)Checks if the NodeList has a Node with name = tag.- Parameters:
nl- NodeListtag- Name of the node.- Returns:
- Returns
trueif the Node List has a Node with name = tag.
-
nodeListTag
public static org.w3c.dom.Element nodeListTag(org.w3c.dom.NodeList nl, java.lang.String tag)Returns the first Element that has name = tag in Node List.- Parameters:
nl- NodeListtag- Name of the Element- Returns:
- Element with name = 'tag'.
-
nodeListTags
public static java.util.List<org.w3c.dom.Element> nodeListTags(org.w3c.dom.NodeList nl, java.lang.String tag)Returns a list with the elements included in the Node List that have name = tag.- Parameters:
nl- NodeListtag- name of the Element.- Returns:
- List with the indicated elements.
-
childsHasTag
public static boolean childsHasTag(org.w3c.dom.Element element, java.lang.String tag)Checks if the childrens of element has a Node with name = tag.- Parameters:
element- Elementtag- Name of the node.- Returns:
- Returns
trueif the childrens of element has a Node with name = tag.
-
childsTag
public static org.w3c.dom.Element childsTag(org.w3c.dom.Element element, java.lang.String tag)Returns the first Element that has name = tag in the childrens of element.- Parameters:
element- Elementtag- Name of the Element- Returns:
- Element with name = 'tag'.
-
childsTags
public static java.util.List<org.w3c.dom.Element> childsTags(org.w3c.dom.Element element, java.lang.String tag)Returns a list with the elements included in the childrens of element that have name = tag.- Parameters:
element- Elementtag- name of the Element.- Returns:
- List with the indicated elements.
-
copyNodeList
public static java.util.List<org.w3c.dom.Node> copyNodeList(org.w3c.dom.NodeList nodeList)
Copy a given NodeList into a List- Parameters:
nodeList- Node List.- Returns:
- List with the elements of nodeList.
-
getStyleMap
public static java.util.HashMap<java.lang.String,java.lang.Object> getStyleMap(java.lang.String style, java.lang.String asig)Create a style map from a String with style definitions.- Parameters:
style- Definition of the style.asig- Asignation simbol used in 'style'.- Returns:
- Map with the style properties.
-
getStyleString
public static java.lang.String getStyleString(java.util.Map<java.lang.String,java.lang.Object> styleMap, java.lang.String asig)Returns the string that represents the content of a given style map.- Parameters:
styleMap- Map with the styles values- Returns:
- string that represents the style.
-
-