User:Andreas Plank/Testpage internal objects

From TDWG Terms Wiki
Jump to: navigation, search

It is very important to note that the first argument is a property pointing from the object, to the page, and not the other way around! Syntax is:

{{#set_internal:object_to_page_property
|property1=value1
|property2=value2
…
}}

So it is recommended to name the internal object rather:

  • “Relation of concept”::page-to-query (reads understandable) than
  • “Concept has relation”::page-to-query (reads weird)

Summary

Explanation: * fact, − disadvantage, + advantage

* #set_internal is similar to #subobject
* it does not appear in the default RDF export
+ it does appear with {{#ask:… foramt=rdf}} as own "swivt:Subject" 
+ silent usage of n-ary relations not to be exposed
− it does appear in the Browser Browse Properties at the bottom at «hide properties that link here»
− IDs are just indexed (#1, #2 etc) and provide no meaning (#subobject can have meaningfull IDs)

See also User:Andreas Plank/Testpage subobjects

Test

{{#set_internal: Relation of concept | skos:inScheme=DarwinCore }} sets an internal object, which is not seen in the Special:Browse but seen in #ask as indexed (#1, #2, …)
{{#ask: [[Relation of concept::{{FULLPAGENAME}}]] | ?skos:inScheme}} produces
 skos:inScheme
Andreas Plank/Testpage internal objectsDarwin Core
{{#ask: [[Relation of concept::{{PAGENAME}}]] | ?skos:inScheme}} or

Nothing (?Why ? because of {{PAGENAME}}? )

It does not appear in the RDF:

<!DOCTYPE rdf:RDF>
<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:swivt="http://semantic-mediawiki.org/swivt/1.0#"
	xmlns:wiki="http://terms.gbif.org/wiki/Special:URIResolver/"
	xmlns:property="http://terms.gbif.org/wiki/Special:URIResolver/Property-3A">

	<owl:Ontology rdf:about="http://terms.gbif.org/wiki/Special:ExportRDF/User%3AAndreas+Plank%2FTestpage+internal+objects">
		<swivt:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2012-10-17T14:18:11+02:00</swivt:creationDate>
		<owl:imports rdf:resource="http://semantic-mediawiki.org/swivt/1.0"/>
	</owl:Ontology>
	<swivt:Subject rdf:about="http://terms.gbif.org/wiki/Special:URIResolver/User-3AAndreas_Plank/Testpage_internal_objects">
		<rdfs:label>User:Andreas Plank/Testpage internal objects</rdfs:label>
		<swivt:page rdf:resource="http://terms.gbif.org/wiki/User:Andreas_Plank/Testpage_internal_objects"/>
		<rdfs:isDefinedBy rdf:resource="http://terms.gbif.org/wiki/Special:ExportRDF/User:Andreas_Plank/Testpage_internal_objects"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">2</swivt:wikiNamespace>
		<swivt:wikiPageModificationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2012-10-11T09:03:14Z</swivt:wikiPageModificationDate>
		<property:Modification_date-23aux rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2456211.8772454</property:Modification_date-23aux>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Andreas Plank/Testpage internal objects</swivt:wikiPageSortKey>
	</swivt:Subject>
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#creationDate" />
	<owl:ObjectProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#page" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiNamespace" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageModificationDate" />
	<owl:DatatypeProperty rdf:about="http://terms.gbif.org/wiki/Special:URIResolver/Property-3AModification_date-23aux" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageSortKey" />
	<!-- Created by Semantic MediaWiki, http://semantic-mediawiki.org/ -->
</rdf:RDF>

Retrieving data can be done with #ask or using also an extra #ask with output format=RDF:

{{#ask: [[Relation of concept::{{PAGENAME}}]] |?skos:inScheme}}
{{#ask: [[Relation of concept::{{PAGENAME}}]] |?skos:inScheme|format=RDF}}

Or export the same #ask query as RDF

{{#ask: [[Relation of concept::{{PAGENAME}}]] |?Concept has relation|?skos:inScheme}} Note: there is no object saved, if internal object is defined with blank "skos:inScheme = DarwinCore"!