Build ontologies in OWL.
Build ontologies in OWL.
(add-a-simple-annotation o named-entity annotation)
Adds an annotation to a named objecqt.
Adds an annotation to a named objecqt.
(add-an-ontology-annotation o o annotation)
Adds an annotation to an ontology.
Adds an annotation to an ontology.
(add-annotation annotations)
(add-annotation named-entity & annotations)
(add-annotation ontology & annotations)
(add-annotation ontology named-entity & annotations)
Add an annotation in the ontology to either the named-entity or the ontology. Broadcasts over annotations.
Add an annotation in the ontology to either the named-entity or the ontology. Broadcasts over annotations.
(add-axiom o axiom)
Adds an axiom from the given ontology, or the current one.
Adds an axiom from the given ontology, or the current one.
(add-characteristics o property characteristic)
Add a list of characteristics to the property.
Add a list of characteristics to the property.
(add-class o name)
Adds a class to the ontology.
Adds a class to the ontology.
(add-comment o named-entity comment)
Add comments to the named entities.
Add comments to the named entities.
(add-data-characteristics o property characteristic)
Add a list of characteristics to the property.
Add a list of characteristics to the property.
(add-data-disjoint o name disjoint)
Adds a disjoint data property axiom to the ontology
Adds a disjoint data property axiom to the ontology
(add-data-domain property & domains)
(add-data-domain o property & domains)
Adds a domain to a data property.
Adds a domain to a data property.
(add-data-equivalent o property equivalent)
Adds a equivalent data properties axiom.
Adds a equivalent data properties axiom.
(add-data-range property & ranges)
(add-data-range ontology property & ranges)
Adds a range to a data property.
Adds a range to a data property.
(add-data-subproperty o property sub)
Adds a sub property to a data property.
Adds a sub property to a data property.
(add-data-superproperty o property super)
Adds a super property to a data property.
Adds a super property to a data property.
(add-datatype-equivalent o datatype equivalent)
Adds a datatype equivalent axiom
Adds a datatype equivalent axiom
(add-different o & individuals)
Adds all arguments as different individuals to the current ontology unless first arg is an ontology in which case this is used
Adds all arguments as different individuals to the current ontology unless first arg is an ontology in which case this is used
(add-disjoint name disjoint)
(add-disjoint ontology name disjoint)
Adds a disjoint axiom to the ontology.
Adds a disjoint axiom to the ontology.
(add-disjoint-property o name disjoint)
Adds a disjoint property axiom to the ontology
Adds a disjoint property axiom to the ontology
(add-disjoint-union o clazz subclasses)
Adds a disjoint union axiom to all subclasses.
Adds a disjoint union axiom to all subclasses.
(add-domain o property domain)
Adds all the entities in domainlist as domains to a property.
Adds all the entities in domainlist as domains to a property.
(add-equivalent name equivalent)
(add-equivalent ontology name equivalent)
Adds an equivalent axiom to the ontology.
Adds an equivalent axiom to the ontology.
(add-equivalent-property o property equivalent)
Adds a equivalent data properties axiom.
Adds a equivalent data properties axiom.
(add-fact individual & facts)
(add-fact ontology individual & facts)
Add FACTS to an INDIVIDUAL in the current ontology or
ONTOLOGY if present. Facts are produced with fact' and
fact-not'.
Add FACTS to an INDIVIDUAL in the current ontology or ONTOLOGY if present. Facts are produced with `fact' and `fact-not'.
(add-has-key o class propertylist)
Adds a has-key to the class.
Adds a has-key to the class.
(add-inverse o property inverse)
Adds all the entities in inverselist as inverses to a property.
Adds all the entities in inverselist as inverses to a property.
(add-label o named-entity label)
Add labels to the named entities.
Add labels to the named entities.
(add-range o property range)
Adds all the entities in rangelist as range to a property.
Adds all the entities in rangelist as range to a property.
(add-same & individuals)
(add-same ontology & individuals)
Adds all arguments as the same individual to the current ontology or to ONTOLOGY if present.
Adds all arguments as the same individual to the current ontology or to ONTOLOGY if present.
(add-subchain o property subpropertylist)
Adds a property chain to property.
Adds a property chain to property.
(add-subclass name & subclass)
(add-subclass ontology name & subclass)
Adds one or more subclasses to name in ontology.
Adds one or more subclasses to name in ontology.
(add-subproperty o property subproperty)
Adds all items in superpropertylist to property as a superproperty.
Adds all items in superpropertylist to property as a superproperty.
(add-super-annotation o subproperty superproperty)
Adds a set of superproperties to the given subproperty.
Adds a set of superproperties to the given subproperty.
(add-superclass name & superclass)
(add-superclass ontology name & superclass)
Adds one or more superclasses to name in ontology.
Adds one or more superclasses to name in ontology.
(add-superproperty o property superproperty)
Adds all items in superpropertylist to property as a superproperty.
Adds all items in superpropertylist to property as a superproperty.
(add-type individual & clazzes)
(add-type o individual & clazzes)
Adds CLAZZES as a type to individual to current ontology or ONTOLOGY if present.
Adds CLAZZES as a type to individual to current ontology or ONTOLOGY if present.
(annotate entity-or-list & annotation)
Given an entity or a list of entities, add annotations and return as an Entityable and Annotatable entity.
These entities are used to annotate the axiom describing the relationship between the entity and the places where this entity is used. So, for example, if an annotated class is added as a subclass of another, the SubClassOf axiom will be annotated.
Given an entity or a list of entities, add annotations and return as an Entityable and Annotatable entity. These entities are used to annotate the axiom describing the relationship between the entity and the places where this entity is used. So, for example, if an annotated class is added as a subclass of another, the SubClassOf axiom will be annotated.
(annotation o annotation-property literal)
(annotation o annotation-property literal language)
Creates a new annotation. If literal is a string it is interpreted as a String in English. Otherwise, it can be any annotation value or object which can be co-erced to an IRI
Creates a new annotation. If literal is a string it is interpreted as a String in English. Otherwise, it can be any annotation value or object which can be co-erced to an IRI
(annotation-property name & frames)
(annotation-property ontology name & frames)
Creates a new annotation property.
Creates a new annotation property.
(annotation-property-explicit o name frames)
Add this annotation property to the ontology
Add this annotation property to the ontology
(annotator annotation-property)
Creates a new annotator function. Annotation-property maybe an OWLAnnotationProperty object or a string in which case it will be coerced into a OWLAnnotationProperty using iri or iri-for-name. The function returned can take an optional ontology argument which will be used in this case.
Creates a new annotator function. Annotation-property maybe an OWLAnnotationProperty object or a string in which case it will be coerced into a OWLAnnotationProperty using iri or iri-for-name. The function returned can take an optional ontology argument which will be used in this case.
(anonymous-individual)
Return a new anonymous individual
Return a new anonymous individual
(as-disjoint & entities)
(as-disjoint ontology & entities)
All entities are declared as disjoint. Entities may be any structure and may also be a var. See also 'as-subclasses'.
All entities are declared as disjoint. Entities may be any structure and may also be a var. See also 'as-subclasses'.
(as-disjoint-subclasses o superclass & subclasses)
Declare all subclasses as disjoint
Declare all subclasses as disjoint
(as-equivalent o & entities)
Declare the properties or classes as disjoint.
Declare the properties or classes as disjoint.
(as-inverse o p1 p2)
Declare the two properties as inverse
Declare the two properties as inverse
(as-iriable entity)
If entity is a iriable do nothing, else throw an exception.
If entity is a iriable do nothing, else throw an exception.
(as-subclasses superclass & classes)
(as-subclasses superclass options & classes)
(as-subclasses ontology superclass options & classes)
All classes are given the superclass. The first item may be an ontology, followed by options.
:disjoint also sets the class disjoint. :cover also makes the subclasses cover the superclass.
All classes are given the superclass. The first item may be an ontology, followed by options. :disjoint also sets the class disjoint. :cover also makes the subclasses cover the superclass.
Returns a minimum cardinality restriction.
Returns a minimum cardinality restriction.
Returns a maximum cardinality restriction.
Returns a maximum cardinality restriction.
Returns a backward compatible with annotation.
Returns a backward compatible with annotation.
(broadcast-ontology fnc a b)
(broadcast-ontology fnc a b c)
(broadcast-ontology fnc a b c d)
(broadcast-ontology fnc a b c d e)
(broadcast-ontology fnc a b c d e f)
(broadcast-ontology fnc a b c d e f g)
(broadcast-ontology fnc a b c d e f g & args)
Given a function, fnc, and args ensure that the first arg is an ontology using default-ontology, and then broadcast the rest, so that the fnc is called with the first and second args, first and third args and so on. This function is micro-optimised to avoid use of variadic method calls or list operations.
Given a function, fnc, and args ensure that the first arg is an ontology using default-ontology, and then broadcast the rest, so that the fnc is called with the first and second args, first and third args and so on. This function is micro-optimised to avoid use of variadic method calls or list operations.
(broadcast-ontology-full f & args)
Given a function which expects an ontology and two other arguments, ensure that the first argument is an ontology (see default-ontology for details), then f repeatedly against the second args and all subsequent arguments flattened. Where possible, we avoid using this function for the micro-optimisd broadcast-ontology.
Given a function which expects an ontology and two other arguments, ensure that the first argument is an ontology (see default-ontology for details), then f repeatedly against the second args and all subsequent arguments flattened. Where possible, we avoid using this function for the micro-optimisd broadcast-ontology.
(broadcast-ontology-maybe fnc a b)
(broadcast-ontology-maybe fnc a b c)
(broadcast-ontology-maybe fnc a b c d)
(broadcast-ontology-maybe fnc a b c d e)
(broadcast-ontology-maybe fnc a b c d e f)
(broadcast-ontology-maybe fnc a b c d e f g)
(broadcast-ontology-maybe fnc a b c d e f g & args)
Like broadcast-ontology but does not signal an error where there is no default ontology.
Like broadcast-ontology but does not signal an error where there is no default ontology.
(data-and o & types)
Returns the intersection of two data ranges.
Returns the intersection of two data ranges.
(data-at-least o number property)
Returns a data min cardinality restriction.
Returns a data min cardinality restriction.
(data-at-most o number property)
Returns a data max cardinality restriction.
Returns a data max cardinality restriction.
(data-exactly o number property)
Returns a data exact cardinality restriction.
Returns a data exact cardinality restriction.
(data-get-fact o property from to annotations)
Returns a data fact.
Returns a data fact.
(data-get-fact-not o property from to annotations)
Returns a data negative fact.
Returns a data negative fact.
(data-has-value o property literal)
Returns a data has value restriction.
Returns a data has value restriction.
(data-not o type)
Returns the complement of two data ranges.
Returns the complement of two data ranges.
(data-oneof o & literals)
Returns a data one of restriction.
Returns a data one of restriction.
(data-only o property datatype)
Returns a data all values from restriction.
Returns a data all values from restriction.
(data-or o & types)
Returns the union of two data ranges.
Returns the union of two data ranges.
(data-some o property data-range)
Returns a data some values from restriction.
Returns a data some values from restriction.
(datatype-explicit o name frames)
Defines a new datatype.
Defines a new datatype.
(datatype-property o name & frames)
Define a new datatype property
Define a new datatype property
(datatype-property-explicit o name frames)
Define a new datatype property with an explicit map
Define a new datatype property with an explicit map
(declare-classes & args)
Declares all the classes given in args. Any args including and following the first keyword will be interpreted as frames for all the classes. Frame args will be evaluated multiple times so should be side-effect free.
This is mostly useful for forward declarations.
See `defclassn' to define many classes with different frames.
Declares all the classes given in args. Any args including and following the first keyword will be interpreted as frames for all the classes. Frame args will be evaluated multiple times so should be side-effect free. This is mostly useful for forward declarations. See `defclassn' to define many classes with different frames.
(defaproperty entity__4210__auto__ & frames__4211__auto__)
Defines a new annotation property in the current ontology. See 'defclass' for more details on the syntax
Defines a new annotation property in the current ontology. See 'defclass' for more details on the syntax
(default-ontology f)
(default-ontology f a)
(default-ontology f a b)
(default-ontology f a b c)
(default-ontology f a b c d)
(default-ontology f a b c d e)
(default-ontology f a b c d e fa)
(default-ontology f a b c d e fa g)
(default-ontology f a b c d e fa g h)
(default-ontology f a b c d e fa g h i)
(default-ontology f a b c d e fa g h i j)
(default-ontology f a b c d e fa g h i j & args)
Invoke f ensuring the first argument is an ontology or nil. If the first argument is already an ontology use that, if not use the default ontology, or throw an IllegalStateException. To set the default ontology use either the defontology macro, or ontology-to-namespace. This function is multi-arity as a micro optimization, to avoid a variadic invocation.
Invoke f ensuring the first argument is an ontology or nil. If the first argument is already an ontology use that, if not use the default ontology, or throw an IllegalStateException. To set the default ontology use either the defontology macro, or ontology-to-namespace. This function is multi-arity as a micro optimization, to avoid a variadic invocation.
Hook called when the default ontology is used
Hook called when the default ontology is used
(default-ontology-maybe f a)
(default-ontology-maybe f a b)
(default-ontology-maybe f a b c)
(default-ontology-maybe f a b c d)
(default-ontology-maybe f a b c d e)
(default-ontology-maybe f a b c d e fa)
(default-ontology-maybe f a b c d e fa g)
(default-ontology-maybe f a b c d e fa g h)
(default-ontology-maybe f a b c d e fa g h i)
(default-ontology-maybe f a b c d e fa g h i j)
(default-ontology-maybe f a b c d e fa g h i j & args)
Invoke f ensuring the first argument is an ontology or nil. The logic used is the same as default-ontology except that no error is signalled if there is no current-ontology. The multi-arity function avoids variadic calls most of the time.
Invoke f ensuring the first argument is an ontology or nil. The logic used is the same as default-ontology except that no error is signalled if there is no current-ontology. The multi-arity function avoids variadic calls most of the time.
(defbdontfn name & body)
Like the defn and defdontfn, but broadcasts. That is it expects a three arg function, f with ontology, x and y, but defines a new function which takes ontology, x and rest, returning a list which is f applied to ontology, x and the flattened elements of rest.
Uses the default ontology if not supplied and throws an IllegalStateException if this is not set.
Like the defn and defdontfn, but broadcasts. That is it expects a three arg function, f with ontology, x and y, but defines a new function which takes ontology, x and rest, returning a list which is f applied to ontology, x and the flattened elements of rest. Uses the default ontology if not supplied and throws an IllegalStateException if this is not set.
(defbmontfn name & body)
Like defbdontfn, but also accepts nil as either the passed or default ontology.
Like defbdontfn, but also accepts nil as either the passed or default ontology.
(defclass entity__4210__auto__ & frames__4211__auto__)
Define a new class. Accepts a set number of frames, each marked by a keyword :subclass, :equivalent, :annotation, :comment, :label or :disjoint. Each frame can contain an item, a list of items or any combination of the two. The class object is stored in a var called classname.
Define a new class. Accepts a set number of frames, each marked by a keyword :subclass, :equivalent, :annotation, :comment, :label or :disjoint. Each frame can contain an item, a list of items or any combination of the two. The class object is stored in a var called classname.
(defclassn & classes)
Defines many classes at once.
Each class and associated frames should be supplied as a vector.
See `declare-classes' where frames (or just default frames) are not needed.
Defines many classes at once. Each class and associated frames should be supplied as a vector. See `declare-classes' where frames (or just default frames) are not needed.
(defcopy symb & args)
Takes an existing definition from another namespace and copies it into the current namespace with no changes in semantics. This can be useful for convenience, where one namespace should contain all the OWLObjects of another, or for forward declaration, where entities will be refined later.
This does not add the existing definition to the current ontology. In most cases this will have been imported.
Takes an existing definition from another namespace and copies it into the current namespace with no changes in semantics. This can be useful for convenience, where one namespace should contain all the OWLObjects of another, or for forward declaration, where entities will be refined later. This does not add the existing definition to the current ontology. In most cases this will have been imported.
(defdatatype entity__4210__auto__ & frames__4211__auto__)
Defines a new datatype
Defines a new datatype
(defdontfn name & body)
Like defn, but automatically adds the current-ontology to the args if the first arg is not an ontology. Throws an IllegalStateException if there is no current ontology.
The 'd' stands for definitely.
Like defn, but automatically adds the current-ontology to the args if the first arg is not an ontology. Throws an IllegalStateException if there is no current ontology. The 'd' stands for definitely.
(defdproperty entity__4210__auto__ & frames__4211__auto__)
Defines a new datatype property
Defines a new datatype property
(defentity name docstring entity-function)
Defines a new macro for defining OWL entities.
This macro allows easy definition of new macros similar to the defclass or
defoproperty macro. It expects an entity-function which can accept an
ontology or nil as a first argument, and then a set of frames. See
defdontfn' or
defmontfn' which support the declaration of these functions.
The ontology argument is taken from a first :ontology frame which is handled by
this macro. This macro also marks the resultant var with :owl metadata.
The resultant macro takes arguments of the form [name :ontology o :frame1 f]. The ontology frame is optional.
Defines a new macro for defining OWL entities. This macro allows easy definition of new macros similar to the defclass or defoproperty macro. It expects an entity-function which can accept an ontology or nil as a first argument, and then a set of frames. See `defdontfn' or `defmontfn' which support the declaration of these functions. The ontology argument is taken from a first :ontology frame which is handled by this macro. This macro also marks the resultant var with :owl metadata. The resultant macro takes arguments of the form [name :ontology o :frame1 f]. The ontology frame is optional.
(defindividual entity__4210__auto__ & frames__4211__auto__)
Declare a new individual
Declare a new individual
(defmontfn name & body)
Like defn, but automatically adds the current ontology or nil to the args if the first arg is not an ontology.
The 'm' stands for maybe.
Like defn, but automatically adds the current ontology or nil to the args if the first arg is not an ontology. The 'm' stands for maybe.
(defnwithfn name function & body)
Define a new var like defn, but compose FUNCTION with BODY before rather than just using BODY directly.
Define a new var like defn, but compose FUNCTION with BODY before rather than just using BODY directly.
(defontology name & body)
Define a new ontology with `name'.
The following keys must be supplied. :iri -- the IRI for the new ontology :prefix -- the prefix used in the serialised version of the ontology
Define a new ontology with `name'. The following keys must be supplied. :iri -- the IRI for the new ontology :prefix -- the prefix used in the serialised version of the ontology
(defoproperty entity__4210__auto__ & frames__4211__auto__)
Defines a new object property in the current ontology.
Defines a new object property in the current ontology.
(defrefine symb & args)
Takes an existing definition, add more frames.
The first element should be a namespace qualified symbol. The unqualified part of this will be used in the current namespace.
See also 'refine'
Takes an existing definition, add more frames. The first element should be a namespace qualified symbol. The unqualified part of this will be used in the current namespace. See also 'refine'
The same as add-data-superproperty but deprecated. This is to deprecated the :superproperty frame
The same as add-data-superproperty but deprecated. This is to deprecated the :superproperty frame
The same as add-super-annotation used to implement the old add-sub-annotation functionality.
The same as add-super-annotation used to implement the old add-sub-annotation functionality.
This is the same as add-subchain, but marked as deprecated and used as the handler for :subpropertychain.
This is the same as add-subchain, but marked as deprecated and used as the handler for :subpropertychain.
This is the same as add-superproperty but marked as deprecated and used as the handler for :subproperty.
This is the same as add-superproperty but marked as deprecated and used as the handler for :subproperty.
(direct-instances o name)
Return all direct instances of NAME class.
Return all direct instances of NAME class.
(direct-subclasses o name)
Returns the direct subclasses of name.
Returns the direct subclasses of name.
(direct-subproperties o property)
Returns all direct subproperties of property.
Returns all direct subproperties of property.
(direct-superclasses o name)
Returns the direct superclasses of name. Name can be either a class or a string name. Returns a list of class expressions.
Returns the direct superclasses of name. Name can be either a class or a string name. Returns a list of class expressions.
(direct-superproperties o property)
Return all direct superproperties of property.
Return all direct superproperties of property.
(disjoint-classes o list)
Makes all elements in list disjoint. All arguments must of an instance of OWLClassExpression
Makes all elements in list disjoint. All arguments must of an instance of OWLClassExpression
(disjoint-data-properties o properties)
(disjoint-properties o properties)
Make all the properties in PROPERTIES disjoint.
Make all the properties in PROPERTIES disjoint.
(disjoint? o a b)
Returns t iff entities (classes or properties) are asserted to be disjoint.
Returns t iff entities (classes or properties) are asserted to be disjoint.
(entity-for-iri o iri)
Return the OWLObject for a given IRI if it exists, checking 'ontology' first, but checking all loaded ontologies.
This function uses a heuristic to find the right entity. If you want more control use 'check-entity-set' and the '.getEntitiesInSignature' method of OWLOntology.
Return the OWLObject for a given IRI if it exists, checking 'ontology' first, but checking all loaded ontologies. This function uses a heuristic to find the right entity. If you want more control use 'check-entity-set' and the '.getEntitiesInSignature' method of OWLOntology.
(entity-for-string o string)
Returns the OWLObject for a given string. See 'entity-for-iri' for more details. Attempts both ontology specific iri to name conversion, and direct use of string as an IRI.
Returns the OWLObject for a given string. See 'entity-for-iri' for more details. Attempts both ontology specific iri to name conversion, and direct use of string as an IRI.
(equivalent-classes o list)
Makes all elements in list equivalent. All arguments must of an instance of OWLClassExpression
Makes all elements in list equivalent. All arguments must of an instance of OWLClassExpression
(equivalent-data-properties o properties)
(equivalent-properties o properties)
Adds properties as equivalent to the ontology.
Adds properties as equivalent to the ontology.
(equivalent? o a b)
Returns t iff classes are asserted to be equivalent.
Returns t iff classes are asserted to be equivalent.
Returns an exact cardinality restriction.
Returns an exact cardinality restriction.
(fact o property to)
Returns a fact assertion a relation by PROPERTY which can be either an object or data property toward either an individual or literal TO. This is the same as the function `is'.
Returns a fact assertion a relation by PROPERTY which can be either an object or data property toward either an individual or literal TO. This is the same as the function `is'.
(fact-not o property to)
Returns a fact asserting the lack of a relationship along PROPERTY toward an either an individual or literal TO.
Returns a fact asserting the lack of a relationship along PROPERTY toward an either an individual or literal TO.
(get-current-ontology)
(get-current-ontology ns)
Gets the current ontology. Throws an exception if there is not current ontology
Gets the current ontology. Throws an exception if there is not current ontology
(get-current-ontology-maybe)
(get-current-ontology-maybe ns)
Gets the current ontology, or nil if there is not one.
Gets the current ontology, or nil if there is not one.
(get-prefix o)
Returns the prefix for the given ontology, or the current ontology if none is given.
Returns the prefix for the given ontology, or the current ontology if none is given.
(guess-individual-literal o entity)
(guess-type o entity)
Guesses the type of the entity. Returns ::object, :data or :annotation or nil where the type cannot be guessed. IllegalArgumentException is thrown for arguments which make no sense (not an OWLObject, IRI, String or number).
What this means is, for a collection find the first entity for which we can guess a type for. For an OWLClass, OWLIndividual, OWLDatatype or OWLAnnotationProperty object return the appropriate value. For an IRI check the current ontology, the current ontology with its import closure, and all known ontologies with their import clojure. For a string convert to an IRI using the current ontology rules, and check again. Finally, check convert to an IRI with no transformation. nil is returned when the result is not clear.
Guesses the type of the entity. Returns ::object, :data or :annotation or nil where the type cannot be guessed. IllegalArgumentException is thrown for arguments which make no sense (not an OWLObject, IRI, String or number). What this means is, for a collection find the first entity for which we can guess a type for. For an OWLClass, OWLIndividual, OWLDatatype or OWLAnnotationProperty object return the appropriate value. For an IRI check the current ontology, the current ontology with its import closure, and all known ontologies with their import clojure. For a string convert to an IRI using the current ontology rules, and check again. Finally, check convert to an IRI with no transformation. nil is returned when the result is not clear.
(guess-type-error & args)
Throws an exception always
Throws an exception always
(has-self o property)
Returns an OWL has self restriction.
Returns an OWL has self restriction.
Returns a has-value restriction.
Returns a has-value restriction.
Returns an incompatible with annotation.
Returns an incompatible with annotation.
(individual o name & frames)
(individual-explicit o name frames)
Returns a new individual.
Returns a new individual.
(intern-owl name entity)
Intern an OWL Entity. Compared to the clojure.core/intern function this signals a hook, and adds :owl true to the metadata. NAME must be a symbol
Intern an OWL Entity. Compared to the clojure.core/intern function this signals a hook, and adds :owl true to the metadata. NAME must be a symbol
Hook called when an new var is created with an OWLObject, with the var
Hook called when an new var is created with an OWLObject, with the var
(intern-owl-string name entity)
(intern-owl-string ns name entity)
Interns an OWL Entity. Compared to the clojure.core/intern function this signals a hook, and adds :owl true to the metadata. NAME must be a strings
Interns an OWL Entity. Compared to the clojure.core/intern function this signals a hook, and adds :owl true to the metadata. NAME must be a strings
(inverse o property)
Creates an object inverse of expression.
Creates an object inverse of expression.
(inverse? o p1 p2)
Returns t iff properties are asserted to be inverse
Returns t iff properties are asserted to be inverse
(iri name)
Returns an IRI object given a string or URI. Does no transformation on the string; use 'iri-for-name' to perform ontology specific expansion
Returns an IRI object given a string or URI. Does no transformation on the string; use 'iri-for-name' to perform ontology specific expansion
(iri-for-name o name)
Returns an IRI object for the given name.
This is likely to become a property of the ontology at a later date, but at the moment it is very simple.
Returns an IRI object for the given name. This is likely to become a property of the ontology at a later date, but at the moment it is very simple.
(iriable? entity)
Returns true iff entity is an IRIable.
Returns true iff entity is an IRIable.
Returns a fact assertion a relation by PROPERTY which can be either an object or data property toward either an individual or literal TO
Returns a fact assertion a relation by PROPERTY which can be either an object or data property toward either an individual or literal TO
Return an is defined by annotation.
Return an is defined by annotation.
(literal o literal & {:keys [lang type]})
Returns a OWL2 literal.
literal' is the value of the literal and must be a string or a number. Anything else must by coerced into a string manually. Options can also be specified, with :lang definining the language where
literal' is a string, and :type
which is an OWLDatatype object.
Returns a OWL2 literal. `literal' is the value of the literal and must be a string or a number. Anything else must by coerced into a string manually. Options can also be specified, with :lang definining the language where `literal' is a string, and :type which is an OWLDatatype object.
(max-inc to)
Returns a max inclusive restriction.
Returns a max inclusive restriction.
(min-inc from)
Returns a min inclusive restriction.
Returns a min inclusive restriction.
(min-max from to)
Returns a min-max exclusive restriction.
Returns a min-max exclusive restriction.
(min-max-inc from to)
Returns a min max inclusive restriction.
Returns a min max inclusive restriction.
(object-and o & classes)
Returns an OWL intersection of restriction.
Returns an OWL intersection of restriction.
(object-at-least o cardinality property & class)
Returns an OWL at-least cardinality restriction.
Returns an OWL at-least cardinality restriction.
(object-at-most o cardinality property & class)
Returns an OWL at-most cardinality restriction.
Returns an OWL at-most cardinality restriction.
(object-exactly o cardinality property & class)
Returns an OWL exact cardinality restriction.
Returns an OWL exact cardinality restriction.
(object-get-fact _ property from to annotations)
Returns an OWL Object property assertion axiom.
Returns an OWL Object property assertion axiom.
(object-get-fact-not _ property from to annotations)
Returns a negative OWL Object property assertion axiom.
Returns a negative OWL Object property assertion axiom.
(object-has-value o property individual)
Adds an OWL has-value restriction.
Adds an OWL has-value restriction.
(object-not o & class)
Returns an OWL complement of restriction.
Returns an OWL complement of restriction.
(object-oneof o & individuals)
Returns an OWL one of property restriction.
Returns an OWL one of property restriction.
(object-only property & clazzes)
(object-only ontology property & clazzes)
Returns an OWL all values from restriction.
Returns an OWL all values from restriction.
(object-or o & classes)
Returns an OWL union of restriction.
Returns an OWL union of restriction.
(object-property o name & frames)
Returns a new object property in the current ontology.
Returns a new object property in the current ontology.
(object-property-explicit o name frames)
Returns an object-property. This requires an hash with a list value for each frame.
Returns an object-property. This requires an hash with a list value for each frame.
(object-some property & clazzes)
(object-some ontology property & clazzes)
Returns an OWL some values from restriction.
Returns an OWL some values from restriction.
(object-some-only o property & classes)
Returns an restriction combines the OWL some values from and all values from restrictions.
Returns an restriction combines the OWL some values from and all values from restrictions.
Returns a one-of restriction to the arguments of individuals or data ranges.
Returns a one-of restriction to the arguments of individuals or data ranges.
Returns a universal rescriction with another class or data range.
Returns a universal rescriction with another class or data range.
(ontology & args)
(ontology-explicit options)
Returns a new ontology. See 'defontology' for full description.
Returns a new ontology. See 'defontology' for full description.
Map between namespaces and ontologies
Map between namespaces and ontologies
(ontology-options o)
Returns the ontology options for 'ontology' or the current-ontology
Returns the ontology options for 'ontology' or the current-ontology
Ontology options. A map on a atom for each ontology
Ontology options. A map on a atom for each ontology
(ontology-to-namespace o)
(ontology-to-namespace ns o)
Sets the current ontology as defined by `defontology'
Sets the current ontology as defined by `defontology'
Returns an intersection restriction to all of the arguments.
Returns an intersection restriction to all of the arguments.
(owl-class o name & frames)
Creates a new class in the current ontology. See 'defclass' for full details.
Creates a new class in the current ontology. See 'defclass' for full details.
(owl-class-explicit o name frames)
Creates a class in the current ontology. Frames is a map, keyed on the frame name, value a list of items (of other lists) containing classes. This function has a rigid syntax, and the more flexible 'owl-class' is normally preferred. However, this function should be slightly faster.
Creates a class in the current ontology. Frames is a map, keyed on the frame name, value a list of items (of other lists) containing classes. This function has a rigid syntax, and the more flexible 'owl-class' is normally preferred. However, this function should be slightly faster.
(owl-data-factory)
Returns the main factory for all other objects.
Returns the main factory for all other objects.
(owl-import o)
(owl-import ontology-into o)
Adds a new import to the current ontology. o may be an ontology or an IRI
Adds a new import to the current ontology. o may be an ontology or an IRI
(owl-max to)
Returns a data max exclusion restriction.
Returns a data max exclusion restriction.
(owl-min from)
Returns a data min exclusion restriction.
Returns a data min exclusion restriction.
(owl-not o entity)
(owl-not o property entity)
Returns a complement of restriction or negative property assertion axiom.
Returns a complement of restriction or negative property assertion axiom.
(owl-ontology-manager)
The single OWLOntologyManager used by Tawny.
The single OWLOntologyManager used by Tawny.
Returns an union restriction to all of the arguments.
Returns an union restriction to all of the arguments.
Returns an existential restriction with another class or a data range.
Returns an existential restriction with another class or a data range.
A map of keywords to the OWL2Datatypes values
A map of keywords to the OWL2Datatypes values
(re-annotate entity annotated)
Returns a Annotated with the entity and the same annotations as annotated.
This is generally intended to transfer annotations after, for example, the entity has been derived from the existing entity. So, we might want to replace an IRI with an OWLObject, but the same annotations.
Returns a Annotated with the entity and the same annotations as annotated. This is generally intended to transfer annotations after, for example, the entity has been derived from the existing entity. So, we might want to replace an IRI with an OWLObject, but the same annotations.
Takes an existing definition, adds it to the current ontology, and then adds more frames. owlentity is the OWLEntity to be refined, and frames are the additional frames. The keys to the frames must be appropriate for the type of entity. See 'owl-class' or 'object-property' for more details.
This is useful for two main reasons. First, to build class definitions in two places and add frames in both of these places. For simple forward declaration 'declare-classes' is better. The second is where the same class needs to appear in two ontologies, but with more axioms in the second. This can enable, for example, building two interlocking ontologies with different OWL profiles.
Takes an existing definition, adds it to the current ontology, and then adds more frames. owlentity is the OWLEntity to be refined, and frames are the additional frames. The keys to the frames must be appropriate for the type of entity. See 'owl-class' or 'object-property' for more details. This is useful for two main reasons. First, to build class definitions in two places and add frames in both of these places. For simple forward declaration 'declare-classes' is better. The second is where the same class needs to appear in two ontologies, but with more axioms in the second. This can enable, for example, building two interlocking ontologies with different OWL profiles.
(remove-axiom o & axiom-list)
Removes a list of axioms from the given ontology, or the current one.
Removes a list of axioms from the given ontology, or the current one.
(remove-entity o entity)
Remove from the ontology an entity created and added by owl-class, defclass, object-property or defoproperty. Entity is the value returned by these functions.
This removes all the axioms that were added. So, for example, a form such as
(defclass a :subclass b :equivalent c)
adds three axioms -- it declares a, makes it a subclass of b, and equivalent of c.
Remove from the ontology an entity created and added by owl-class, defclass, object-property or defoproperty. Entity is the value returned by these functions. This removes all the axioms that were added. So, for example, a form such as (defclass a :subclass b :equivalent c) adds three axioms -- it declares a, makes it a subclass of b, and equivalent of c.
Hook called immediately after an ontology is removed from the owl-ontology-manager.
Hook called immediately after an ontology is removed from the owl-ontology-manager.
(remove-ontology-maybe ontologyid)
Removes the ontology with the given ID from the manager. This calls the relevant hooks, so is better than direct use of the OWL API.
Removes the ontology with the given ID from the manager. This calls the relevant hooks, so is better than direct use of the OWL API.
(run-intern-hook var)
Run intern-owl-entity hooks and return first argument.
Run intern-owl-entity hooks and return first argument.
(save-ontology o filename)
(save-ontology o filename format)
(save-ontology o filename format prepend)
Save the current 'ontology' in the file or `filename' if given. If no ontology is given, use the current-ontology
Save the current 'ontology' in the file or `filename' if given. If no ontology is given, use the current-ontology
Returns a list containing existential restrictions to each of the arguments, and universal relationship to the union of each of the arguments.
Returns a list containing existential restrictions to each of the arguments, and universal relationship to the union of each of the arguments.
(span comparitor & args)
Returns a numeric datatype restriction, identified by symbol. For example, (span < 10) returns a max exclusive restriction.
Returns a numeric datatype restriction, identified by symbol. For example, (span < 10) returns a max exclusive restriction.
(subclass? o name subclass)
Returns true if name has subclass as a subclass.
Returns true if name has subclass as a subclass.
(subclasses o class)
Return all subclasses of class.
Return all subclasses of class.
(subproperties o property)
Returns all subproperties of property.
Returns all subproperties of property.
(subproperty? o property subproperty)
Returns true if property is a subproperty of subproperty.
Returns true if property is a subproperty of subproperty.
(superclass? o name superclass)
Returns true if name is asserted to be a superclass.
Returns true if name is asserted to be a superclass.
(superclasses o class)
Return all superclasses of class. class is not returned unless it is explicitly stated to be a direct or indirect superclass of itself.
Return all superclasses of class. class is not returned unless it is explicitly stated to be a direct or indirect superclass of itself.
(superproperties o property)
Return all superproperties of a property.
Return all superproperties of a property.
(superproperty? o property superproperty)
Return true if superproperty is a superproperty of property.
Return true if superproperty is a superproperty of property.
(with-optional-class o n form)
Calls form as is, or adds n to it iff n is not nil. n is evaluated only once, so can have side effects.
Calls form as is, or adds n to it iff n is not nil. n is evaluated only once, so can have side effects.
(with-prefix prefix & body)
Adds a prefix to all defclass macros in scope. This is a convenience macro and is lexically scoped.
Adds a prefix to all defclass macros in scope. This is a convenience macro and is lexically scoped.
(with-probe-axioms & args)
Evaluate the body with a number of axioms. Then delete these axioms from the ontology.
This is mostly useful for test cases. Axioms can be added, consistency or inconsistency can be checked then removed, leaving the ontology effectively unchanged.
Evaluate the body with a number of axioms. Then delete these axioms from the ontology. This is mostly useful for test cases. Axioms can be added, consistency or inconsistency can be checked then removed, leaving the ontology effectively unchanged.
(with-probe-entities bindings & body)
(with-probe-entities ontology bindings & body)
Evaluate BODY with a number of entities defined. Then delete these entities from the ontology. BINDINGS are a vector with similar to let. The first argument should evaluate to the ontology, or the current ontology will be used. Statements inside bindings are evaluated with the current-ontology set to ONTOLOGY. Entities added to ONTOLOGY are removed from ONTOLOGY; so if they are added to a different ontology explicitly, they will remain there after the completion of this form.
Evaluate BODY with a number of entities defined. Then delete these entities from the ontology. BINDINGS are a vector with similar to let. The first argument should evaluate to the ontology, or the current ontology will be used. Statements inside bindings are evaluated with the current-ontology set to ONTOLOGY. Entities added to ONTOLOGY are removed from ONTOLOGY; so if they are added to a different ontology explicitly, they will remain there after the completion of this form.
(with-suffix suffix & body)
Adds a suffix to all defclass macros in scope. This is a convenience macro and is lexically scoped.
Adds a suffix to all defclass macros in scope. This is a convenience macro and is lexically scoped.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close