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

Class may have only inherited properties #55

Closed
sklarman opened this issue Feb 26, 2020 · 1 comment · Fixed by #56
Closed

Class may have only inherited properties #55

sklarman opened this issue Feb 26, 2020 · 1 comment · Fixed by #56
Assignees

Comments

@sklarman
Copy link
Collaborator

sklarman commented Feb 26, 2020

In the following schema, class dbo:Country has only one property inherited from owl:Thing:

@prefix dbo: <http://dbpedia.org/ontology/> .
      @prefix foaf: <http://xmlns.com/foaf/0.1/> .
      @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
      @prefix owl: <http://www.w3.org/2002/07/owl#> .
      @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
      @prefix dct: <http://purl.org/dc/terms/> .
      @prefix schema: <http://schema.org/> .

      owl:Thing a rdfs:Class ;
          rdfs:comment "Anything" .

      dbo:Country a rdfs:Class ;
          rdfs:comment "A country" ;
          rdfs:subClassOf owl:Thing .

rdfs:label a rdf:Property, owl:FunctionalProperty ;
    rdfs:comment "Name of the entity" ;
    schema:domainIncludes owl:Thing ;
    schema:rangeIncludes xsd:string .

This is an acceptable structure, yet it leads to schema compilation error:

2020-02-26 08:59:16 [info]:     Schema generated from string
(node:396) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fields' of unde
fined
    at createClassList (/home/runner/GleefulLimitedSpof/node_modules/staple-api/schema/schema
FromOntology.js:122:49)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:396) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originat
ed either by throwing inside of an async function without a catch block, or by rejecting a pr
omise which was not handled with .catch(). (rejection id: 1)
(node:396) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the
future, promise rejections that are not handled will terminate the Node.js process with a non
-zero exit code.
@anvime anvime mentioned this issue Feb 26, 2020
6 tasks
@anvime anvime linked a pull request Feb 26, 2020 that will close this issue
6 tasks
@anvime
Copy link
Collaborator

anvime commented Feb 26, 2020

issue branch merged successfully

@anvime anvime closed this as completed Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants