Build ontologies in OWL.
Build ontologies in OWL.
(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-characteristics o property & characteristic)
Add a list of characteristics to the property.
Add a list of characteristics to the property.
(add-data-characteristics o property characteristic)
(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)
(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 o property domain)
(add-data-domain o property & domain)
Adds a domain to a data property.
Adds a domain to a data property.
(add-data-equivalent o property equivalent)
(add-data-equivalent o property & equivalent)
Adds a equivalent data properties axiom.
Adds a equivalent data properties axiom.
(add-data-range o property range)
(add-data-range o property & range)
Adds a range to a data property.
Adds a range to a data property.
(add-data-subproperty o property sub)
(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)
(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)
(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 o name disjoint)
(add-disjoint o name & disjoint)
Adds a disjoint axiom to the ontology.
Adds a disjoint axiom to the ontology.
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)
(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 o name equivalent)
(add-equivalent o name & equivalent)
Adds an equivalent axiom to the ontology.
Adds an equivalent axiom to the ontology.
Adds a equivalent data properties axiom.
Adds a equivalent data properties axiom.
(add-fact o individual fact)
(add-fact o individual & fact)
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)
(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-range o property range)
(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 o name subclass)
(add-subclass o 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)
(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-superclass o name superclass)
(add-superclass o 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)
(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 o individual clazz)
(add-type o individual & clazz)
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 annotation-property literal)
(annotation 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 o 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 & 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 superclass & subclasses)
(as-disjoint-subclasses o superclass & subclasses)
Declare all subclasses as disjoint
Declare all subclasses as disjoint
(as-equivalent & entities)
(as-equivalent o & entities)
Declare the properties or classes as disjoint.
Declare the properties or classes as disjoint.
(as-inverse p1 p2)
(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 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.
(data-and & types)
Returns the intersection of two data ranges.
Returns the intersection of two data ranges.
(data-at-least number property)
Returns a data min cardinality restriction.
Returns a data min cardinality restriction.
(data-at-most number property)
Returns a data max cardinality restriction.
Returns a data max cardinality restriction.
Returns a data exact cardinality restriction.
Returns a data exact cardinality restriction.
(data-get-fact property from to annotations)
Returns a data fact.
Returns a data fact.
(data-get-fact-not property from to annotations)
Returns a data negative fact.
Returns a data negative fact.
(data-has-value property literal)
Returns a data has value restriction.
Returns a data has value restriction.
(data-not type)
Returns the complement of two data ranges.
Returns the complement of two data ranges.
(data-oneof & literals)
Returns a data one of restriction.
Returns a data one of restriction.
Returns a data all values from restriction.
Returns a data all values from restriction.
(data-or & types)
Returns the union of two data ranges.
Returns the union of two data ranges.
(data-some property data-range)
(data-some property & data-range)
Returns a data some values from restriction.
Returns a data some values from restriction.
(datatype o name & frames)
Defines a new datatype.
Defines a new datatype.
(datatype-explicit name frames)
(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 name frames)
(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 & frames)
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
(defclass entity & frames)
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 & frames)
Defines a new datatype
Defines a new datatype
(defdproperty entity & frames)
Defines a new datatype property
Defines a new datatype property
(defentity name docstring entity-function)
(defentity name docstring entity-function ontology-keyword)
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 & frames)
Declare a new individual
Declare a new individual
(defnb & body)
Defines a new function that broadcasts the first and consecutive arguments.
Defines a new function that broadcasts the first and consecutive arguments.
(defnb2 & body)
Define a new function that broadcasts over first, second and consecutive arguments.
Define a new function that broadcasts over first, second and consecutive arguments.
(defno & body)
Define a new function, that is always called with an ontology as the first argument. If the ontology is not supplied the default ontology will be used instead.
Define a new function, that is always called with an ontology as the first argument. If the ontology is not supplied the default ontology will be used instead.
(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 & frames)
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 name)
(direct-instances o name)
Return all direct instances of NAME class.
Return all direct instances of NAME class.
(direct-subclasses name)
(direct-subclasses o name)
Returns the direct subclasses of name.
Returns the direct subclasses of name.
(direct-subproperties property)
(direct-subproperties o property)
Returns all direct subproperties of property.
Returns all direct subproperties of property.
(direct-superclasses name)
(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 property)
(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-properties o properties)
Make all the properties in PROPERTIES disjoint.
Make all the properties in PROPERTIES disjoint.
(disjoint? a b)
(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-properties o properties)
Adds properties as equivalent to the ontology.
Adds properties as equivalent to the ontology.
(equivalent? a b)
(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 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 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.
(fontology f)
Return a function that always calls f with an ontology as the first argument.
Return a function that always calls f with an ontology as the first argument.
(frameify explicit-f frame-keys)
(frameify explicit-f frame-keys hashify)
Return a framified function.
A frameified function is one that accepts keywords which take any number of arguments. These values are converted into a map.
EXPLICIT-F is the function that will be called. It should accept arguments of form (ontology name map) where MAP is generated from the arguments to the framified function.
FRAME-KEYS are the keywords which are valid for this function. Other values will raise an exception.
HASHIFY is the function used to convert between the flat list of arguments and the map. By default, this will split at every keyword.
The function returned has 'f-ontology' functionality; that is, if no ontology argument is supplied by the user, it will be provided elsewhere.
Return a framified function. A frameified function is one that accepts keywords which take any number of arguments. These values are converted into a map. EXPLICIT-F is the function that will be called. It should accept arguments of form (ontology name map) where MAP is generated from the arguments to the framified function. FRAME-KEYS are the keywords which are valid for this function. Other values will raise an exception. HASHIFY is the function used to convert between the flat list of arguments and the map. By default, this will split at every keyword. The function returned has 'f-ontology' functionality; that is, if no ontology argument is supplied by the user, it will be provided elsewhere.
(gci class subclass)
(gci o class subclass)
Adds one or more subclasses to name in ontology.
Adds one or more subclasses to name in ontology.
(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-type 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 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-explicit 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 property)
Creates an object inverse of expression.
Creates an object inverse of expression.
(inverse? p1 p2)
(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 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 & classes)
Returns an OWL intersection of restriction.
Returns an OWL intersection of restriction.
(object-at-least cardinality property)
(object-at-least cardinality property class)
Returns an OWL at-least cardinality restriction.
Returns an OWL at-least cardinality restriction.
(object-at-most cardinality property)
(object-at-most cardinality property class)
Returns an OWL at-most cardinality restriction.
Returns an OWL at-most cardinality restriction.
(object-exactly cardinality property)
(object-exactly 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 property individual)
(object-has-value property & individual)
Adds an OWL has-value restriction.
Adds an OWL has-value restriction.
(object-not & class)
Returns an OWL complement of restriction.
Returns an OWL complement of restriction.
(object-oneof & individuals)
Returns an OWL one of property restriction.
Returns an OWL one of property restriction.
(object-only property class)
(object-only property & class)
Returns an OWL all values from restriction.
Returns an OWL all values from restriction.
(object-or & 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 class)
(object-some property & class)
Returns an OWL some values from restriction.
Returns an OWL some values from restriction.
(object-some-only 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-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 entity)
(owl-not 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 filename)
(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? name subclass)
(subclass? o name subclass)
Returns true if name has subclass as a subclass.
Returns true if name has subclass as a subclass.
(subclasses class)
(subclasses o class)
Return all subclasses of class.
Return all subclasses of class.
(subproperties property)
(subproperties o property)
Returns all subproperties of property.
Returns all subproperties of property.
(subproperty? property subproperty)
(subproperty? o property subproperty)
Returns true if property is a subproperty of subproperty.
Returns true if property is a subproperty of subproperty.
(superclass? name superclass)
(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 class)
(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 property)
(superproperties o property)
Return all superproperties of a property.
Return all superproperties of a property.
(superproperty? property superproperty)
(superproperty? o property superproperty)
Return true if superproperty is a superproperty of property.
Return true if superproperty is a superproperty of property.
Returns a version info annotation.
Returns a version info annotation.
(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