Read external OWL files and use them in tawny
Read external OWL files and use them in tawny
(default-filter o e)
Filter for only named objects with an IRI the same as the ontology IRI.
Filter for only named objects with an IRI the same as the ontology IRI.
(default-transform _ e)
Extract the fragment from each IRI.
Extract the fragment from each IRI.
(defread symbol & rest)
Like read, but interns the ontology in symbol.
Like read, but interns the ontology in symbol.
(exception-nil-label-transform o e)
Check for empty labels noisily
Check for empty labels noisily
(filter-for-labels o e)
Filter annotations on an entity for labels
Filter annotations on an entity for labels
(fragment-transform e)
Create an entity name from the IRI fragment
Create an entity name from the IRI fragment
(intern-entity ns e)
(intern-entity ns e transform)
Intern the OWL entity, applying transform to the entity to generate a name to intern.
ns
should be a namespace.
e
should be the entity to transform
transform
should be a transform function that expects a single
argument, which is the entity and returns a string. By default
default-transform
is used with a nil first argument.
Intern the OWL entity, applying transform to the entity to generate a name to intern. `ns` should be a namespace. `e` should be the entity to transform `transform` should be a transform function that expects a single argument, which is the entity and returns a string. By default `default-transform` is used with a nil first argument.
(iri-create iri)
DEPRECATED: Use iri method in tawny.owl.
A convenience method for creating IRIs.
Most namespaces that call use 'defread' will need to create an IRI. This convenience method avoids the need for importing and depending directly on the OWL API.
DEPRECATED: Use iri method in tawny.owl. A convenience method for creating IRIs. Most namespaces that call use 'defread' will need to create an IRI. This convenience method avoids the need for importing and depending directly on the OWL API.
(iri-mapper iri-map)
Given a map of Ontology IRI strings to document IRI strings, return an OWLOntologyIRIMapper instance.
Given a map of Ontology IRI strings to document IRI strings, return an OWLOntologyIRIMapper instance.
(iri-starts-with-filter starts-with _ e)
Checks e to see if it is an OWLNamedObject and has an IRI starting with starts-with. Use this partially applied with a filter for 'read'.
Checks e to see if it is an OWLNamedObject and has an IRI starting with starts-with. Use this partially applied with a filter for 'read'.
(label-transform o e)
Get text from label annotation
Get text from label annotation
(noisy-nil-label-transform o e)
Check for empty labels noisily
Check for empty labels noisily
(read & rest)
Reads an ontology, and interns entities as vars. This takes a number of keyword arguments. Arguments are, :iri, :version-iri -- currently these must be specified in the read form, although they will also be present in th e OWL source. :location -- the location of the source -- this can be anything that can be passed to .loadOntologyFromOntologyDocument on the OWLOntologyManager. :prefix -- a prefix for the ontology :filter -- a filter function -- only entities returning true are interned. :transform -- entities are interned using a name returned by this function :mapper -- an OWLOntologyIRIMapper which is to be used for loading. See iri-mapper and resource-iri-mapper. :namespace -- the namespace in which to intern (or ns).
Reads an ontology, and interns entities as vars. This takes a number of keyword arguments. Arguments are, :iri, :version-iri -- currently these must be specified in the read form, although they will also be present in th e OWL source. :location -- the location of the source -- this can be anything that can be passed to .loadOntologyFromOntologyDocument on the OWLOntologyManager. :prefix -- a prefix for the ontology :filter -- a filter function -- only entities returning true are interned. :transform -- entities are interned using a name returned by this function :mapper -- an OWLOntologyIRIMapper which is to be used for loading. See iri-mapper and resource-iri-mapper. :namespace -- the namespace in which to intern (or *ns*).
(really-noisy-nil-label-transform o e)
Check for empty labels noisily
Check for empty labels noisily
(resource-iri-mapper iri-map)
Given a map of Ontology IRI strings to resource strings, return an OWLOntologyIRIMapper instance.
Given a map of Ontology IRI strings to resource strings, return an OWLOntologyIRIMapper instance.
(stop-characters-transform s)
Takes a string and treats characters not legal in a Clojure symbol. Use this composed with a entity transform function
Takes a string and treats characters not legal in a Clojure symbol. Use this composed with a entity transform function
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close