andrecastro0o / ontology2smw

automating an RDF ontology import into Semantic Mediawiki
GNU General Public License v3.0
16 stars 5 forks source link

importing ontologies without aeon:SMW_datatype #31

Closed andrecastro0o closed 3 years ago

andrecastro0o commented 3 years ago

Currently ontology2smw import to wiki only the terms which contain a value to the property aeon:SMW_datatype as visible in SPARQL query_classes_properties.rq

I would like to make ontology2smw able to import other ontologies terms, even if they do not have aeon:SMW_datatype, as for instance datacite datacite ttl OR GND Ontology (gndo) gndo ttl

Development Steps

andrecastro0o commented 3 years ago

SPARQL Query in https://github.com/TIBHannover/ontology2smw/blob/issue31_ontologies_wout_aeon/ontology2smw/queries/ontology_terms.rq commit: https://github.com/TIBHannover/ontology2smw/commit/55d87fd414ef763a825c603d50a12d80dd3cbca9

andrecastro0o commented 3 years ago

Find the datatypes

is rdf:type value always a owl:XYZ ?

Or do ontology designers use other strategies to define a term as class / DatatypeProperty / ObjectProperty?

determine Has type:: without aeon:SMW_datatype

The main issue is how to determine from the terms definition the SMW Has type:: property of a Property definition

In ontology schema rdf:type is use to define if a terms is:

https://www.w3.org/TR/2004/REC-owl-guide-20040210/#owl_DatatypeProperty show the recommended xsd datatypes for use with owl:DatatypeProperty, plus rdfs:Literal

where is datatype defined?

In rdfs:range: the range of values given to a DatatypeProperty are X

###  https://github.com/tibonto/aeon#ID_URL
aeon:ID_URL rdf:type owl:DatatypeProperty ;
            rdfs:subPropertyOf aeon:ID ;
            rdfs:domain aeon:Identifier ;
            rdfs:range xsd:anyURI ;
###  http://rs.tdwg.org/abcd/terms/acquisitionSourceText
:acquisitionSourceText rdf:type owl:DatatypeProperty ,
                                owl:FunctionalProperty ;
                       rdfs:domain owl:Thing ;
                       rdfs:range xsd:string ;
dcat:bbox
  a rdf:Property ;
  a owl:DatatypeProperty ;
  rdfs:domain dct:Location ;
  rdfs:label "bounding box"@en ;
  rdfs:range rdfs:Literal ;
dcat:spatialResolutionInMeters
  a owl:DatatypeProperty ;
  rdfs:range xsd:decimal ;
###  http://xmlns.com/foaf/0.1/age
:age rdf:type owl:DatatypeProperty ,
              owl:FunctionalProperty ;
     rdfs:domain :Agent ;
     rdfs:range rdfs:Literal ;
andrecastro0o commented 3 years ago

Mapping xsd datatypes to SMW datatypes

{
'xsd:string': 'Text',  
'rdfs:Literal': 'Text',  
'xsd:Name': 'Text',  
'xsd:normalizedString': 'Text',  
'xsd:decimal': 'Number',  
'xsd:float': 'Number',  
'xsd:integer': 'Number',  
'xsd:nonNegativeInteger': 'Number',  
'xsd:positiveInteger': 'Number',  
'xsd:nonPositiveInteger': 'Number',  
'xsd:negativeInteger': 'Number',  
'xsd:positiveInteger': 'Number',  
'xsd:int': 'Number',  
'xsd:double': 'Number',  
'xsd:long': 'Number',  
'xsd:short': 'Number',  
'xsd:unsignedLong': 'Number',  
'xsd:byte': 'Number',  
'xsd:boolean': 'Boolean',  
'xsd:dateTime': 'Date',  
'xsd:time': 'Text',  
'xsd:date': 'Date',  
'xsd:gYearMonth': 'Date',  
'xsd:dateTime': 'Date',  
'xsd:gYear': 'Date',  
'xsd:gMonthDay': 'Text',  
'xsd:gDay': 'Text',  
'xsd:gMonth': 'Text',  
'xsd:anyURI': 'URL',  
'xsd:language': 'Text'  
}
andrecastro0o commented 3 years ago

Prefixes & Namespaces from http://prefix.cc/ in ontology2smw/queries/all_ns_prefixes.json

andrecastro0o commented 3 years ago

closed by #56