From 5d5984ff76253d31ca77cb12dd8ed7b3a42e6039 Mon Sep 17 00:00:00 2001 From: Abram Booth Date: Thu, 23 May 2024 15:32:34 -0400 Subject: [PATCH] skos, foaf, dc, dctype --- requirements.txt | 2 +- trove/views/browse.py | 2 +- trove/vocab/{static.py => static/__init__.py} | 30 +- trove/vocab/{ => static}/dcat.turtle | 0 .../vocab/static/dublin_core_elements.turtle | 146 +++++ .../{ => static}/dublin_core_terms.turtle | 0 trove/vocab/static/dublin_core_type.turtle | 122 ++++ trove/vocab/static/foaf.rdf.xml | 584 ++++++++++++++++++ trove/vocab/{ => static}/owl.turtle | 0 trove/vocab/{ => static}/prov.turtle | 0 trove/vocab/{ => static}/rdf.turtle | 0 trove/vocab/{ => static}/rdfs.turtle | 0 trove/vocab/static/skos.rdf.xml | 468 ++++++++++++++ 13 files changed, 1348 insertions(+), 6 deletions(-) rename trove/vocab/{static.py => static/__init__.py} (55%) rename trove/vocab/{ => static}/dcat.turtle (100%) create mode 100644 trove/vocab/static/dublin_core_elements.turtle rename trove/vocab/{ => static}/dublin_core_terms.turtle (100%) create mode 100644 trove/vocab/static/dublin_core_type.turtle create mode 100644 trove/vocab/static/foaf.rdf.xml rename trove/vocab/{ => static}/owl.turtle (100%) rename trove/vocab/{ => static}/prov.turtle (100%) rename trove/vocab/{ => static}/rdf.turtle (100%) rename trove/vocab/{ => static}/rdfs.turtle (100%) create mode 100644 trove/vocab/static/skos.rdf.xml diff --git a/requirements.txt b/requirements.txt index df5180b70..19c52fc9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ psycogreen==1.0.2 # BSD psycopg2==2.9.5 # LGPL with exceptions or ZPL python-dateutil==2.8.1 # Apache 2.0 PyJWE==1.0.0 # Apache 2.0 -pyshacl==0.22.0 # Apache 2.0 +rdflib==7.0.0 pyyaml==6.0 # MIT requests==2.25.1 # Apache 2.0 sentry-sdk[django]==1.22.2 # MIT diff --git a/trove/views/browse.py b/trove/views/browse.py index 3254babee..12885c113 100644 --- a/trove/views/browse.py +++ b/trove/views/browse.py @@ -14,7 +14,7 @@ def get(self, request, **kwargs): _iri_param = kwargs.get('iri') or request.GET.get('iri') if not _iri_param: raise ValueError('TODO: random browse?') - _iri = unquote_iri(_iri_param) + _iri = ns.NAMESPACES_SHORTHAND.expand_iri(unquote_iri(_iri_param)) _suffuniq_iri = get_sufficiently_unique_iri(_iri) _trove_term = _recognize_trove_term(_suffuniq_iri) if _trove_term is not None: diff --git a/trove/vocab/static.py b/trove/vocab/static/__init__.py similarity index 55% rename from trove/vocab/static.py rename to trove/vocab/static/__init__.py index cd52614b4..374284568 100644 --- a/trove/vocab/static.py +++ b/trove/vocab/static/__init__.py @@ -2,10 +2,11 @@ import pathlib from primitive_metadata import primitive_rdf as rdf +import rdflib from trove.util.iris import get_sufficiently_unique_iri -from .osfmap import OSFMAP_VOCAB -from .trove import TROVE_API_VOCAB +from trove.vocab.osfmap import OSFMAP_VOCAB +from trove.vocab.trove import TROVE_API_VOCAB STATIC_THESAURUSES = ( @@ -14,7 +15,9 @@ ) STATIC_TURTLES = ( + 'dublin_core_elements.turtle', 'dublin_core_terms.turtle', + 'dublin_core_type.turtle', 'dcat.turtle', 'owl.turtle', 'rdf.turtle', @@ -22,6 +25,11 @@ 'prov.turtle', ) +STATIC_XMLS = ( + 'skos.rdf.xml', + 'foaf.rdf.xml', +) + @functools.cache def combined_thesaurus_with_suffuniq_subjects(): @@ -37,12 +45,26 @@ def _combined_thesaurus(): _combined_rdf.add_tripledict(_thesaurus) for _turtle_filename in STATIC_TURTLES: _combined_rdf.add_tripledict(_load_static_turtle(_turtle_filename)) + for _xml_filename in STATIC_XMLS: + _combined_rdf.add_tripledict(_load_static_xml(_xml_filename)) return _combined_rdf.tripledict def _load_static_turtle(turtle_filename: str) -> rdf.RdfTripleDictionary: # assumed same directory as this file - _turtle_filepath = pathlib.Path(__file__).parent / turtle_filename - with open(_turtle_filepath) as _vocab_file: + with open(_local_filepath(turtle_filename)) as _vocab_file: _turtle = _vocab_file.read() return rdf.tripledict_from_turtle(_turtle) + + +def _load_static_xml(xml_filename: str) -> rdf.RdfTripleDictionary: + # assumed same directory as this file + _graph = rdflib.Graph() + with open(_local_filepath(xml_filename)) as _vocab_file: + _graph.parse(_vocab_file, format='xml') + return rdf.tripledict_from_rdflib(_graph) + + +def _local_filepath(filename: str) -> pathlib.Path: + # assumed same directory as this file + return pathlib.Path(__file__).parent / filename diff --git a/trove/vocab/dcat.turtle b/trove/vocab/static/dcat.turtle similarity index 100% rename from trove/vocab/dcat.turtle rename to trove/vocab/static/dcat.turtle diff --git a/trove/vocab/static/dublin_core_elements.turtle b/trove/vocab/static/dublin_core_elements.turtle new file mode 100644 index 000000000..54b9e7c10 --- /dev/null +++ b/trove/vocab/static/dublin_core_elements.turtle @@ -0,0 +1,146 @@ +@prefix rdf: . +@prefix owl: . +@prefix skos: . +@prefix dcam: . +@prefix dcterms: . +@prefix rdfs: . + + + dcterms:modified "2012-06-14"^^ ; + dcterms:publisher ; + dcterms:title "Dublin Core Metadata Element Set, Version 1.1"@en . + + + dcterms:description "The guidelines for using names of persons or organizations as creators also apply to contributors. Typically, the name of a Contributor should be used to indicate the entity."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "An entity responsible for making contributions to the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Contributor"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/contributor) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Spatial topic and spatial applicability may be a named place or a location specified by its geographic coordinates. Temporal topic may be a named period, date, or date range. A jurisdiction may be a named administrative entity or a geographic place to which the resource applies. Recommended practice is to use a controlled vocabulary such as the Getty Thesaurus of Geographic Names [[TGN](https://www.getty.edu/research/tools/vocabulary/tgn/index.html)]. Where appropriate, named places or time periods may be used in preference to numeric identifiers such as sets of coordinates or date ranges."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "The spatial or temporal topic of the resource, spatial applicability of the resource, or jurisdiction under which the resource is relevant."@en ; + rdfs:isDefinedBy ; + rdfs:label "Coverage"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/coverage) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Examples of a Creator include a person, an organization, or a service. Typically, the name of a Creator should be used to indicate the entity."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "An entity primarily responsible for making the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Creator"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/creator) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Date may be used to express temporal information at any level of granularity. Recommended practice is to express the date, date/time, or period of time according to ISO 8601-1 [[ISO 8601-1](https://www.iso.org/iso-8601-date-and-time-format.html)] or a published profile of the ISO standard, such as the W3C Note on Date and Time Formats [[W3CDTF](https://www.w3.org/TR/NOTE-datetime)] or the Extended Date/Time Format Specification [[EDTF](http://www.loc.gov/standards/datetime/)]. If the full date is unknown, month and year (YYYY-MM) or just year (YYYY) may be used. Date ranges may be specified using ISO 8601 period of time specification in which start and end dates are separated by a '/' (slash) character. Either the start or end date may be missing."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "A point or period of time associated with an event in the lifecycle of the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Date"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/date) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Description may include but is not limited to: an abstract, a table of contents, a graphical representation, or a free-text account of the resource."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "An account of the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Description"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/description) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Recommended practice is to use a controlled vocabulary where available. For example, for file formats one could use the list of Internet Media Types [[MIME](https://www.iana.org/assignments/media-types/media-types.xhtml)]."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "The file format, physical medium, or dimensions of the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Format"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/format) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Recommended practice is to identify the resource by means of a string conforming to an identification system."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "An unambiguous reference to the resource within a given context."@en ; + rdfs:isDefinedBy ; + rdfs:label "Identifier"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/identifier) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Recommended practice is to use either a non-literal value representing a language from a controlled vocabulary such as ISO 639-2 or ISO 639-3, or a literal value consisting of an IETF Best Current Practice 47 [[IETF-BCP47](https://tools.ietf.org/html/bcp47)] language tag."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "A language of the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Language"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/language) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Examples of a Publisher include a person, an organization, or a service. Typically, the name of a Publisher should be used to indicate the entity."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "An entity responsible for making the resource available."@en ; + rdfs:isDefinedBy ; + rdfs:label "Publisher"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/publisher) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Recommended practice is to identify the related resource by means of a URI. If this is not possible or feasible, a string conforming to a formal identification system may be provided."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "A related resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Relation"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/relation) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "Information about rights held in and over the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Rights"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/rights) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "The described resource may be derived from the related resource in whole or in part. Recommended best practice is to identify the related resource by means of a string conforming to a formal identification system."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "A related resource from which the described resource is derived."@en ; + rdfs:isDefinedBy ; + rdfs:label "Source"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/source) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Typically, the subject will be represented using keywords, key phrases, or classification codes. Recommended best practice is to use a controlled vocabulary."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "The topic of the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Subject"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/subject) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "A name given to the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Title"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/title) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + + + dcterms:description "Recommended practice is to use a controlled vocabulary such as the DCMI Type Vocabulary [[DCMI-TYPE](http://dublincore.org/documents/dcmi-type-vocabulary/)]. To describe the file format, physical medium, or dimensions of the resource, use the Format element."@en ; + dcterms:issued "1999-07-02"^^ ; + a rdf:Property ; + rdfs:comment "The nature or genre of the resource."@en ; + rdfs:isDefinedBy ; + rdfs:label "Type"@en ; + skos:note "A [second property](/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/type) with the same name as this property has been declared in the [dcterms: namespace](http://purl.org/dc/terms/). See the Introduction to the document [DCMI Metadata Terms](/specifications/dublin-core/dcmi-terms/) for an explanation."@en . + diff --git a/trove/vocab/dublin_core_terms.turtle b/trove/vocab/static/dublin_core_terms.turtle similarity index 100% rename from trove/vocab/dublin_core_terms.turtle rename to trove/vocab/static/dublin_core_terms.turtle diff --git a/trove/vocab/static/dublin_core_type.turtle b/trove/vocab/static/dublin_core_type.turtle new file mode 100644 index 000000000..1e8d35802 --- /dev/null +++ b/trove/vocab/static/dublin_core_type.turtle @@ -0,0 +1,122 @@ +@prefix rdf: . +@prefix owl: . +@prefix skos: . +@prefix dcam: . +@prefix dcterms: . +@prefix rdfs: . + + + dcterms:modified "2012-06-14"^^ ; + dcterms:publisher ; + dcterms:title "DCMI Type Vocabulary"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "A collection is described as a group; its parts may also be separately described."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "An aggregation of resources."@en ; + rdfs:isDefinedBy ; + rdfs:label "Collection"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include lists, tables, and databases. A dataset may be useful for direct machine processing."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "Data encoded in a defined structure."@en ; + rdfs:isDefinedBy ; + rdfs:label "Dataset"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Metadata for an event provides descriptive information that is the basis for discovery of the purpose, location, duration, and responsible agents associated with an event. Examples include an exhibition, webcast, conference, workshop, open day, performance, battle, trial, wedding, tea party, conflagration."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "A non-persistent, time-based occurrence."@en ; + rdfs:isDefinedBy ; + rdfs:label "Event"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include images and photographs of physical objects, paintings, prints, drawings, other images and graphics, animations and moving pictures, film, diagrams, maps, musical notation. Note that Image may include both electronic and physical representations."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "A visual representation other than text."@en ; + rdfs:isDefinedBy ; + rdfs:label "Image"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include forms on Web pages, applets, multimedia learning objects, chat services, or virtual reality environments."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "A resource requiring interaction from the user to be understood, executed, or experienced."@en ; + rdfs:isDefinedBy ; + rdfs:label "Interactive Resource"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include animations, movies, television programs, videos, zoetropes, or visual output from a simulation. Instances of the type Moving Image must also be describable as instances of the broader type Image."@en ; + dcterms:issued "2003-11-18"^^ ; + a rdfs:Class ; + rdfs:comment "A series of visual representations imparting an impression of motion when shown in succession."@en ; + rdfs:isDefinedBy ; + rdfs:label "Moving Image"@en ; + rdfs:subClassOf . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Note that digital representations of, or surrogates for, these objects should use Image, Text or one of the other types."@en ; + dcterms:issued "2002-07-13"^^ ; + a rdfs:Class ; + rdfs:comment "An inanimate, three-dimensional object or substance."@en ; + rdfs:isDefinedBy ; + rdfs:label "Physical Object"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include a photocopying service, a banking service, an authentication service, interlibrary loans, a Z39.50 or Web server."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "A system that provides one or more functions."@en ; + rdfs:isDefinedBy ; + rdfs:label "Service"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include a C source file, MS-Windows .exe executable, or Perl script."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "A computer program in source or compiled form."@en ; + rdfs:isDefinedBy ; + rdfs:label "Software"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include a music playback file format, an audio compact disc, and recorded speech or sounds."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "A resource primarily intended to be heard."@en ; + rdfs:isDefinedBy ; + rdfs:label "Sound"@en . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include paintings, drawings, graphic designs, plans and maps. Recommended best practice is to assign the type Text to images of textual materials. Instances of the type Still Image must also be describable as instances of the broader type Image."@en ; + dcterms:issued "2003-11-18"^^ ; + a rdfs:Class ; + rdfs:comment "A static visual representation."@en ; + rdfs:isDefinedBy ; + rdfs:label "Still Image"@en ; + rdfs:subClassOf . + + + dcam:memberOf dcterms:DCMIType ; + dcterms:description "Examples include books, letters, dissertations, poems, newspapers, articles, archives of mailing lists. Note that facsimiles or images of texts are still of the genre Text."@en ; + dcterms:issued "2000-07-11"^^ ; + a rdfs:Class ; + rdfs:comment "A resource consisting primarily of words for reading."@en ; + rdfs:isDefinedBy ; + rdfs:label "Text"@en . + diff --git a/trove/vocab/static/foaf.rdf.xml b/trove/vocab/static/foaf.rdf.xml new file mode 100644 index 000000000..de8249ab7 --- /dev/null +++ b/trove/vocab/static/foaf.rdf.xml @@ -0,0 +1,584 @@ + + + + + + + + + + + + + + Label Property + A foaf:LabelProperty is any RDF property with texual values that serve as labels. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trove/vocab/owl.turtle b/trove/vocab/static/owl.turtle similarity index 100% rename from trove/vocab/owl.turtle rename to trove/vocab/static/owl.turtle diff --git a/trove/vocab/prov.turtle b/trove/vocab/static/prov.turtle similarity index 100% rename from trove/vocab/prov.turtle rename to trove/vocab/static/prov.turtle diff --git a/trove/vocab/rdf.turtle b/trove/vocab/static/rdf.turtle similarity index 100% rename from trove/vocab/rdf.turtle rename to trove/vocab/static/rdf.turtle diff --git a/trove/vocab/rdfs.turtle b/trove/vocab/static/rdfs.turtle similarity index 100% rename from trove/vocab/rdfs.turtle rename to trove/vocab/static/rdfs.turtle diff --git a/trove/vocab/static/skos.rdf.xml b/trove/vocab/static/skos.rdf.xml new file mode 100644 index 000000000..1ddeb9a5c --- /dev/null +++ b/trove/vocab/static/skos.rdf.xml @@ -0,0 +1,468 @@ + + + + + SKOS Vocabulary + Dave Beckett + Nikki Rogers + Participants in W3C's Semantic Web Deployment Working Group. + An RDF vocabulary for describing the basic structure and content of concept schemes such as thesauri, classification schemes, subject heading lists, taxonomies, 'folksonomies', other types of controlled vocabulary, and also concept schemes embedded in glossaries and terminologies. + Alistair Miles + Sean Bechhofer + + + + Concept + + An idea or notion; a unit of thought. + + + + + Concept Scheme + + A set of concepts, optionally including statements about semantic relationships between those concepts. + A concept scheme may be defined to include concepts from different sources. + Thesauri, classification schemes, subject heading lists, taxonomies, 'folksonomies', and other types of controlled vocabulary are all examples of concept schemes. Concept schemes are also embedded in glossaries and terminologies. + + + + + + + Collection + + A meaningful collection of concepts. + Labelled collections can be used where you would like a set of concepts to be displayed under a 'node label' in the hierarchy. + + + + + + + + + Ordered Collection + + An ordered collection of concepts, where both the grouping and the ordering are meaningful. + Ordered collections can be used where you would like a set of concepts to be displayed in a specific order, and optionally under a 'node label'. + + + + + + + is in scheme + + Relates a resource (for example a concept) to a concept scheme in which it is included. + A concept may be a member of more than one concept scheme. + + + + + + + + + has top concept + + Relates, by convention, a concept scheme to a concept which is topmost in the broader/narrower concept hierarchies for that scheme, providing an entry point to these hierarchies. + + + + + + + + + + + + + is top concept in scheme + + Relates a concept to the concept scheme that it is a top level concept of. + + + + + + + + + + + + + preferred label + + The preferred lexical label for a resource, in a given language. + + + + + + A resource has no more than one value of skos:prefLabel per language tag, and no more than one value of skos:prefLabel without language tag. + + The range of skos:prefLabel is the class of RDF plain literals. + + skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise + disjoint properties. + + + + + alternative label + + An alternative lexical label for a resource. + Acronyms, abbreviations, spelling variants, and irregular plural/singular forms may be included among the alternative labels for a concept. Mis-spelled terms are normally included as hidden labels (see skos:hiddenLabel). + + + + + + The range of skos:altLabel is the class of RDF plain literals. + + skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties. + + + + + hidden label + + A lexical label for a resource that should be hidden when generating visual displays of the resource, but should still be accessible to free text search operations. + + + + + + The range of skos:hiddenLabel is the class of RDF plain literals. + + skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties. + + + + + notation + + A notation, also known as classification code, is a string of characters such as "T58.5" or "303.4833" used to uniquely identify a concept within the scope of a given concept scheme. + By convention, skos:notation is used with a typed literal in the object position of the triple. + + + + + + + note + + A general note, for any purpose. + This property may be used directly, or as a super-property for more specific note types. + + + + + + + change note + + A note about a modification to a concept. + + + + + + + + + definition + + A statement or formal explanation of the meaning of a concept. + + + + + + + + + editorial note + + A note for an editor, translator or maintainer of the vocabulary. + + + + + + + + + example + + An example of the use of a concept. + + + + + + + + + history note + + A note about the past state/use/meaning of a concept. + + + + + + + + + scope note + + A note that helps to clarify the meaning and/or the use of a concept. + + + + + + + + + is in semantic relation with + + Links a concept to a concept related by meaning. + This property should not be used directly, but as a super-property for all properties denoting a relationship of meaning between concepts. + + + + + + + + + + + has broader + + Relates a concept to a concept that is more general in meaning. + Broader concepts are typically rendered as parents in a concept hierarchy (tree). + By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources. + + + + + + + + + + + has narrower + + Relates a concept to a concept that is more specific in meaning. + By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources. + Narrower concepts are typically rendered as children in a concept hierarchy (tree). + + + + + + + + + + + has related + + Relates a concept to a concept with which there is an associative semantic relationship. + + + + + + + + skos:related is disjoint with skos:broaderTransitive + + + + + has broader transitive + + skos:broaderTransitive is a transitive superproperty of skos:broader. + By convention, skos:broaderTransitive is not used to make assertions. Rather, the properties can be used to draw inferences about the transitive closure of the hierarchical relation, which is useful e.g. when implementing a simple query expansion algorithm in a search application. + + + + + + + + + + + + + has narrower transitive + + skos:narrowerTransitive is a transitive superproperty of skos:narrower. + By convention, skos:narrowerTransitive is not used to make assertions. Rather, the properties can be used to draw inferences about the transitive closure of the hierarchical relation, which is useful e.g. when implementing a simple query expansion algorithm in a search application. + + + + + + + + + + + + + has member + + Relates a collection to one of its members. + + + + + + + + + + + + + + + + + + has member list + + Relates an ordered collection to the RDF list containing its members. + + + + + + + + + + For any resource, every item in the list given as the value of the + skos:memberList property is also a value of the skos:member property. + + + + + is in mapping relation with + + Relates two concepts coming, by convention, from different schemes, and that have comparable meanings + These concept mapping relations mirror semantic relations, and the data model defined below is similar (with the exception of skos:exactMatch) to the data model defined for semantic relations. A distinct vocabulary is provided for concept mapping relations, to provide a convenient way to differentiate links within a concept scheme from links between concept schemes. However, this pattern of usage is not a formal requirement of the SKOS data model, and relies on informal definitions of best practice. + + + + + + + + + has broader match + + skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. + + + + + + + + + + + + + has narrower match + + skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. + + + + + + + + + + + + + has related match + + skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes. + + + + + + + + + + + + + has exact match + + skos:exactMatch is used to link two concepts, indicating a high degree of confidence that the concepts can be used interchangeably across a wide range of information retrieval applications. skos:exactMatch is a transitive property, and is a sub-property of skos:closeMatch. + + + + + + + + + + skos:exactMatch is disjoint with each of the properties skos:broadMatch and skos:relatedMatch. + + + + + has close match + + skos:closeMatch is used to link two concepts that are sufficiently similar that they can be used interchangeably in some information retrieval applications. In order to avoid the possibility of "compound errors" when combining mappings across more than two concept schemes, skos:closeMatch is not declared to be a transitive property. + + + + + + + + + +