Overview:
- Lint Interface
- Acting Lint interface
- Lint Configuration Interface
- LintPattern Interface
- Report (LintReport & PatternReport) interfaces
- PatternBasedLint interface
Please check also the Javadoc available here
Lint Interface
This is the main component in the framework. When developing a lint one must implement the following methods:detected()
- In this method goes the actual code for verifying whether the situation the Lint instance has to detect occurs or not. Developers are supposed to return the an implementation of LintReport containing the result of the detection process.getLintConfiguration()
- Returns the particular LintConfiguration for this Lint
getDescription()
- This method should return a String containing a natural language description of the situation that the Lint detectsgetName()
- Retrieves the name of the Lint.
Top of the page
Acting Lint
This interface extends the Lint interface adding one method:executeActions(Collection<? extends
OWLOntology>)
whose implementation, once invoked and execued without exception, should guarantee that the problem the Lint check detected disappears for each of
the input
OWLOntology
instances.Lint Configuration Interface:
Lint configurations allow for getting properties a Lint can make use of during its life-cycle.The core methods are:
getPropertyKeys()
getPropertyValue(String)
Clients can listen to changes to a Lint's configuration. They register or de-register using the
methods
addLintConfigurationChangeListener(LintConfigurationChangeListener)
getPropertyValue(String)
removeAllListeners()
removeLintConfigurationChangeListener(LintConfigurationChangeListener)
LintConfiguration
instances which
cannot be configured or that are wrappers around
java.util.Properties
. They are, respecitvelyuk.ac.manchester.cs.owl.lint.commons.NonConfigurableLintConfiguration
uk.ac.manchester.cs.owl.lint.commons.SimplePropertyBasedLintConfiguration
Top of the page
Lint Pattern Interface:
A LintPattern is an interface that stands for a generic pattern matched across a set of OWLOntology instances.matches()
- The implementation of this method that should an instance implementing thePatternReport interface containing the Set of OWLObject which are matching this particular pattern.
Report interfaces:
Both LintReport and PatternReport are interfaces containing the results of matching respectively a Lint or a LintPattern implementations. For the both of them a developer needs to implement the following methods:getAffectedOntologies()
- It returns the ontologies affected (in which there are OWLObject instances successfully matched) by the Lint (LintPattern).getAffectedOWLObjects()
- Given an instance of OWLOntology this method should return the Set of OWLObject instances affected by (successfully matching) the Lint (LintPattern) that generated this implementation of this Report.isAffected(OWLOntology)
should return true if the input OWLOntology instance is affected by (contains at least an OWLObject instance successfully matching) the Lint (LintPattern) that generated this reportgetLint()
(getLintPattern()
) - Should return the Lint (LintPattern) that generated this Report
PatternBasedLint interface:
This interface abstracts over the kind of
Lint implemented as a
chain of LintPattern instances.
The suggested semantics is that a PatternBasedLint is detected when all
its LintPatterns successfully
match a common subset of OWLObject instances. In addition to those
already mentioned in the section describing the Lint interface, a PatternBasedLint
implementation should implements the getPatterns()
method, which returns the Set of
LintPattern instances this Lint is built upon.