public ComponentLDPGraph(Uri u, Component c) : base(u) { this.c = c; this.u = u; n_c = RDFGraph.CreateLiteralNode(c.Name, new Uri("xsd:string")); BuildRDFGraph(); }
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()))); }
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 EntityLDPGraph(Uri u, Entity e) : base(u) { this.e = e; n_e = RDFGraph.CreateLiteralNode(e.Guid.ToString(), new Uri("xsd:string")); BuildRDFGraph(); }