Example #1
0
        static InferenceRules()
        {
            var schemaSchema = new Graph();

            // subClassOf
            schemaSchema.Assert("rdfs:subClassOf", "rdf:type", "owl:TransitiveProperty");

            // subPropertyOf
            schemaSchema.Assert("rdfs:subPropertyOf", "rdf:type", "owl:TransitiveProperty");

            // equivalentClass
            schemaSchema.Assert("owl:equivalentClass", "rdf:type", "owl:SymmetricProperty");
            schemaSchema.Assert("owl:equivalentClass", "rdfs:subPropertyOf", "rdfs:subClassOf");

            // equivalentProperty
            schemaSchema.Assert("owl:equivalentProperty", "rdf:type", "owl:SymmetricProperty");
            schemaSchema.Assert("owl:equivalentProperty", "rdfs:subPropertyOf", "rdfs:subPropertyOf");

            // inverseOf
            schemaSchema.Assert("owl:inverseOf", "rdf:type", "owl:SymmetricProperty");

            // sameAs
            schemaSchema.Assert("owl:sameAs", "rdf:type", "owl:SymmetricProperty");
            schemaSchema.Assert("owl:sameAs", "rdf:type", "owl:TransitiveProperty");

            SchemaSchemaRules = InferenceRules.InnerCreateFromSchema(schemaSchema);
        }
Example #2
0
 public Reasoner(IGraph schema)
 {
     _rules = InferenceRules.CreateFromSchema(schema);
 }