From 2c852ef5db936a38017ac5eb1957a8cc87726a83 Mon Sep 17 00:00:00 2001 From: mdesalvo Date: Sun, 17 May 2020 11:24:03 +0200 Subject: [PATCH] #94 Add support for EARL namespace, vocabulary and ontology --- RDFSharp/Model/RDFNamespaceRegister.cs | 8 +- RDFSharp/Model/Vocabularies/EARL.cs | 219 ++++++++++++++++++ .../Semantics/LinkedData/DC/RDFDCOntology.cs | 2 +- .../LinkedData/EARL/RDFEARLOntology.cs | 159 +++++++++++++ .../LinkedData/FOAF/RDFFOAFOntology.cs | 2 +- .../LinkedData/GEO/RDFGEOOntology.cs | 2 +- .../LinkedData/SIOC/RDFSIOCOntology.cs | 2 +- .../LinkedData/SKOS/RDFSKOSOntology.cs | 2 +- 8 files changed, 388 insertions(+), 8 deletions(-) create mode 100644 RDFSharp/Model/Vocabularies/EARL.cs create mode 100644 RDFSharp/Semantics/LinkedData/EARL/RDFEARLOntology.cs diff --git a/RDFSharp/Model/RDFNamespaceRegister.cs b/RDFSharp/Model/RDFNamespaceRegister.cs index 9b04895dd..1eb8bf913 100644 --- a/RDFSharp/Model/RDFNamespaceRegister.cs +++ b/RDFSharp/Model/RDFNamespaceRegister.cs @@ -94,13 +94,15 @@ static RDFNamespaceRegister() AddNamespace(new RDFNamespace(RDFVocabulary.DC.DCTYPE.PREFIX, RDFVocabulary.DC.DCTYPE.BASE_URI)); //foaf AddNamespace(new RDFNamespace(RDFVocabulary.FOAF.PREFIX, RDFVocabulary.FOAF.BASE_URI)); + //earl + AddNamespace(new RDFNamespace(RDFVocabulary.EARL.PREFIX, RDFVocabulary.EARL.BASE_URI)); //geo AddNamespace(new RDFNamespace(RDFVocabulary.GEO.PREFIX, RDFVocabulary.GEO.BASE_URI)); - //skos - AddNamespace(new RDFNamespace(RDFVocabulary.SKOS.PREFIX, RDFVocabulary.SKOS.BASE_URI)); - AddNamespace(new RDFNamespace(RDFVocabulary.SKOS.SKOSXL.PREFIX, RDFVocabulary.SKOS.SKOSXL.BASE_URI)); //sioc AddNamespace(new RDFNamespace(RDFVocabulary.SIOC.PREFIX, RDFVocabulary.SIOC.BASE_URI)); + //skos + AddNamespace(new RDFNamespace(RDFVocabulary.SKOS.PREFIX, RDFVocabulary.SKOS.BASE_URI)); + AddNamespace(new RDFNamespace(RDFVocabulary.SKOS.SKOSXL.PREFIX, RDFVocabulary.SKOS.SKOSXL.BASE_URI)); #endregion } #endregion diff --git a/RDFSharp/Model/Vocabularies/EARL.cs b/RDFSharp/Model/Vocabularies/EARL.cs new file mode 100644 index 000000000..6d71c56a7 --- /dev/null +++ b/RDFSharp/Model/Vocabularies/EARL.cs @@ -0,0 +1,219 @@ +/* + Copyright 2012-2020 Marco De Salvo + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using System; + +namespace RDFSharp.Model +{ + /// + /// RDFVocabulary is an helper for handy usage of supported RDF vocabularies. + /// + public static partial class RDFVocabulary + { + #region EARL + /// + /// EARL represents the Evaluation-And-Report-Language vocabulary. + /// + public static class EARL + { + + #region Properties + /// + /// earl + /// + public static readonly String PREFIX = "earl"; + + /// + /// http://www.w3.org/ns/earl# + /// + public static readonly String BASE_URI = "http://www.w3.org/ns/earl#"; + + /// + /// earl:assertedBy + /// + public static readonly RDFResource ASSERTED_BY = new RDFResource(EARL.BASE_URI + "assertedBy"); + + /// + /// earl:Assertion + /// + public static readonly RDFResource ASSERTION = new RDFResource(EARL.BASE_URI + "Assertion"); + + /// + /// earl:Assertor + /// + public static readonly RDFResource ASSERTOR = new RDFResource(EARL.BASE_URI + "Assertor"); + + /// + /// earl:automatic + /// + public static readonly RDFResource AUTOMATIC = new RDFResource(EARL.BASE_URI + "automatic"); + + /// + /// earl:cantTell + /// + public static readonly RDFResource CANT_TELL = new RDFResource(EARL.BASE_URI + "cantTell"); + + /// + /// earl:CannotTell + /// + public static readonly RDFResource CANNOT_TELL = new RDFResource(EARL.BASE_URI + "CannotTell"); + + /// + /// earl:Fail + /// + public static readonly RDFResource FAIL = new RDFResource(EARL.BASE_URI + "Fail"); + + /// + /// earl:failed + /// + public static readonly RDFResource FAILED = new RDFResource(EARL.BASE_URI + "failed"); + + /// + /// earl:info + /// + public static readonly RDFResource INFO = new RDFResource(EARL.BASE_URI + "info"); + + /// + /// earl:inapplicable + /// + public static readonly RDFResource INAPPLICABLE = new RDFResource(EARL.BASE_URI + "inapplicable"); + + /// + /// earl:mainAssertor + /// + public static readonly RDFResource MAIN_ASSERTOR = new RDFResource(EARL.BASE_URI + "mainAssertor"); + + /// + /// earl:manual + /// + public static readonly RDFResource MANUAL = new RDFResource(EARL.BASE_URI + "manual"); + + /// + /// earl:mode + /// + public static readonly RDFResource MODE = new RDFResource(EARL.BASE_URI + "mode"); + + /// + /// earl:NotApplicable + /// + public static readonly RDFResource NOT_APPLICABLE = new RDFResource(EARL.BASE_URI + "NotApplicable"); + + /// + /// earl:NotTested + /// + public static readonly RDFResource NOT_TESTED = new RDFResource(EARL.BASE_URI + "NotTested"); + + /// + /// earl:outcome + /// + public static readonly RDFResource OUTCOME = new RDFResource(EARL.BASE_URI + "outcome"); + + /// + /// earl:OutcomeValue + /// + public static readonly RDFResource OUTCOME_VALUE = new RDFResource(EARL.BASE_URI + "OutcomeValue"); + + /// + /// earl:Pass + /// + public static readonly RDFResource PASS = new RDFResource(EARL.BASE_URI + "Pass"); + + /// + /// earl:passed + /// + public static readonly RDFResource PASSED = new RDFResource(EARL.BASE_URI + "passed"); + + /// + /// earl:pointer + /// + public static readonly RDFResource POINTER = new RDFResource(EARL.BASE_URI + "pointer"); + + /// + /// earl:result + /// + public static readonly RDFResource RESULT = new RDFResource(EARL.BASE_URI + "result"); + + /// + /// earl:semiAuto + /// + public static readonly RDFResource SEMIAUTO = new RDFResource(EARL.BASE_URI + "semiAuto"); + + /// + /// earl:Software + /// + public static readonly RDFResource SOFTWARE = new RDFResource(EARL.BASE_URI + "Software"); + + /// + /// earl:subject + /// + public static readonly RDFResource SUBJECT = new RDFResource(EARL.BASE_URI + "subject"); + + /// + /// earl:test + /// + public static readonly RDFResource TEST = new RDFResource(EARL.BASE_URI + "test"); + + /// + /// earl:TestCase + /// + public static readonly RDFResource TEST_CASE = new RDFResource(EARL.BASE_URI + "TestCase"); + + /// + /// earl:TestCriterion + /// + public static readonly RDFResource TEST_CRITERION = new RDFResource(EARL.BASE_URI + "TestCriterion"); + + /// + /// earl:TestMode + /// + public static readonly RDFResource TEST_MODE = new RDFResource(EARL.BASE_URI + "TestMode"); + + /// + /// earl:TestRequirement + /// + public static readonly RDFResource TEST_REQUIREMENT = new RDFResource(EARL.BASE_URI + "TestRequirement"); + + /// + /// earl:TestResult + /// + public static readonly RDFResource TEST_RESULT = new RDFResource(EARL.BASE_URI + "TestResult"); + + /// + /// earl:TestSubject + /// + public static readonly RDFResource TEST_SUBJECT = new RDFResource(EARL.BASE_URI + "TestSubject"); + + /// + /// earl:undisclosed + /// + public static readonly RDFResource UNDISCLOSED = new RDFResource(EARL.BASE_URI + "undisclosed"); + + /// + /// earl:unknownMode + /// + public static readonly RDFResource UNKNOWN_MODE = new RDFResource(EARL.BASE_URI + "unknownMode"); + + /// + /// earl:untested + /// + public static readonly RDFResource UNTESTED = new RDFResource(EARL.BASE_URI + "untested"); + + #endregion + + } + #endregion + } +} \ No newline at end of file diff --git a/RDFSharp/Semantics/LinkedData/DC/RDFDCOntology.cs b/RDFSharp/Semantics/LinkedData/DC/RDFDCOntology.cs index ece5d8208..156f55c05 100644 --- a/RDFSharp/Semantics/LinkedData/DC/RDFDCOntology.cs +++ b/RDFSharp/Semantics/LinkedData/DC/RDFDCOntology.cs @@ -42,7 +42,7 @@ static RDFDCOntology() #region Declarations #region Ontology - Instance = new RDFOntology(new RDFResource("https://rdfsharp.codeplex.com/semantics/dc#")); + Instance = new RDFOntology(new RDFResource(RDFVocabulary.DC.BASE_URI)); #endregion #region Classes diff --git a/RDFSharp/Semantics/LinkedData/EARL/RDFEARLOntology.cs b/RDFSharp/Semantics/LinkedData/EARL/RDFEARLOntology.cs new file mode 100644 index 000000000..47cf6ef4f --- /dev/null +++ b/RDFSharp/Semantics/LinkedData/EARL/RDFEARLOntology.cs @@ -0,0 +1,159 @@ +/* + Copyright 2015-2020 Marco De Salvo + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using RDFSharp.Model; + +namespace RDFSharp.Semantics +{ + + /// + /// RDFEARLOntology represents an OWL-DL ontology implementation of EARL vocabulary + /// + public static class RDFEARLOntology + { + + #region Properties + /// + /// Singleton instance of the EARL ontology + /// + public static RDFOntology Instance { get; internal set; } + #endregion + + #region Ctors + /// + /// Default-ctor to initialize the EARL ontology + /// + static RDFEARLOntology() + { + + #region Declarations + + #region Ontology + Instance = new RDFOntology(new RDFResource(RDFVocabulary.EARL.BASE_URI)); + #endregion + + #region Classes + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.ASSERTION.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.ASSERTOR.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.CANNOT_TELL.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.FAIL.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.NOT_APPLICABLE.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.NOT_TESTED.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.OUTCOME_VALUE.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.PASS.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.SOFTWARE.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.TEST_CASE.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.TEST_CRITERION.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.TEST_MODE.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.TEST_REQUIREMENT.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.TEST_RESULT.ToRDFOntologyClass()); + Instance.Model.ClassModel.AddClass(RDFVocabulary.EARL.TEST_SUBJECT.ToRDFOntologyClass()); + + //OWL-DL Completeness + Instance.Model.ClassModel.AddClass(new RDFOntologyClass(new RDFResource("http://usefulinc.com/ns/doap#Project"))); + Instance.Model.ClassModel.AddClass(new RDFOntologyClass(new RDFResource("http://www.w3.org/2009/pointers#Pointer"))); + #endregion + + #region Properties + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.ASSERTED_BY.ToRDFOntologyObjectProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.INFO.ToRDFOntologyDatatypeProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.MAIN_ASSERTOR.ToRDFOntologyObjectProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.MODE.ToRDFOntologyObjectProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.OUTCOME.ToRDFOntologyObjectProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.POINTER.ToRDFOntologyObjectProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.RESULT.ToRDFOntologyObjectProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.SUBJECT.ToRDFOntologyObjectProperty()); + Instance.Model.PropertyModel.AddProperty(RDFVocabulary.EARL.TEST.ToRDFOntologyObjectProperty()); + #endregion + + #region Facts + Instance.Data.AddFact(RDFVocabulary.EARL.AUTOMATIC.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.CANT_TELL.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.INAPPLICABLE.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.FAILED.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.MANUAL.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.PASSED.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.SEMIAUTO.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.UNDISCLOSED.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.UNKNOWN_MODE.ToRDFOntologyFact()); + Instance.Data.AddFact(RDFVocabulary.EARL.UNTESTED.ToRDFOntologyFact()); + #endregion + + #endregion + + #region Taxonomies + + #region ClassModel + + //SubClassOf + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_REQUIREMENT.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_CRITERION.ToString())); + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_CASE.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_CRITERION.ToString())); + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.PASS.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.OUTCOME_VALUE.ToString())); + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.FAIL.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.OUTCOME_VALUE.ToString())); + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.CANNOT_TELL.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.OUTCOME_VALUE.ToString())); + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.NOT_APPLICABLE.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.OUTCOME_VALUE.ToString())); + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.NOT_TESTED.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.OUTCOME_VALUE.ToString())); + Instance.Model.ClassModel.AddSubClassOfRelation(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.SOFTWARE.ToString()), Instance.Model.ClassModel.SelectClass("http://usefulinc.com/ns/doap#Project")); + + #endregion + + #region PropertyModel + + //Domain/Range + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.ASSERTED_BY.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTION.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.ASSERTED_BY.ToString()).SetRange(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTOR.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.SUBJECT.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTION.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.SUBJECT.ToString()).SetRange(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_SUBJECT.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.TEST.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTION.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.TEST.ToString()).SetRange(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_CRITERION.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.RESULT.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTION.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.RESULT.ToString()).SetRange(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_RESULT.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.MODE.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTION.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.MODE.ToString()).SetRange(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_MODE.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.MAIN_ASSERTOR.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTOR.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.MAIN_ASSERTOR.ToString()).SetRange(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.ASSERTOR.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.OUTCOME.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_RESULT.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.OUTCOME.ToString()).SetRange(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.OUTCOME_VALUE.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.POINTER.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_RESULT.ToString())); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.POINTER.ToString()).SetRange(Instance.Model.ClassModel.SelectClass("http://www.w3.org/2009/pointers#Pointer")); + Instance.Model.PropertyModel.SelectProperty(RDFVocabulary.EARL.INFO.ToString()).SetDomain(Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_RESULT.ToString())); + + #endregion + + #region Data + + //ClassType + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.AUTOMATIC.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_MODE.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.MANUAL.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_MODE.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.SEMIAUTO.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_MODE.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.UNDISCLOSED.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_MODE.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.UNKNOWN_MODE.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.TEST_MODE.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.PASSED.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.PASS.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.FAILED.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.FAIL.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.CANT_TELL.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.CANNOT_TELL.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.INAPPLICABLE.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.NOT_APPLICABLE.ToString())); + Instance.Data.AddClassTypeRelation(Instance.Data.SelectFact(RDFVocabulary.EARL.UNTESTED.ToString()), Instance.Model.ClassModel.SelectClass(RDFVocabulary.EARL.NOT_TESTED.ToString())); + + #endregion + + #endregion + + } + #endregion + + } + +} \ No newline at end of file diff --git a/RDFSharp/Semantics/LinkedData/FOAF/RDFFOAFOntology.cs b/RDFSharp/Semantics/LinkedData/FOAF/RDFFOAFOntology.cs index 8d3541e19..831b2c1eb 100644 --- a/RDFSharp/Semantics/LinkedData/FOAF/RDFFOAFOntology.cs +++ b/RDFSharp/Semantics/LinkedData/FOAF/RDFFOAFOntology.cs @@ -43,7 +43,7 @@ static RDFFOAFOntology() #region Declarations #region Ontology - Instance = new RDFOntology(new RDFResource("https://rdfsharp.codeplex.com/semantics/foaf#")); + Instance = new RDFOntology(new RDFResource(RDFVocabulary.FOAF.BASE_URI)); #endregion #region Classes diff --git a/RDFSharp/Semantics/LinkedData/GEO/RDFGEOOntology.cs b/RDFSharp/Semantics/LinkedData/GEO/RDFGEOOntology.cs index 642a54275..af9d95b26 100644 --- a/RDFSharp/Semantics/LinkedData/GEO/RDFGEOOntology.cs +++ b/RDFSharp/Semantics/LinkedData/GEO/RDFGEOOntology.cs @@ -42,7 +42,7 @@ static RDFGEOOntology() #region Declarations #region Ontology - Instance = new RDFOntology(new RDFResource("https://rdfsharp.codeplex.com/semantics/geo#")); + Instance = new RDFOntology(new RDFResource(RDFVocabulary.GEO.BASE_URI)); #endregion #region Classes diff --git a/RDFSharp/Semantics/LinkedData/SIOC/RDFSIOCOntology.cs b/RDFSharp/Semantics/LinkedData/SIOC/RDFSIOCOntology.cs index c71ae0f16..2892510f7 100644 --- a/RDFSharp/Semantics/LinkedData/SIOC/RDFSIOCOntology.cs +++ b/RDFSharp/Semantics/LinkedData/SIOC/RDFSIOCOntology.cs @@ -42,7 +42,7 @@ static RDFSIOCOntology() #region Declarations #region Ontology - Instance = new RDFOntology(new RDFResource("https://rdfsharp.codeplex.com/semantics/sioc#")); + Instance = new RDFOntology(new RDFResource(RDFVocabulary.SIOC.BASE_URI)); #endregion #region Classes diff --git a/RDFSharp/Semantics/LinkedData/SKOS/RDFSKOSOntology.cs b/RDFSharp/Semantics/LinkedData/SKOS/RDFSKOSOntology.cs index 844ede045..1d3c3984d 100644 --- a/RDFSharp/Semantics/LinkedData/SKOS/RDFSKOSOntology.cs +++ b/RDFSharp/Semantics/LinkedData/SKOS/RDFSKOSOntology.cs @@ -43,7 +43,7 @@ static RDFSKOSOntology() #region Declarations #region Ontology - Instance = new RDFOntology(new RDFResource("http://www.w3.org/TR/skos-reference/skos-owl1-dl.rdf")); + Instance = new RDFOntology(new RDFResource(RDFVocabulary.SKOS.BASE_URI)); #endregion #region Classes