Repository: jena Updated Branches: refs/heads/master a2346597c -> 34ed02b60
JENA-912: SKOS and SKOS-XL Vocabularies. Project: http://git-wip-us.apache.org/repos/asf/jena/repo Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/34ed02b6 Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/34ed02b6 Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/34ed02b6 Branch: refs/heads/master Commit: 34ed02b60807ae4f6f48746cf20032cb8fa56790 Parents: a234659 Author: Andy Seaborne <[email protected]> Authored: Fri Apr 3 11:19:49 2015 +0100 Committer: Andy Seaborne <[email protected]> Committed: Fri Apr 3 11:19:49 2015 +0100 ---------------------------------------------------------------------- .../java/com/hp/hpl/jena/vocabulary/SKOS.java | 78 ++++++++++++++++++++ .../java/com/hp/hpl/jena/vocabulary/SKOSXL.java | 45 +++++++++++ 2 files changed, 123 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jena/blob/34ed02b6/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOS.java ---------------------------------------------------------------------- diff --git a/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOS.java b/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOS.java new file mode 100644 index 0000000..c2c1a71 --- /dev/null +++ b/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOS.java @@ -0,0 +1,78 @@ +package com.hp.hpl.jena.vocabulary; + + +import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.rdf.model.ModelFactory; +import com.hp.hpl.jena.rdf.model.Property; +import com.hp.hpl.jena.rdf.model.Resource; +/** + * Vocabulary definition for the <a href="http://www.w3.org/2009/08/skos-reference/skos.html">W3C SKOS Recommendation</a>. + * @author Quentin Reul (Quentin.H.Reul[at]gmail.com) + * + */ +public class SKOS { + /** + * The RDF model that holds the SKOS entities + */ + public static Model m = ModelFactory.createDefaultModel(); + /** + * The namespace of the SKOS vocabulary as a string + */ + protected static final String uri = "http://www.w3.org/2004/02/skos/core#"; + /** + * Returns the namespace of the SKOS schema as a string + * @return the namespace of the SKOS schema + */ + public static String getURI() { + return uri; + } + /** + * The namespace of the SKOS vocabulary + */ + public static final Resource NAMESPACE = m.createResource( uri ); + /* ########################################################## + * Defines SKOS Classes + ########################################################## */ + public static final Resource Concept = m.createResource( uri + "Concept"); + public static final Resource ConceptScheme = m.createResource( uri + "ConceptScheme"); + public static final Resource Collection = m.createResource(uri + "Collection"); + public static final Resource OrderedCollection = m.createResource( uri + "OrderedCollection"); + /* ########################################################## + * Defines SKOS Properties + ########################################################## */ + // SKOS lexical label properties + public static final Property prefLabel = m.createProperty( uri + "prefLabel"); + public static final Property altLabel = m.createProperty( uri + "altLabel"); + public static final Property hiddenLabel = m.createProperty( uri + "hiddenLabel"); + // SKOS documentation properties + public static final Property definition = m.createProperty( uri + "definition"); + public static final Property note = m.createProperty( uri + "note"); + public static final Property scopeNote = m.createProperty( uri + "scopeNote"); + public static final Property historyNote = m.createProperty( uri + "historyNote"); + public static final Property changeNote = m.createProperty( uri + "changeNote"); + public static final Property editorialNote = m.createProperty( uri + "editorialNote"); + public static final Property example = m.createProperty( uri + "example"); + // SKOS notation properties + public static final Property notation = m.createProperty( uri + "notation"); + // SKOS semantic relations properties + public static final Property semanticRelation = m.createProperty( uri + "semanticRelation"); + public static final Property broaderTransitive = m.createProperty( uri + "broaderTransitive"); + public static final Property broader = m.createProperty( uri + "broader"); + public static final Property narrowerTransitive = m.createProperty( uri + "narrowerTransitive"); + public static final Property narrower = m.createProperty( uri + "narrower"); + public static final Property related = m.createProperty( uri + "related"); + // SKOS mapping properties + public static final Property mappingRelation = m.createProperty( uri + "mappingRelation"); + public static final Property exactMatch = m.createProperty( uri + "exactMatch"); + public static final Property closeMatch = m.createProperty( uri + "closeMatch"); + public static final Property broadMatch = m.createProperty( uri + "broadMatch"); + public static final Property narrowMatch = m.createProperty( uri + "narrowMatch"); + public static final Property relatedMatch = m.createProperty( uri + "relatedMatch"); + // SKOS concept scheme properties + public static final Property inScheme = m.createProperty( uri + "inScheme"); + public static final Property hasTopConcept = m.createProperty( uri + "hasTopConcept"); + public static final Property topConceptOf = m.createProperty( uri + "topConceptOf"); + // SKOS collection properties + public static final Property member = m.createProperty( uri + "member"); + public static final Property memberList = m.createProperty( uri + "memberList"); +} http://git-wip-us.apache.org/repos/asf/jena/blob/34ed02b6/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOSXL.java ---------------------------------------------------------------------- diff --git a/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOSXL.java b/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOSXL.java new file mode 100644 index 0000000..b2a50a7 --- /dev/null +++ b/jena-core/src/main/java/com/hp/hpl/jena/vocabulary/SKOSXL.java @@ -0,0 +1,45 @@ +package com.hp.hpl.jena.vocabulary; + +import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.rdf.model.ModelFactory; +import com.hp.hpl.jena.rdf.model.Property; +import com.hp.hpl.jena.rdf.model.Resource; + +/** + * Vocabulary definition for the <a href="http://www.w3.org/TR/skos-reference/skos-xl.html">W3C SKOS-XL Recommendation</a>. + * @author Quentin Reul (Quentin.H.Reul[at]gmail.com) + * + */ +public class SKOSXL { + /** + * The RDF model that holds the SKOS-XL entities + */ + public static Model m = ModelFactory.createDefaultModel(); + /** + * The namespace of the SKOS-XL vocabulary as a string + */ + protected static final String uri = "http://www.w3.org/2008/05/skos-xl#"; + /** + * Returns the namespace of the SKOS-XL schema as a string + * @return the namespace of the SKOS-XL schema + */ + public static String getURI() { + return uri; + } + /** + * The namespace of the SKOS-XL vocabulary + */ + public static final Resource NAMESPACE = m.createResource( uri ); + /* ########################################################## + * Defines SKOS-XL Classes + ########################################################## */ + public static final Resource Label = m.createResource( uri + "Label"); + /* ########################################################## + * Defines SKOS-XL Properties + ########################################################## */ + public static final Property prefLabel = m.createProperty( uri + "prefLabel"); + public static final Property altLabel = m.createProperty( uri + "altLabel"); + public static final Property hiddenLabel = m.createProperty( uri + "hiddenLabel"); + public static final Property labelRelation = m.createProperty( uri + "labelRelation"); + public static final Property literalForm = m.createProperty( uri + "literalForm"); +}
