/**
     * @brief Compute justifications for the predefined assertion.
     *
     * NOTE THAT THIS WILL NOT CONTAIN TBOX-ASSERTIONS (i.e. subClassOf, ...)
     * @return a set of justifications for the assertion (basically a set of wrappers around sets of OWL-Axioms)
     */
@Override
    public Set< Justification > computeJustifications() {
        Set< Set< OWLAxiom > > justifications = null;
        try {
            justifications = explainAxiom( axiom_ );
        }
        catch ( OWLException e ) {
            throw new RuntimeException( e );
        }
        // We represent justifications as instances of a custom class outside of this function, which requires transitioning
        // This is done in order to hide usage of the OWLAPI in code that does not need to rely directly on it.
        Set< Justification > return_justifications = new TreeSet< Justification > (); // order is important for hitting set computation -> use TreeSet!
/* //TODO Use this if printing is not desired
        for ( Set< OWLAxiom > justification : justifications ) {
            // JAVA 8:
            // justification.removeIf( ( OWLAxiom a ) -> { return a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) } );
            //
            // JAVA < 8 (there is probably a better way even then):
            for ( Iterator< OWLAxiom > it = justification.iterator(); it.hasNext(); ) {
                OWLAxiom a = it.next();
                if ( a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) ) {
                    it.remove();
                }
            }
            return_justifications.add( new Justification( justification ) );
        }
*/
        for ( Set< OWLAxiom > justification : justifications ) {
            return_justifications.add( new Justification( justification ) );
        }
        //if ( SparqlUpdater.verbose_level > 0 ) {
            //Justification.print( return_justifications, axiom_ );
        //}
        // We only consider ABox axioms for deletion. Therefore, we remove TBox and RBox assertions.
        // TODO if printing is not desired, this loop can be combined with the one above and the method used here can be removed within the Justification class.
        for ( Justification justification : return_justifications ) {
            justification.removeTBoxAndRBoxAxioms();
        }
        return return_justifications;
    }
@Override
public Set< Justification > computeJustifications() {
Set< Set< OWLAxiom > > justifications = null;
try {
justifications = explainAxiom( axiom_ );
}
catch ( OWLException e ) {
throw new RuntimeException( e );
}
// We represent justifications as instances of a custom class outside of this function, which requires transitioning
// This is done in order to hide usage of the OWLAPI in code that does not need to rely directly on it.
Set< Justification > return_justifications = new TreeSet< Justification > (); // order is important for hitting set computation -> use TreeSet!
/* //TODO Use this if printing is not desired
for ( Set< OWLAxiom > justification : justifications ) {
// JAVA 8:
// justification.removeIf( ( OWLAxiom a ) -> { return a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) } );
//
// JAVA < 8 (there is probably a better way even then):
for ( Iterator< OWLAxiom > it = justification.iterator(); it.hasNext(); ) {
OWLAxiom a = it.next();
if ( a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) ) {
it.remove();
}
}
return_justifications.add( new Justification( justification ) );
}
*/
for ( Set< OWLAxiom > justification : justifications ) {
return_justifications.add( new Justification( justification ) );
}
//if ( SparqlUpdater.verbose_level > 0 ) {
//Justification.print( return_justifications, axiom_ );
//}
// We only consider ABox axioms for deletion. Therefore, we remove TBox and RBox assertions.
// TODO if printing is not desired, this loop can be combined with the one above and the method used here can be removed within the Justification class.
for ( Justification justification : return_justifications ) {
justification.removeTBoxAndRBoxAxioms();
}
return return_justifications;
}
@Override
public Set< Justification > computeJustifications() {
Set< Set< OWLAxiom > > justifications = null;
try {
justifications = explainAxiom( axiom_ );
}
catch ( OWLException e ) {
throw new RuntimeException( e );
}
// We represent justifications as instances of a custom class outside of this function, which requires transitioning
// This is done in order to hide usage of the OWLAPI in code that does not need to rely directly on it.
Set< Justification > return_justifications = new TreeSet< Justification > (); // order is important for hitting set computation -> use TreeSet!
/* //TODO Use this if printing is not desired
for ( Set< OWLAxiom > justification : justifications ) {
// JAVA 8:
// justification.removeIf( ( OWLAxiom a ) -> { return a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) } );
//
// JAVA < 8 (there is probably a better way even then):
for ( Iterator< OWLAxiom > it = justification.iterator(); it.hasNext(); ) {
OWLAxiom a = it.next();
if ( a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) ) {
it.remove();
}
}
return_justifications.add( new Justification( justification ) );
}
*/
for ( Set< OWLAxiom > justification : justifications ) {
return_justifications.add( new Justification( justification ) );
}
//if ( SparqlUpdater.verbose_level > 0 ) {
//Justification.print( return_justifications, axiom_ );
//}
// We only consider ABox axioms for deletion. Therefore, we remove TBox and RBox assertions.
// TODO if printing is not desired, this loop can be combined with the one above and the method used here can be removed within the Justification class.
for ( Justification justification : return_justifications ) {
justification.removeTBoxAndRBoxAxioms();
}
return return_justifications;
}
@Override
public Set< Justification > computeJustifications() {
Set< Set< OWLAxiom > > justifications = null;
try {
justifications = explainAxiom( axiom_ );
}
catch ( OWLException e ) {
throw new RuntimeException( e );
}
// We represent justifications as instances of a custom class outside of this function, which requires transitioning
// This is done in order to hide usage of the OWLAPI in code that does not need to rely directly on it.
Set< Justification > return_justifications = new TreeSet< Justification > (); // order is important for hitting set computation -> use TreeSet!
/* //TODO Use this if printing is not desired
for ( Set< OWLAxiom > justification : justifications ) {
// JAVA 8:
// justification.removeIf( ( OWLAxiom a ) -> { return a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) } );
//
// JAVA < 8 (there is probably a better way even then):
for ( Iterator< OWLAxiom > it = justification.iterator(); it.hasNext(); ) {
OWLAxiom a = it.next();
if ( a.isOfType( AxiomType.TBoxAndRBoxAxiomTypes ) ) {
it.remove();
}
}
return_justifications.add( new Justification( justification ) );
}
*/
for ( Set< OWLAxiom > justification : justifications ) {
return_justifications.add( new Justification( justification ) );
}
//if ( SparqlUpdater.verbose_level > 0 ) {
//Justification.print( return_justifications, axiom_ );
//}
// We only consider ABox axioms for deletion. Therefore, we remove TBox and RBox assertions.
// TODO if printing is not desired, this loop can be combined with the one above and the method used here can be removed within the Justification class.
for ( Justification justification : return_justifications ) {
justification.removeTBoxAndRBoxAxioms();
}
return return_justifications;
}