Interface Ontology
- All Superinterfaces:
ImmutableRuleSet, Iterable<Rule>, RuleSet
- All Known Implementing Classes:
DefaultOntology
The Ontology interface is a way to manage set of
rules,
constraints and predicates (i.e.
vocabulary).- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a rule to this set.booleanaddAll(CloseableIterator<Rule> ruleIterator) Adds all rules provided by the specified closeable iterator.booleanAdds all rules provided by the specified iterator.booleanReturns whether the specified rule is present in this set.getNegativeConstraint(String name) Retrieves a negative constraint by its name.Returns the names of the negative constraints stored in this ontology.Retrieves a rule by its name.Returns the names of the rules stored in this ontology.Returns the vocabulary used by this ontology.iterator()booleanRemoves a rule from this set.booleanremoveAll(CloseableIterator<Rule> ruleIterator) Removes all rules provided by the specified closeable iterator.booleanRemoves all rules provided by the specified iterator.intsize()Returns the number of rules contained in this set.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
getRuleNames
-
getRule
-
getNegativeConstraintNames
-
getNegativeConstraint
Retrieves a negative constraint by its name.- Parameters:
name- the negative constraint name- Returns:
- the matching negative constraint, or
nullif none exists
-
add
-
addAll
-
addAll
Description copied from interface:RuleSetAdds all rules provided by the specified closeable iterator.- Specified by:
addAllin interfaceRuleSet- Parameters:
ruleIterator- the rules to add- Returns:
- true if this set changed as a result of the call
- Throws:
RuleSetException- if the iteration fails
-
remove
-
removeAll
-
removeAll
Description copied from interface:RuleSetRemoves all rules provided by the specified closeable iterator.- Specified by:
removeAllin interfaceRuleSet- Parameters:
ruleIterator- the rules to remove- Returns:
- true if this set changed as a result of the call
- Throws:
RuleSetException- if the iteration fails
-
contains
Description copied from interface:ImmutableRuleSetReturns whether the specified rule is present in this set.- Specified by:
containsin interfaceImmutableRuleSet- Specified by:
containsin interfaceRuleSet- Parameters:
rule- the rule to search for- Returns:
- true if the rule is present
-
size
int size()Description copied from interface:ImmutableRuleSetReturns the number of rules contained in this set.- Specified by:
sizein interfaceImmutableRuleSet- Specified by:
sizein interfaceRuleSet- Returns:
- the number of rules contained in this set.
-
iterator
-
getVocabulary
-