public void Extend(Entity e) { var dp = e.GetDatapoint(); RDFGraph.Assert(new Triple(un, RDF_TYPE, LDP_BASIC_CONTAINER)); RDFGraph.Assert(new Triple(un, RDFGraph.CreateUriNode("ldp:contains"), RDFGraph.CreateUriNode(new Uri(e.GetDatapoint().Route)))); }
private void addComponentNodes() { foreach (Component c in e.Components) { var componentUri = new Uri(dp_uri.TrimEnd('/') + "/" + c.Name + "/"); RDFGraph.Assert(new Triple(un, DCT_HAS_PART, RDFGraph.CreateUriNode(componentUri))); } }
public void AddExternalEntity(string externalUri) { RDFGraph.NamespaceMap.AddNamespace("foaf", new Uri("http://xmlns.com/foaf/0.1/")); RDFGraph.Assert(new Triple(un, RDFGraph.CreateUriNode("foaf:knows"), RDFGraph.CreateUriNode(new Uri(externalUri)) )); }
private void CreateAttributeTriples() { foreach (AttributePrototype a in c.Prototype.AttributePrototypes) { string attributeUri = dp_uri.TrimEnd('/') + "/" + a.Name; RDFGraph.Assert(new Triple(un, DCT_HAS_PART, RDFGraph.CreateUriNode(new Uri(attributeUri)))); } }
private void buildRDFBaseGraph() { RDFGraph.Assert(new Triple(un, RDF_TYPE, LDP_RDF_RESOURCE)); RDFGraph.Assert(new Triple(un, DCT_IDENTIFIER, RDFGraph.CreateLiteralNode(attribute.Prototype.Name, new Uri("xsd:string")))); string compUri = dp_uri.Replace("/" + attribute.Prototype.Name, ""); RDFGraph.Assert(new Triple(un, DCT_IS_PART_OF, RDFGraph.CreateUriNode(new Uri(compUri)))); }
protected override void BuildRDFGraph() { RDFGraph.Assert(new Triple(un, RDF_TYPE, LDP_RDF_RESOURCE)); RDFGraph.Assert(new Triple(un, DCT_IDENTIFIER, RDFGraph.CreateLiteralNode(attribute.Prototype.Name, "xsd:string"))); string compUri = dp_uri.Replace("/" + attribute.Prototype.Name, ""); RDFGraph.Assert(new Triple(un, DCT_IS_PART_OF, RDFGraph.CreateUriNode(new Uri(compUri)))); string valuestring = attribute?.Value?.ToString() ?? "null"; RDFGraph.Assert(new Triple(un, RDF_VALUE, RDFGraph.CreateLiteralNode(valuestring, attribute.Type.transformTypeToString()))); }
protected override void BuildRDFGraph() { RDFGraph.Assert(new Triple(un, RDF_TYPE, LDP_BASIC_CONTAINER)); RDFGraph.Assert(new Triple(un, DCT_IDENTIFIER, n_c)); RDFGraph.Assert(new Triple(un, DCT_IS_PART_OF, GetContainingEntityURI())); RDFGraph.Assert(new Triple(un, LDP_HASMEMBERRELATION, DCT_HAS_PART)); var definedByUri = new Uri(u.getPrototypeBaseUri() + c.Name + "/"); RDFGraph.Assert(new Triple(un, RDFS_IS_DEFINED_BY, RDFGraph.CreateUriNode(definedByUri))); CreateAttributeTriples(); }
public ComponentPrototypeGraph(Uri u, ReadOnlyComponentPrototype p) : base(u) { componentPrototype = p; RDFGraph.NamespaceMap.AddNamespace("eca", new Uri("http://www.dfki.de/eca#")); ECA_COMPONENT = RDFGraph.CreateUriNode("eca:component"); attributesGraph = new Graph(); attributesGraph.NamespaceMap.AddNamespace("rdf", new Uri("http://www.w3.org/1999/02/22-rdf-syntax-ns#")); attributesGraph.NamespaceMap.AddNamespace("ldp", new Uri("http://www.w3.org/ns/ldp#")); attributesGraph.NamespaceMap.AddNamespace("dct", new Uri("http://purl.org/dc/terms/")); attributesGraph.NamespaceMap.AddNamespace("rdfs", new Uri("http://www.w3.org/2000/01/rdf-schema#")); attributesGraph.NamespaceMap.AddNamespace("eca", new Uri("http://www.dfki.de/eca#")); createAttributePrototypesGraph(); BuildRDFGraph(); RDFGraph.Merge(attributesGraph, false); }
public Graph getMergedGraph() { Graph mergedGraph = RDFGraph.CopyGraph(); mergedGraph.Assert(new Triple(un, RDF_VALUE, RDFGraph.CreateLiteralNode(attribute.Value.ToString(), new Uri("xsd:attributeValue")))); if (attribute.Type.Equals(typeof(EntityCollection))) { foreach (Entity e in (EntityCollection)attribute.Value) { mergedGraph.Assert(new Triple(un, RDFGraph.CreateUriNode("ldp:contains"), RDFGraph.CreateUriNode(new Uri(e.GetDatapoint().Route)) )); } } return(mergedGraph); }
public void AddComponentTriple(string componentUri) { RDFGraph.Assert(new Triple(un, DCT_HAS_PART, RDFGraph.CreateUriNode(new Uri(componentUri)))); }
protected override void BuildRDFGraph() { buildRDFBaseGraph(); RDFGraph.Assert(new Triple(un, RDF_VALUE, RDFGraph.CreateUriNode(new Uri(dp_uri + "/value/")))); }
public void AddTypeRoute(string typeRoute) { RDFGraph.Assert(new Triple(un, RDF_TYPE, RDFGraph.CreateUriNode(new Uri(typeRoute)))); }
public AttributeLDPGraph(Uri u, ECABaseModel.Attribute a, string EntityUri) : base(u) { attribute = a; buildRDFBaseGraph(); RDFGraph.Assert(new Triple(un, RDF_VALUE, RDFGraph.CreateUriNode(new Uri(EntityUri)))); }
public void AddExternalContainer(string externalUri) { RDFGraph.Assert(new Triple(un, RDFGraph.CreateUriNode("rdfs:seeAlso"), RDFGraph.CreateUriNode(new Uri(externalUri)))); }
private IUriNode GetContainingEntityURI() { string entityUri = dp_uri.Replace("/" + c.Name, ""); return(RDFGraph.CreateUriNode(new Uri(entityUri))); }
public void AddAttributeTriple(string attributeUri) { RDFGraph.Assert(new Triple(un, DCT_HAS_PART, RDFGraph.CreateUriNode(new Uri(attributeUri)))); }