Package com.mxgraph.io.graphml
Class mxGraphMlUtils
java.lang.Object
com.mxgraph.io.graphml.mxGraphMlUtils
This class implements several GML utility methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
childsHasTag
(Element element, String tag) Checks if the childrens of element has a Node with name = tag.static Element
Returns the first Element that has name = tag in the childrens of element.childsTags
(Element element, String tag) Returns a list with the elements included in the childrens of element that have name = tag.copyNodeList
(NodeList nodeList) Copy a given NodeList into a ListgetStyleMap
(String style, String asig) Create a style map from a String with style definitions.static String
getStyleString
(Map<String, Object> styleMap, String asig) Returns the string that represents the content of a given style map.static boolean
nodeListHasTag
(NodeList nl, String tag) Checks if the NodeList has a Node with name = tag.static Element
nodeListTag
(NodeList nl, String tag) Returns the first Element that has name = tag in Node List.nodeListTags
(NodeList nl, String tag) Returns a list with the elements included in the Node List that have name = tag.
-
Constructor Details
-
mxGraphMlUtils
public mxGraphMlUtils()
-
-
Method Details
-
nodeListHasTag
Checks if the NodeList has a Node with name = tag.- Parameters:
nl
- NodeListtag
- Name of the node.- Returns:
- Returns
true
if the Node List has a Node with name = tag.
-
nodeListTag
Returns the first Element that has name = tag in Node List.- Parameters:
nl
- NodeListtag
- Name of the Element- Returns:
- Element with name = 'tag'.
-
nodeListTags
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
Checks if the childrens of element has a Node with name = tag.- Parameters:
element
- Elementtag
- Name of the node.- Returns:
- Returns
true
if the childrens of element has a Node with name = tag.
-
childsTag
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
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
Copy a given NodeList into a List- Parameters:
nodeList
- Node List.- Returns:
- List with the elements of nodeList.
-
getStyleMap
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
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.
-