예제 #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)));
        }
예제 #2
0
        private IUriNode createAttributeUriNode(AttributePrototype a, Graph g)
        {
            string attributeUri = dp_uri.TrimEnd('/') + "/" + a.Name;

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