Package org.eclipse.epsilon.emc.graphml
Class GraphmlImporter
java.lang.Object
org.eclipse.epsilon.emc.graphml.GraphmlImporter
-
Field Summary
Modifier and TypeFieldDescriptionprotected GraphmlConfiguration
protected Muddle
protected org.jdom.Element
protected org.jdom.Namespace
protected HashMap<MuddleElement,
org.jdom.Element> protected HashMap<String,
MuddleElement> protected List<OrphanLink>
protected List<MuddleElement>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addEdgeNodeToNode
(MuddleElement edgeNode, MuddleElement node, Feature prototype) protected void
addNodeToEdgeNode
(MuddleElement edgeNode, MuddleElement node, Feature prototype) protected Slot
addSlot
(MuddleElement node, Feature prototype) protected Feature
addSlotPrototype
(MuddleElementType nodeType, Feature prototype) protected void
If single-valued slots are found to have multiple values, adjust the multiplicity accordingly.protected void
annihilate
(MuddleElement node) protected Object
protected Feature
protected Feature
createEdgeTypeSlotPrototype
(MuddleElement edgeNode, String key) protected void
createPrimaryPrototypeSlot
(MuddleElement node, org.jdom.Element element, String defaultSlotPrototypeNameKey) protected LinkElementType
edgeTypeForName
(String name) protected MuddleElement
findReferenceTarget
(MuddleElement referenceNode) protected Slot
findSlot
(MuddleElement node, Feature slotPrototype) protected Slot
findSuitableSlot
(MuddleElement source, MuddleElement target) protected Feature
findSuitableSlotPrototype
(MuddleElementType type, MuddleElement value) protected List<org.jdom.Element>
getDescendants
(org.jdom.Element node, String name) protected List<org.jdom.Element>
protected String
getElementData
(org.jdom.Element e, String key) protected org.jdom.Element
getFirstAncestor
(org.jdom.Element element, String name) protected String
getFirstLabel
(org.jdom.Element e) getLabels
(org.jdom.Element e) protected String
getNodeData
(MuddleElement node, String key) protected List<org.jdom.Element>
protected Feature
getOrCreateFeature
(MuddleElementType type, String featureName) protected Slot
getPrimarySlot
(MuddleElement node) importGraph
(File file) importGraph
(String uri) protected boolean
isReferenceLabel
(String label) protected boolean
isSlotValueLabel
(String label) protected boolean
matches
(MuddleElement node, MuddleElement referenceNode) protected MuddleElementType
nodeTypeForName
(String name) protected void
protected void
populateSlots
(MuddleElement node, org.jdom.Element element) protected MuddleElementType
typeForName
(String name, boolean edgeType)
-
Field Details
-
graph
-
nodeMap
-
nodeElementMap
-
graphElement
protected org.jdom.Element graphElement -
namespace
protected org.jdom.Namespace namespace -
orphanEdges
-
configuration
-
referenceNodes
-
-
Constructor Details
-
GraphmlImporter
public GraphmlImporter()
-
-
Method Details
-
importGraph
- Throws:
Exception
-
importGraph
- Throws:
Exception
-
populateGraph
protected void populateGraph() -
getOrCreateFeature
-
createEdgeTypeSlotPrototype
-
addNodeToEdgeNode
-
addEdgeNodeToNode
-
getNodeData
-
populateSlots
-
createPrimaryPrototypeSlot
protected void createPrimaryPrototypeSlot(MuddleElement node, org.jdom.Element element, String defaultSlotPrototypeNameKey) -
getElementData
-
annihilate
-
findReferenceTarget
-
matches
-
findSlot
-
adjustSlotPrototypeMultiplicitiesAndSlotValueTypes
protected void adjustSlotPrototypeMultiplicitiesAndSlotValueTypes()If single-valued slots are found to have multiple values, adjust the multiplicity accordingly. Also, adjust the type of slot values -
cast
-
findSuitableSlot
-
findSuitableSlotPrototype
-
isReferenceLabel
-
isSlotValueLabel
-
addSlot
-
addSlotPrototype
-
clone
-
getPrimarySlot
-
getFirstLabel
-
getLabels
-
getFirstAncestor
-
getLabels
-
getDescendants
-
getNodeElements
-
getEdgeElements
-
edgeTypeForName
-
nodeTypeForName
-
typeForName
-
getConfiguration
-