Skip to content

Querying annotation property with SQWRL engine? #69

Description

@soda-hobart

Is it possible to query the value of an annotation property using the SQWRL API?
I tried to run this query:
"skos:prefLabel(?i, ?label) -> sqwrl:select(?label)"
But got an invalid SWRL predicate error.

I know that the label exists and that the prefix-manager is working properly because, with other functions and queries in my program, using that namespace and annotation, I was able to get the expected result.

(find-annotation my-ontology :skos/prefLabel 
  (.toString 
    (.getIRI 
      (:c (first 
        (result-rows ((sqwrl-query sqwrl "skos:Concept(?c) -> sqwrl:select(?c)"))))))))

I added a data property assertion to my ontology concerning the same individual, for "skos:prefLabel", and I was able to retrieve the literal result of that expression.
(result-rows ((sqwrl-query sqwrl "skos:prefLabel(?i, ?label) -> sqwrl:select(?label)")))

I guess I could just convert selected annotation property assertions to data property assertions for use with SQWRL? A lot of the bibliographic formats tend to be almost entirely implemented as annotation properties, for some reason.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions