public class GraphmlImporter extends Object
Modifier and Type | Field and Description |
---|---|
protected GraphmlConfiguration |
configuration |
protected Muddle |
graph |
protected org.jdom.Element |
graphElement |
protected org.jdom.Namespace |
namespace |
protected HashMap<MuddleElement,org.jdom.Element> |
nodeElementMap |
protected HashMap<String,MuddleElement> |
nodeMap |
protected List<OrphanLink> |
orphanEdges |
protected List<MuddleElement> |
referenceNodes |
Constructor and Description |
---|
GraphmlImporter() |
Modifier and Type | Method and Description |
---|---|
protected 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 |
adjustSlotPrototypeMultiplicitiesAndSlotValueTypes()
If single-valued slots are found to have
multiple values, adjust the multiplicity accordingly.
|
protected void |
annihilate(MuddleElement node) |
protected Object |
cast(Object object,
Type type) |
protected Feature |
clone(Feature prototype) |
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) |
GraphmlConfiguration |
getConfiguration() |
protected List<org.jdom.Element> |
getDescendants(org.jdom.Element node,
String name) |
protected List<org.jdom.Element> |
getEdgeElements() |
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) |
protected List<String> |
getLabels(org.jdom.Element e) |
protected List<String> |
getLabels(String s) |
protected String |
getNodeData(MuddleElement node,
String key) |
protected List<org.jdom.Element> |
getNodeElements() |
protected Feature |
getOrCreateFeature(MuddleElementType type,
String featureName) |
protected Slot |
getPrimarySlot(MuddleElement node) |
Muddle |
importGraph(File file) |
Muddle |
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 |
populateGraph() |
protected void |
populateSlots(MuddleElement node,
org.jdom.Element element) |
protected MuddleElementType |
typeForName(String name,
boolean edgeType) |
protected Muddle graph
protected HashMap<String,MuddleElement> nodeMap
protected HashMap<MuddleElement,org.jdom.Element> nodeElementMap
protected org.jdom.Element graphElement
protected org.jdom.Namespace namespace
protected List<OrphanLink> orphanEdges
protected GraphmlConfiguration configuration
protected List<MuddleElement> referenceNodes
protected void populateGraph()
protected Feature getOrCreateFeature(MuddleElementType type, String featureName)
protected Feature createEdgeTypeSlotPrototype(MuddleElement edgeNode, String key)
protected void addNodeToEdgeNode(MuddleElement edgeNode, MuddleElement node, Feature prototype)
protected void addEdgeNodeToNode(MuddleElement edgeNode, MuddleElement node, Feature prototype)
protected String getNodeData(MuddleElement node, String key)
protected void populateSlots(MuddleElement node, org.jdom.Element element)
protected void createPrimaryPrototypeSlot(MuddleElement node, org.jdom.Element element, String defaultSlotPrototypeNameKey)
protected void annihilate(MuddleElement node)
protected MuddleElement findReferenceTarget(MuddleElement referenceNode)
protected boolean matches(MuddleElement node, MuddleElement referenceNode)
protected Slot findSlot(MuddleElement node, Feature slotPrototype)
protected void adjustSlotPrototypeMultiplicitiesAndSlotValueTypes()
protected Slot findSuitableSlot(MuddleElement source, MuddleElement target)
protected Feature findSuitableSlotPrototype(MuddleElementType type, MuddleElement value)
protected boolean isReferenceLabel(String label)
protected boolean isSlotValueLabel(String label)
protected Slot addSlot(MuddleElement node, Feature prototype)
protected Feature addSlotPrototype(MuddleElementType nodeType, Feature prototype)
protected Slot getPrimarySlot(MuddleElement node)
protected String getFirstLabel(org.jdom.Element e)
protected org.jdom.Element getFirstAncestor(org.jdom.Element element, String name)
protected List<org.jdom.Element> getNodeElements()
protected List<org.jdom.Element> getEdgeElements()
protected LinkElementType edgeTypeForName(String name)
protected MuddleElementType nodeTypeForName(String name)
protected MuddleElementType typeForName(String name, boolean edgeType)
public GraphmlConfiguration getConfiguration()
Copyright © 2016. All rights reserved.