Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing ontologies without aeon:SMW_datatype #31

Closed
6 tasks done
andrecastro0o opened this issue Nov 13, 2020 · 5 comments
Closed
6 tasks done

importing ontologies without aeon:SMW_datatype #31

andrecastro0o opened this issue Nov 13, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@andrecastro0o
Copy link
Owner

andrecastro0o commented Nov 13, 2020

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

  • SPARQL query: to extract information from ontology terms
  • Test ontology query
  • Mapping xsd datatypes to SMW datatypes
  • All namespaces & prefix dict, derived from http://prefix.cc/
  • Prompt user for prefix when not found in all prefixes dict
  • Implement
@andrecastro0o andrecastro0o self-assigned this Nov 13, 2020
@andrecastro0o andrecastro0o added the enhancement New feature or request label Nov 13, 2020
@andrecastro0o
Copy link
Owner Author

@andrecastro0o
Copy link
Owner Author

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:

  • owl:Class -> SMW: Category
  • owl:AnnotationProperty -> SMW: Has type::Text
  • owl:ObjectProperty -> SMW: Has type::Page
  • owl:DatatypeProperty -> SMW: Has type:: ???

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
Copy link
Owner Author

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
Copy link
Owner Author

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

@andrecastro0o andrecastro0o pinned this issue Nov 20, 2020
This was referenced Nov 27, 2020
@andrecastro0o
Copy link
Owner Author

closed by #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant