RelatedObjectsHelper { public static Set<OWLAxiom> filterCompleteAxioms( Set<OWLAxiom> inputAxioms, Set<OWLObject> objects, Set<Class<? extends OWLAxiom>> axiomTypes, boolean namedOnly) { axiomTypes = setDefaultAxiomType(axiomTypes); if (namedOnly) { return getCompleteAxiomsNamedOnly(inputAxioms, objects, axiomTypes); } else { return getCompleteAxiomsIncludeAnonymous(inputAxioms, objects, axiomTypes); } }  static Set<OWLAxiom> getAnnotationAxioms(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLAxiom> filterAxioms(
      Set<OWLAxiom> inputAxioms,
      Set<OWLObject> objects,
      List<String> axiomSelectors,
      List<String> baseNamespaces,
      boolean partial,
      boolean namedOnly); static Set<OWLAxiom> filterAxiomsByAxiomType(
      Set<OWLAxiom> axioms,
      Set<OWLObject> objects,
      Set<Class<? extends OWLAxiom>> axiomTypes,
      boolean partial,
      boolean namedOnly); static Set<OWLAxiom> filterCompleteAxioms(
      Set<OWLAxiom> inputAxioms,
      Set<OWLObject> objects,
      Set<Class<? extends OWLAxiom>> axiomTypes,
      boolean namedOnly); static Set<OWLAxiom> filterExternalAxioms(
      Set<OWLAxiom> axioms, List<String> baseNamespaces); static Set<OWLAxiom> filterInternalAxioms(
      Set<OWLAxiom> axioms, List<String> baseNamespaces); static Set<OWLAxiom> filterPartialAxioms(
      Set<OWLAxiom> inputAxioms,
      Set<OWLObject> objects,
      Set<Class<? extends OWLAxiom>> axiomTypes,
      boolean namedOnly); static Set<OWLAxiom> filterTautologicalAxioms(Set<OWLAxiom> axioms, boolean structural); @Deprecated static Set<OWLAxiom> getAxioms(
      OWLOntology ontology,
      Set<OWLObject> objects,
      Set<Class<? extends OWLAxiom>> axiomTypes,
      boolean partial,
      boolean signature); static Set<Class<? extends OWLAxiom>> getAxiomValues(String axiomSelector); static Set<OWLAxiom> getCompleteAxioms(
      OWLOntology ontology, Set<OWLObject> objects, Set<Class<? extends OWLAxiom>> axiomTypes); static Set<OWLAxiom> getCompleteAxioms(
      OWLOntology ontology,
      Set<OWLObject> objects,
      Set<Class<? extends OWLAxiom>> axiomTypes,
      boolean namedOnly); static Set<OWLAxiom> getPartialAxioms(
      OWLOntology ontology, Set<OWLObject> objects, Set<Class<? extends OWLAxiom>> axiomTypes); static Set<OWLAxiom> getPartialAxioms(
      OWLOntology ontology,
      Set<OWLObject> objects,
      Set<Class<? extends OWLAxiom>> axiomTypes,
      boolean namedOnly); static Set<OWLObject> selectGroups(
      OWLOntology ontology,
      IOHelper ioHelper,
      Set<OWLObject> objects,
      List<List<String>> selectorGroups); static Set<OWLObject> select(
      OWLOntology ontology, IOHelper ioHelper, Set<OWLObject> objects, List<String> selectors); static Set<OWLObject> select(
      OWLOntology ontology, IOHelper ioHelper, Set<OWLObject> objects, String selector); static Set<OWLObject> selectAncestors(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectAnnotationProperties(Set<OWLObject> objects); static Set<OWLObject> selectAnonymous(Set<OWLObject> objects); static Set<OWLObject> selectChildren(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectClasses(Set<OWLObject> objects); static Set<OWLObject> selectComplement(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectCURIE(
      IOHelper ioHelper, Set<OWLObject> objects, String selector); static Set<OWLObject> selectDataProperties(Set<OWLObject> objects); static Set<OWLObject> selectDescendants(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectDomains(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectEquivalents(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectIndividuals(Set<OWLObject> objects); static Set<OWLObject> selectInstances(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectIRI(Set<OWLObject> objects, String selector); static Set<OWLObject> selectNamed(Set<OWLObject> objects); static Set<OWLObject> selectObjectProperties(Set<OWLObject> objects); static Set<OWLObject> selectParents(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectPattern(
      OWLOntology ontology, IOHelper ioHelper, Set<OWLObject> objects, String annotationPattern); static Set<OWLObject> selectProperties(Set<OWLObject> objects); static Set<OWLObject> selectRanges(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLObject> selectTypes(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLAxiom> spanGaps(OWLOntology ontology, Set<OWLObject> objects); static Set<OWLAxiom> spanGaps(
      OWLOntology ontology, Set<OWLObject> objects, boolean excludeAnonymous);  }
@Test @SuppressWarnings("unchecked") public void testFilterCompleteAxioms() throws IOException { IOHelper ioHelper = new IOHelper(); String base = "https: Set<OWLObject> objects; Set<Class<? extends OWLAxiom>> axiomTypes; Set<OWLAxiom> axioms; OWLOntology ontology = loadOntology("/simple.owl"); objects = new HashSet<>(); objects.add(df.getOWLClass(IRI.create(base + "test1"))); objects.add(df.getOWLClass(IRI.create(base + "test2"))); axiomTypes = Sets.newHashSet(OWLSubClassOfAxiom.class); axioms = RelatedObjectsHelper.filterCompleteAxioms(ontology.getAxioms(), objects, axiomTypes, false); assertEquals(1, axioms.size()); objects = new HashSet<>(); objects.add(df.getOWLClass(IRI.create(base + "test1"))); objects.add(df.getOWLAnnotationProperty(ioHelper.createIRI("rdfs:label"))); axiomTypes = Sets.newHashSet(OWLAnnotationAssertionAxiom.class); axioms = RelatedObjectsHelper.filterCompleteAxioms(ontology.getAxioms(), objects, axiomTypes, false); assertEquals(2, axioms.size()); }