Tiny-ME: the Tiny Matchmaking Engine - API version 1.0.0

Tiny-ME - The Tiny Matchmaking Engine is a multiplatform, lightweight OWL reasoner and matchmaker for the Semantic Web of Everything, developed by SisInf Lab at the Polytechnic University of Bari.

These docs refer to the Java API of the system. For further information and downloads, please refer to the Tiny-ME homepage.

Example

Here is a brief example to get you started. For further info, please check the API docs.


// You can either use paths, or OWLOntology objects parsed via the OWL API.
String resourceOntologyPath = "/path/to/res_onto.owl";
String requestOntologyPath = "/path/to/req_onto.owl";

Reasoner reasoner = ReasonerFactory.newReasoner(resourceOntologyPath)
                                   .loadIndividuals(requestOntologyPath,
                                                    IndividualType.REQUEST);

// Either work with IRIs ...
IRI resource = IRI.create("#resource");
IRI request = IRI.create("#request");

if (reasoner.isCompatible(resource, request)) {
    Abduction abduction = reasoner.abduction(resource, request);
    System.out.println(abduction);
} else {
    Contraction contraction = reasoner.contraction(resource, request);
    System.out.println(contraction);
}

// ... or with descriptions ...
// EntityDescription<T> is a subclass of SemanticDescription, which means
// its instances can be used with any API that accepts SemanticDescription objects.
EntityDescription<OWLNamedIndividual> reqDesc = reasoner.getIndividualDescription(request);

System.out.println(reqDesc);
System.out.println(reasoner.covering(reqDesc));

// ... or with streams of descriptions.
// This example shows how to iterate over all the satisfiable resources,
// sorting them by IRI and printing their description.
reasoner.getIndividuals(IndividualType.RESOURCE)
        .filter(reasoner::isSatisfiable)
        .sorted()
        .forEach(System.out::println);