예제 #1
0
        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))));
        }
예제 #2
0
 protected override void BuildRDFGraph()
 {
     RDFGraph.Assert(new Triple(un, RDF_TYPE, LDP_BASIC_CONTAINER));
     RDFGraph.Assert(new Triple(un, DCT_IDENTIFIER, n_e));
     RDFGraph.Assert(new Triple(un, LDP_HASMEMBERRELATION, DCT_HAS_PART));
     addComponentNodes();
 }
예제 #3
0
 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)));
     }
 }
예제 #4
0
 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))
                                ));
 }
예제 #5
0
 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))));
     }
 }
예제 #6
0
 protected override void BuildRDFGraph()
 {
     RDFGraph.Assert(new Triple(un, RDF_TYPE, ECA_COMPONENT));
     foreach (AttributePrototype a in componentPrototype.AttributePrototypes)
     {
         IUriNode u_a = createAttributeUriNode(a, RDFGraph);
         RDFGraph.Assert(un, DCT_HAS_PART, u_a);
     }
 }
예제 #7
0
        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))));
        }
예제 #8
0
        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())));
        }
예제 #9
0
        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();
        }
예제 #10
0
 public void AddComponentTriple(string componentUri)
 {
     RDFGraph.Assert(new Triple(un, DCT_HAS_PART, RDFGraph.CreateUriNode(new Uri(componentUri))));
 }
예제 #11
0
 protected override void BuildRDFGraph()
 {
     buildRDFBaseGraph();
     RDFGraph.Assert(new Triple(un, RDF_VALUE, RDFGraph.CreateUriNode(new Uri(dp_uri + "/value/"))));
 }
예제 #12
0
 public void AddTypeRoute(string typeRoute)
 {
     RDFGraph.Assert(new Triple(un, RDF_TYPE, RDFGraph.CreateUriNode(new Uri(typeRoute))));
 }
예제 #13
0
 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))));
 }
예제 #14
0
 public void AddExternalContainer(string externalUri)
 {
     RDFGraph.Assert(new Triple(un,
                                RDFGraph.CreateUriNode("rdfs:seeAlso"),
                                RDFGraph.CreateUriNode(new Uri(externalUri))));
 }
예제 #15
0
 public void AddAttributeTriple(string attributeUri)
 {
     RDFGraph.Assert(new Triple(un, DCT_HAS_PART, RDFGraph.CreateUriNode(new Uri(attributeUri))));
 }