public class XmiHelper
extends java.lang.Object
Constructor and Description |
---|
XmiHelper() |
Modifier and Type | Method and Description |
---|---|
static org.w3c.dom.Node |
findByID(org.w3c.dom.Document doc,
java.lang.String id,
java.lang.String tagName) |
static org.w3c.dom.Node |
findByIDInNotationFile(org.w3c.dom.Document docNotaion,
java.lang.String id)
Busca por
Node dado um id e um Document . |
static java.lang.String |
findIdByName(java.lang.String name,
java.util.List<Element> list) |
java.lang.String |
findTypeById(java.lang.String id,
org.w3c.dom.Document umlDocument)
Retorna se o elemento é uma classe ou um comentário (note).
|
static java.lang.String |
getHeightForPackage(java.lang.String idPackage) |
static java.lang.String |
getIdForNode(org.w3c.dom.Node node)
Retorna o Id de um dado
Node . |
static java.lang.String |
getOnlyIdOfXmiAttribute(org.w3c.dom.NodeList elements,
int i) |
static org.w3c.dom.Document |
getOriginalNotation() |
static java.lang.String |
getWidhtForPackage(java.lang.String idPackage) |
static java.lang.String |
getXmiId(org.eclipse.emf.ecore.EObject eObject)
Retorna o atributo xmi:id como uma String para um dado eObject.
|
static java.lang.String |
getXValueForElement(java.lang.String id) |
static java.lang.String |
getYValueForElement(java.lang.String id) |
static java.lang.String |
isClassAbstract(boolean isAbstract) |
java.lang.String |
randomNum()
Método usado para gerar as posições de X e Y para os elementos.
|
static void |
removeNode(org.w3c.dom.Document document,
java.lang.String nodeNameToRemove,
java.lang.String nodeIdToRemove) |
static void |
setNotationOriginalFile(java.lang.String xmiFilePath) |
static void |
setRecursiveOwnedComments(org.eclipse.uml2.uml.NamedElement modelElement,
Element element) |
java.lang.String |
splitVariants(java.util.List<Variant> list) |
public static org.w3c.dom.Node findByIDInNotationFile(org.w3c.dom.Document docNotaion, java.lang.String id)
Node
dado um id e um Document
.docNotaion
- - Deve ser o arquivo .notationid
- - Id a ser buscadoNode
public static java.lang.String findIdByName(java.lang.String name, java.util.List<Element> list)
public static org.w3c.dom.Node findByID(org.w3c.dom.Document doc, java.lang.String id, java.lang.String tagName)
public static java.lang.String getIdForNode(org.w3c.dom.Node node) throws NodeIdNotFound
Node
.node
- NodeIdNotFound
public static java.lang.String isClassAbstract(boolean isAbstract)
public static java.lang.String getOnlyIdOfXmiAttribute(org.w3c.dom.NodeList elements, int i)
public static java.lang.String getXmiId(org.eclipse.emf.ecore.EObject eObject)
eObject
- public static java.lang.String getXValueForElement(java.lang.String id)
public static java.lang.String getYValueForElement(java.lang.String id)
public static java.lang.String getWidhtForPackage(java.lang.String idPackage)
public static java.lang.String getHeightForPackage(java.lang.String idPackage)
public static void setNotationOriginalFile(java.lang.String xmiFilePath)
public static org.w3c.dom.Document getOriginalNotation()
public static void removeNode(org.w3c.dom.Document document, java.lang.String nodeNameToRemove, java.lang.String nodeIdToRemove)
document
- - Document que deseja-se remover o nodonodeNameToRemove
- - nome do nodonodeIdToRemove
- - id do nodopublic java.lang.String findTypeById(java.lang.String id, org.w3c.dom.Document umlDocument)
Caso não for encontrado retorna uma string vazia ("").
id
- umlDocument
- public java.lang.String randomNum()
public static void setRecursiveOwnedComments(org.eclipse.uml2.uml.NamedElement modelElement, Element element)
public java.lang.String splitVariants(java.util.List<Variant> list)