Main Page: Difference between revisions

From TDWG Collection Description
Jump to navigation Jump to search
No edit summary
(Fixing the wrong prefixes)
 
(11 intermediate revisions by the same user not shown)
Line 2: Line 2:
This Wikibase will be used to demonstrate the current CD standard using real data.
This Wikibase will be used to demonstrate the current CD standard using real data.


The data standard is currently under development. This development is currently done in [https://github.com/tdwg/cd GitHub]
The data standard is currently under development. This development is done in [https://github.com/tdwg/cd GitHub]


== Wikibase model ==
== Wikibase model ==
Line 10: Line 10:
Not all concepts and controlled vocabulary term are already present in the Wikibase. So when adding your institutional data, it might/will be necessary to add new terms to the Wikibase.
Not all concepts and controlled vocabulary term are already present in the Wikibase. So when adding your institutional data, it might/will be necessary to add new terms to the Wikibase.


== Example Queries ==
== Collection modelling: example ==
=== Example collection ===
As an example, we modeled the herbarium of Meise Botanic Garden in the Wikibase. The main components of the example description are:
* General description of the collection: {{Q|Q123}}
* Descriptions of the collection metrics (simplified!): {{Q|128}} and {{Q|133}}
* Item to represent the institute: {{Q|124}}
 
=== Example Queries on collections ===
==== Get the total number of curatorial objects ====
This query gives the total amount of specimen:
 
{{SPARQL2|query=
PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
PREFIX cds: <http://tdwg-cd.wikibase.cloud/entity/statement/>
PREFIX cdp: <http://tdwg-cd.wikibase.cloud/prop/>
PREFIX cdq: <http://tdwg-cd.wikibase.cloud/prop/qualifier/>
PREFIX cdps: <http://tdwg-cd.wikibase.cloud/prop/statement/>
 
SELECT ?item ?object ?count  WHERE {
  ?item cdt:P127 cd:Q124 .
  ?item cdp:P15 ?statement.
  ?statement cdps:P15 ?object.
  ?statement cdq:P106 ?count.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}
 
==== Get the total number of digitized specimen at MIDS level 1 ====
 
{{SPARQL2|query=
PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
PREFIX cds: <http://tdwg-cd.wikibase.cloud/entity/statement/>
PREFIX cdp: <http://tdwg-cd.wikibase.cloud/prop/>
PREFIX cdq: <http://tdwg-cd.wikibase.cloud/prop/qualifier/>
PREFIX cdps: <http://tdwg-cd.wikibase.cloud/prop/statement/>
 
SELECT ?item ?object ?count  WHERE {
  ?item cdt:P127 cd:Q124 .
  ?item cdp:P113 ?statement.
  ?statement cdps:P113 ?object.
  ?statement cdq:P123 ?count.
  ?statement cdq:P121 cd:Q120.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}
 
== CD standard: Example Queries ==
=== Controlled vocabulary of preservation methods ===
=== Controlled vocabulary of preservation methods ===
This SPARQL query gives an overview of all preservation methods present in the wikibase.
This SPARQL query gives an overview of all preservation methods present in the wikibase.


{{SPARQL2|query=
{{SPARQL2|query=
PREFIX cd:<https://tdwg-cd.wiki.opencura.com/entity/>
PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
PREFIX cdt:<https://tdwg-cd.wiki.opencura.com/prop/direct/>
PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>


SELECT ?method ?methodLabel  WHERE {
SELECT ?method ?methodLabel  WHERE {
   ?method cdt:P1 cd:Q41.
   ?method cdt:P1 cd:Q41.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}
=== List of all Classes ===
This query provides you with a list of all available classes in the standard
{{SPARQL2|query=
PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
SELECT ?class ?classLabel  WHERE {
  ?class cdt:P1 cd:Q6.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}
=== List of all properties belonging to the ObjectGroup Class ===
This query creates a list of all properties belonging to the ObjectGroup class
{{SPARQL2|query=
PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
SELECT ?prop ?propLabel  WHERE {
  ?prop cdt:P3 cd:Q3.
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}
}}
}}

Latest revision as of 13:49, 28 October 2023

Wikibase implementation of the Collection Description (CD) standard

This Wikibase will be used to demonstrate the current CD standard using real data.

The data standard is currently under development. This development is done in GitHub

Wikibase model

This Wikibase contains the properties defined in the Collection Description standard. In case a controlled vocabulary is needed for a property, this is modelled as follows:

  • The property is pointing to an 'Item'
  • This item should be an instance of a 'Concept'. See this example: dried pinned (Q46)

Not all concepts and controlled vocabulary term are already present in the Wikibase. So when adding your institutional data, it might/will be necessary to add new terms to the Wikibase.

Collection modelling: example

Example collection

As an example, we modeled the herbarium of Meise Botanic Garden in the Wikibase. The main components of the example description are:

Example Queries on collections

Get the total number of curatorial objects

This query gives the total amount of specimen:

The following query uses these:

  • properties: cd:objectType (P15) , cd:hasInstitution (P127) 
    PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
    PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
    PREFIX cds: <http://tdwg-cd.wikibase.cloud/entity/statement/>
    PREFIX cdp: <http://tdwg-cd.wikibase.cloud/prop/>
    PREFIX cdq: <http://tdwg-cd.wikibase.cloud/prop/qualifier/>
    PREFIX cdps: <http://tdwg-cd.wikibase.cloud/prop/statement/>
    
    SELECT ?item ?object ?count  WHERE {
      ?item cdt:P127 cd:Q124 .
      ?item cdp:P15 ?statement.
      ?statement cdps:P15 ?object.
      ?statement cdq:P106 ?count.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

Get the total number of digitized specimen at MIDS level 1

The following query uses these:

  • properties: cd:digitalRecordType (P113) , cd:hasInstitution (P127) 
    PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
    PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
    PREFIX cds: <http://tdwg-cd.wikibase.cloud/entity/statement/>
    PREFIX cdp: <http://tdwg-cd.wikibase.cloud/prop/>
    PREFIX cdq: <http://tdwg-cd.wikibase.cloud/prop/qualifier/>
    PREFIX cdps: <http://tdwg-cd.wikibase.cloud/prop/statement/>
    
    SELECT ?item ?object ?count  WHERE {
      ?item cdt:P127 cd:Q124 .
      ?item cdp:P113 ?statement.
      ?statement cdps:P113 ?object.
      ?statement cdq:P123 ?count.
      ?statement cdq:P121 cd:Q120.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

CD standard: Example Queries

Controlled vocabulary of preservation methods

This SPARQL query gives an overview of all preservation methods present in the wikibase.

The following query uses these:

  • properties: instance of (P1) 
    PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
    PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
    
    SELECT ?method ?methodLabel  WHERE {
      ?method cdt:P1 cd:Q41.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

List of all Classes

This query provides you with a list of all available classes in the standard

The following query uses these:

  • properties: instance of (P1) 
    PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
    PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
    
    SELECT ?class ?classLabel  WHERE {
      ?class cdt:P1 cd:Q6.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

List of all properties belonging to the ObjectGroup Class

This query creates a list of all properties belonging to the ObjectGroup class

The following query uses these:

  • properties: is part of (P3) 
    PREFIX cd:<http://tdwg-cd.wikibase.cloud/entity/>
    PREFIX cdt:<http://tdwg-cd.wikibase.cloud/prop/direct/>
    
    SELECT ?prop ?propLabel  WHERE {
      ?prop cdt:P3 cd:Q3.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }