Difference between revisions of "Help:Import vocabulary"
m (layout of scheme) |
m (layout: all import vocabularies; #forminput: no autofocus) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | A | + | A generic introduction to importing a vocabulary into a Semantic MediaWiki system is given on [http://semantic-mediawiki.org/wiki/Help:Import_vocabulary Semantic MediaWiki Help:Import vocabulary]. To import a vocabulary scheme into this term platform the following steps need to be done: |
− | # | + | # creation of an SMW import page |
− | # | + | # creation of a concept scheme page |
− | # | + | # creation of a page for each concept (containing definition, translation, etc. of a concept) |
− | # | + | # completion the SMW setup by creating either the corresponding property page or class page depending on the concept type |
− | + | Each of these steps is further discussed below | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Line 45: | Line 17: | ||
Normally templates code and forms should manage properties and their corresponding import properties, URIs etc. Then check if there is already an import page. | Normally templates code and forms should manage properties and their corresponding import properties, URIs etc. Then check if there is already an import page. | ||
− | + | ||
{{Hidden | {{Hidden | ||
| headerstyle=display:inline-block; | | headerstyle=display:inline-block; | ||
Line 51: | Line 23: | ||
| toggle position = left | | toggle position = left | ||
|header= All import vocabulary pages … | |header= All import vocabulary pages … | ||
− | |content={{List all smw imports}} | + | | contentstyle = border-left: 1px solid #ccc;border-bottom: 1px solid #ccc;padding:0ex 1em; |
+ | | content={{List all smw imports|output format=three-columns}} | ||
}} | }} | ||
− | |||
If there is no SMW import page yet for the vocabulary/concept scheme import, create the SMW import page. Concepts of [http://www.obofoundry.org/ro/ Biorelations] for instance use the locally defined namespace “biorel“, e.g. [[biorel:adjacent to]] (see also [[MediaWiki:Smw import biorel]]). | If there is no SMW import page yet for the vocabulary/concept scheme import, create the SMW import page. Concepts of [http://www.obofoundry.org/ro/ Biorelations] for instance use the locally defined namespace “biorel“, e.g. [[biorel:adjacent to]] (see also [[MediaWiki:Smw import biorel]]). | ||
Line 59: | Line 31: | ||
<inputbox> | <inputbox> | ||
type=create | type=create | ||
+ | buttonlabel=Create import page | ||
break=no | break=no | ||
preload=Template:Concept scheme/preload smw import | preload=Template:Concept scheme/preload smw import | ||
Line 86: | Line 59: | ||
Set the ''preferred namespace prefix'' from Step 1 for the concept scheme. | Set the ''preferred namespace prefix'' from Step 1 for the concept scheme. | ||
− | {{#forminput:form=Concept_scheme|autocomplete on namespace=|button text=Create or edit a concept scheme}} | + | {{#forminput:form=Concept_scheme|autocomplete on namespace=|button text=Create or edit a concept scheme|no autofocus}} |
<small>Technical note: [[Template: Concept scheme]] manages settings and data for a concept scheme.</small> | <small>Technical note: [[Template: Concept scheme]] manages settings and data for a concept scheme.</small> | ||
Line 92: | Line 65: | ||
Concepts in this Wiki have their own page (in article name space) for documentation, definition and translation. Those pages can be managed by the form below or on the concept page by clicking on tab “''{{int:formedit}}''”. If you create the page for the imported concept prefix it with '''''ns''''' (=locally defined name space) from above. Set also the “Scheme membership“ of a concept page in the form. | Concepts in this Wiki have their own page (in article name space) for documentation, definition and translation. Those pages can be managed by the form below or on the concept page by clicking on tab “''{{int:formedit}}''”. If you create the page for the imported concept prefix it with '''''ns''''' (=locally defined name space) from above. Set also the “Scheme membership“ of a concept page in the form. | ||
− | {{#forminput:form=Concept|autocomplete on category=Concept|button text=Create or edit a concept}} | + | {{#forminput:form=Concept|autocomplete on category=Concept|button text=Create or edit a concept|no autofocus}} |
<small>Technical note: [[Template: Concept]] manages settings and data for a concept.</small> | <small>Technical note: [[Template: Concept]] manages settings and data for a concept.</small> | ||
Step 4 as final step can be done as well during editing a concept form: the item “Concept type” in the concept form provides a link to do step 4. | Step 4 as final step can be done as well during editing a concept form: the item “Concept type” in the concept form provides a link to do step 4. | ||
− | == Step 4: Complete SWM Setup by Creating Corresponding Property | + | == Step 4: Complete SWM Setup by Creating Corresponding Property or Class Page== |
For a concept to be used by SWM as property or class it is necessary to set up either a property or class/category page holding the information of <code><nowiki>[[Imported from::</nowiki>'''''ns'''''<nowiki>:conceptTerm]]</nowiki></code>. These informations are managed by templates and the forms below will assist you to set up those pages. Remember: only basic information necessary to SWM should be on these pages, detailed documentation, definition and translation is managed by the concept form in step 3 (or use the tab “''{{int:formedit}}''” on a concept page). | For a concept to be used by SWM as property or class it is necessary to set up either a property or class/category page holding the information of <code><nowiki>[[Imported from::</nowiki>'''''ns'''''<nowiki>:conceptTerm]]</nowiki></code>. These informations are managed by templates and the forms below will assist you to set up those pages. Remember: only basic information necessary to SWM should be on these pages, detailed documentation, definition and translation is managed by the concept form in step 3 (or use the tab “''{{int:formedit}}''” on a concept page). | ||
− | Imported concept corresponds to a property | + | Depending on the type of the concept being imported there can exist only either a Property page or a Class page, ''not both'' of them. |
− | {{#forminput:form=Property setting|autocomplete on namespace=Property|button text=Create or edit a property}} | + | {| class="vertical-align-top" |
− | + | |- | |
− | {{#forminput:form=Concept scheme class|autocomplete on namespace=Category|button text=Create or edit a scheme class}} | + | | Imported concept corresponds to |
+ | | … | ||
+ | | a property: | ||
+ | {{#forminput:form=Property setting|autocomplete on namespace=Property|button text=Create or edit a property|no autofocus}} | ||
+ | |- | ||
+ | | | ||
+ | | … | ||
+ | | a class/category: | ||
+ | {{#forminput:form=Concept scheme class|autocomplete on namespace=Category|button text=Create or edit a scheme class|no autofocus}} | ||
+ | |} | ||
Step 3 can also be done on a property page in the hidden box of “''Editor tools''”. | Step 3 can also be done on a property page in the hidden box of “''Editor tools''”. | ||
+ | |||
+ | == Summary: Semantic MediaWiki pages / Concept pages == | ||
+ | |||
+ | This technical summary shows settings and corresponding pages necessary for Semantic MediaWiki on the left side. These are maintained by the group of administrator users and on the right side there are pages shown that can be managed or created by authors interested in contributing concept definitions, translations etc. | ||
+ | <div class="no-pre-border no-pre-wrap"> | ||
+ | ┌ {{T1|Concept scheme}} page with ─────────┐ | ||
+ | │ preferred namespace prefix='''<abbr title="locally defined name space">ns</abbr>''' │ | ||
+ | │ relates to the import of SMW │ | ||
+ | └────────────────────────────────────────┘ | ||
+ | |||
+ | ────────────────────────────────── Semantic MediaWiki settings ────────────────────────────────── ┌─ {{T1|Concept}} pages with detailed ──────┐ | ||
+ | │ documentation, translation, │ | ||
+ | ┌ MediaWiki:Smw_import_'''<abbr title="locally defined name space">ns</abbr>''' page ──────────────────────────────┐ │ scheme and collection membership etc. │ | ||
+ | │<nowiki>http://name/space/uri/|[http://url/to/docu Docu display]</nowiki> | ||
+ | │ comments|Type:Text → Property:'''<abbr title="locally defined name space">ns</abbr>''':comments '''<abbr title="locally defined name space">ns</abbr>''':comments | ||
+ | │ metadataLanguage|Type:String → Property:'''<abbr title="locally defined name space">ns</abbr>''':metadataLanguage '''<abbr title="locally defined name space">ns</abbr>''':metadataLanguage | ||
+ | │ providerManagedID|Type:String → Property:'''<abbr title="locally defined name space">ns</abbr>''':providerManagedID '''<abbr title="locally defined name space">ns</abbr>''':providerManagedID | ||
+ | │ reviewer|Type:String → Property:'''<abbr title="locally defined name space">ns</abbr>''':reviewer '''<abbr title="locally defined name space">ns</abbr>''':reviewer | ||
+ | │ reviewerComments|Type:Text → Property:'''<abbr title="locally defined name space">ns</abbr>''':reviewerComments '''<abbr title="locally defined name space">ns</abbr>''':reviewerComments | ||
+ | │ SomeClass|Category → Class:'''<abbr title="locally defined name space">ns</abbr>''':SomeClass '''<abbr title="locally defined name space">ns</abbr>''':SomeClass | ||
+ | │ … ('''not''' <s>Property:'''<abbr title="locally defined name space">ns</abbr>''':SomeClass</s> !) | ||
+ | │ … ↓ | ||
+ | └────────────────────────────────────────────────────────────┘ (these pages need to set property | ||
+ | ''<nowiki>[[Imported from::</nowiki>'''<abbr title="locally defined name space">ns</abbr>''':…]]'' | ||
+ | to be exported by SMW’s | ||
+ | RDF export correctly; this is set | ||
+ | by template code) | ||
+ | </div> | ||
+ | |||
+ | |||
[[Category: Help]] | [[Category: Help]] |
Latest revision as of 15:50, 3 February 2020
A generic introduction to importing a vocabulary into a Semantic MediaWiki system is given on Semantic MediaWiki Help:Import vocabulary. To import a vocabulary scheme into this term platform the following steps need to be done:
- creation of an SMW import page
- creation of a concept scheme page
- creation of a page for each concept (containing definition, translation, etc. of a concept)
- completion the SMW setup by creating either the corresponding property page or class page depending on the concept type
Each of these steps is further discussed below
Contents
Step 1: Set up the SMW Import Page
This first setup step, creating the import page in the MediaWiki namespace, is only possible for admin users. It only maps internal concepts to the external name space uri and enables SMW to resolve to externally defined vocabulary URIs (e.g. RDF export of local wiki pages). Semantic annontations and the SMW import page correspond as follows with ns being the locally defined namespace:
MediaWiki:Smw_import_ns maps imported concepts Assign on a property or class/category page the the external concept to a local property or class by: [[Imported from::ns:conceptTerm]] Use the property on a content page: [[ns:conceptTerm::some value]]
Normally templates code and forms should manage properties and their corresponding import properties, URIs etc. Then check if there is already an import page.
- Iptc4xmpExt (→ MediaWiki:Smw import Iptc4xmpExt)
- abcd2 (→ MediaWiki:Smw import abcd2)
- ac (→ MediaWiki:Smw import ac)
- biorel (→ MediaWiki:Smw import biorel)
- dc (→ MediaWiki:Smw import dc)
- dcclass (→ MediaWiki:Smw import dcclass)
- voc (→ MediaWiki:Smw import dcmi voc)
- dcmitype (→ MediaWiki:Smw import dcmitype)
- dcsyntax (→ MediaWiki:Smw import dcsyntax)
- dcterms (→ MediaWiki:Smw import dcterms)
- dwc (→ MediaWiki:Smw import dwc)
- dwcattributes (→ MediaWiki:Smw import dwcattributes)
- dwctype (→ MediaWiki:Smw import dwctype)
- eol (→ MediaWiki:Smw import eol)
- foaf (→ MediaWiki:Smw import foaf)
- geo (→ MediaWiki:Smw import geo)
- geotime (→ MediaWiki:Smw import geotime)
- germplasmType (→ MediaWiki:Smw import germplasmType)
- ggbn (→ MediaWiki:Smw import ggbn)
- gna (→ MediaWiki:Smw import gna)
- interaction (→ MediaWiki:Smw import interaction)
- mixs (→ MediaWiki:Smw import mixs)
- mst (→ MediaWiki:Smw import mst)
- ncd (→ MediaWiki:Smw import ncd)
- owl (→ MediaWiki:Smw import owl)
- photoshop (→ MediaWiki:Smw import photoshop)
- rdf (→ MediaWiki:Smw import rdf)
- rdfs (→ MediaWiki:Smw import rdfs)
- sioc (→ MediaWiki:Smw import sioc)
- skos (→ MediaWiki:Smw import skos)
- spi (→ MediaWiki:Smw import spi)
- test (→ MediaWiki:Smw import test)
- toi (→ MediaWiki:Smw import toi)
- tp (→ MediaWiki:Smw import tp)
- vann (→ MediaWiki:Smw import vann)
- vs (→ MediaWiki:Smw import vs)
- xmp (→ MediaWiki:Smw import xmp)
- xmpRights (→ MediaWiki:Smw import xmpRights)
- xsd (→ MediaWiki:Smw import xsd)
If there is no SMW import page yet for the vocabulary/concept scheme import, create the SMW import page. Concepts of Biorelations for instance use the locally defined namespace “biorel“, e.g. biorel:adjacent to (see also MediaWiki:Smw import biorel).
(The namespace prefix ns is used by SWM to identify the import URI of concepts)
http://name/space/uri/|[http://url/to/documentation Display text for doc-URL] comments|Type:Text metadataLanguage|Type:String providerManagedID|Type:String reviewer|Type:String reviewerComments|Type:Text SomeClass|Category …
Step 2: Create Concept Scheme
Set the preferred namespace prefix from Step 1 for the concept scheme.
Technical note: Template: Concept scheme manages settings and data for a concept scheme.
Step 3: Add Concepts to the Wiki
Concepts in this Wiki have their own page (in article name space) for documentation, definition and translation. Those pages can be managed by the form below or on the concept page by clicking on tab “Edit with form”. If you create the page for the imported concept prefix it with ns (=locally defined name space) from above. Set also the “Scheme membership“ of a concept page in the form.
Technical note: Template: Concept manages settings and data for a concept.
Step 4 as final step can be done as well during editing a concept form: the item “Concept type” in the concept form provides a link to do step 4.
Step 4: Complete SWM Setup by Creating Corresponding Property or Class Page
For a concept to be used by SWM as property or class it is necessary to set up either a property or class/category page holding the information of [[Imported from::ns:conceptTerm]]
. These informations are managed by templates and the forms below will assist you to set up those pages. Remember: only basic information necessary to SWM should be on these pages, detailed documentation, definition and translation is managed by the concept form in step 3 (or use the tab “Edit with form” on a concept page).
Depending on the type of the concept being imported there can exist only either a Property page or a Class page, not both of them.
Imported concept corresponds to | … | a property:
|
… | a class/category:
|
Step 3 can also be done on a property page in the hidden box of “Editor tools”.
Summary: Semantic MediaWiki pages / Concept pages
This technical summary shows settings and corresponding pages necessary for Semantic MediaWiki on the left side. These are maintained by the group of administrator users and on the right side there are pages shown that can be managed or created by authors interested in contributing concept definitions, translations etc.
┌ {{Concept scheme}} page with ─────────┐ │ preferred namespace prefix=ns │ │ relates to the import of SMW │ └────────────────────────────────────────┘ ────────────────────────────────── Semantic MediaWiki settings ────────────────────────────────── ┌─ {{Concept}} pages with detailed ──────┐ │ documentation, translation, │ ┌ MediaWiki:Smw_import_ns page ──────────────────────────────┐ │ scheme and collection membership etc. │ │http://name/space/uri/|[http://url/to/docu Docu display] │ comments|Type:Text → Property:ns:comments ns:comments │ metadataLanguage|Type:String → Property:ns:metadataLanguage ns:metadataLanguage │ providerManagedID|Type:String → Property:ns:providerManagedID ns:providerManagedID │ reviewer|Type:String → Property:ns:reviewer ns:reviewer │ reviewerComments|Type:Text → Property:ns:reviewerComments ns:reviewerComments │ SomeClass|Category → Class:ns:SomeClass ns:SomeClass │ … (notProperty:ns:SomeClass!) │ … ↓ └────────────────────────────────────────────────────────────┘ (these pages need to set property [[Imported from::ns:…]] to be exported by SMW’s RDF export correctly; this is set by template code)