private OwlNode AddDataRangeToGraph(string nodeUri) { //if the uri is null then create a blank node uri if(nodeUri == null) nodeUri = GetBlankNodeUri(null); OwlNode node = (OwlNode)_owlGraph[nodeUri]; if((node != null) && (node is OwlDataRange)) return (OwlDataRange)node; OwlNode typeNode = (OwlNode)_owlGraph.AddNode(OwlNamespaceCollection.OwlNamespace+"DataRange"); if(node == null) { node = new OwlDataRange(nodeUri,typeNode); _owlGraph.AddEdge(((OwlDataRange)node).Type); _owlGraph.AddNode(node); return (OwlDataRange)node; } OwlDataRange newNode = new OwlDataRange(nodeUri,typeNode); _owlGraph.AddEdge(newNode.Type); MoveEdges(node, newNode); _owlGraph.Nodes.Remove(node); _owlGraph.AddNode(newNode); return newNode; }
/// <summary> /// Implementation of the visit function to generate some output, used in the visitor pattern /// </summary> /// <param name="node">The actual node which needs to be generated</param> /// <param name="parent">The parent object of the node</param> public override void Visit(OwlDataRange node, Object parent) { // Todo }
/// <summary> /// Implementation of the visit function to generate some output, used in the visitor pattern /// </summary> /// <param name="node">The actual node which needs to be generated</param> /// <param name="parent">The parent object of the node</param> public abstract void Visit(OwlDataRange node, Object parent);