Esempio n. 1
0
        private void createAttributePrototypeNode(AttributePrototype a)
        {
            ILiteralNode n_a = attributesGraph.CreateLiteralNode(a.Name);
            IUriNode     u_a = createAttributeUriNode(a, attributesGraph);

            attributesGraph.Assert(new Triple(
                                       u_a,
                                       attributesGraph.CreateUriNode("dct:Identifier"),
                                       n_a));

            attributesGraph.Assert(new Triple(
                                       u_a,
                                       attributesGraph.CreateUriNode("rdf:Type"),
                                       attributesGraph.CreateUriNode("eca:attribute")));

            attributesGraph.Assert(new Triple(
                                       u_a,
                                       attributesGraph.CreateUriNode("rdf:Type"),
                                       attributesGraph.CreateLiteralNode(a.Type.ToString(), new Uri("xsd:type"))));

            attributesGraph.Assert(new Triple(
                                       u_a,
                                       attributesGraph.CreateUriNode("rdf:Value"),
                                       attributesGraph.CreateBlankNode(a.Name)));
        }
Esempio n. 2
0
        private IUriNode createAttributeUriNode(AttributePrototype a, Graph g)
        {
            string attributeUri = dp_uri.TrimEnd('/') + "/" + a.Name;

            return(g.CreateUriNode(new Uri(attributeUri)));
        }
Esempio n. 3
0
 public Attribute(AttributePrototype prototype, Component parentComponent)
 {
     ParentComponent = parentComponent;
     Prototype       = prototype;
     Value           = prototype.DefaultValue;
 }