Package org.eclipse.epsilon.emc.graphml
Class GraphmlImporter
java.lang.Object
org.eclipse.epsilon.emc.graphml.GraphmlImporter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GraphmlConfigurationprotected Muddleprotected org.jdom.Elementprotected org.jdom.Namespaceprotected HashMap<MuddleElement,org.jdom.Element> protected HashMap<String,MuddleElement> protected List<OrphanLink>protected List<MuddleElement> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEdgeNodeToNode(MuddleElement edgeNode, MuddleElement node, Feature prototype) protected voidaddNodeToEdgeNode(MuddleElement edgeNode, MuddleElement node, Feature prototype) protected SlotaddSlot(MuddleElement node, Feature prototype) protected FeatureaddSlotPrototype(MuddleElementType nodeType, Feature prototype) protected voidIf single-valued slots are found to have multiple values, adjust the multiplicity accordingly.protected voidannihilate(MuddleElement node) protected Objectprotected Featureprotected FeaturecreateEdgeTypeSlotPrototype(MuddleElement edgeNode, String key) protected voidcreatePrimaryPrototypeSlot(MuddleElement node, org.jdom.Element element, String defaultSlotPrototypeNameKey) protected LinkElementTypeedgeTypeForName(String name) protected MuddleElementfindReferenceTarget(MuddleElement referenceNode) protected SlotfindSlot(MuddleElement node, Feature slotPrototype) protected SlotfindSuitableSlot(MuddleElement source, MuddleElement target) protected FeaturefindSuitableSlotPrototype(MuddleElementType type, MuddleElement value) protected List<org.jdom.Element>getDescendants(org.jdom.Element node, String name) protected List<org.jdom.Element>protected StringgetElementData(org.jdom.Element e, String key) protected org.jdom.ElementgetFirstAncestor(org.jdom.Element element, String name) protected StringgetFirstLabel(org.jdom.Element e) getLabels(org.jdom.Element e) protected StringgetNodeData(MuddleElement node, String key) protected List<org.jdom.Element>protected FeaturegetOrCreateFeature(MuddleElementType type, String featureName) protected SlotgetPrimarySlot(MuddleElement node) importGraph(File file) importGraph(String uri) protected booleanisReferenceLabel(String label) protected booleanisSlotValueLabel(String label) protected booleanmatches(MuddleElement node, MuddleElement referenceNode) protected MuddleElementTypenodeTypeForName(String name) protected voidprotected voidpopulateSlots(MuddleElement node, org.jdom.Element element) protected MuddleElementTypetypeForName(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
-