private <F, O> Set<OntologyAxiomPair> parseAnnotatedListItems(F s, AnnAxiom<F, O> itemParser, Set<OWLOntology> ontologies) { Set<OntologyAxiomPair> result = new HashSet<>(); String sep = COMMA.keyword(); while (COMMA.matches(sep)) { Set<OWLAnnotation> annotations = parseAnnotations(); O item = itemParser.parse.apply(s); OWLAxiom axiom = itemParser.createAxiom(s, item, annotations); for (OWLOntology ontology : ontologies) { result.add(new OntologyAxiomPair(ontology, axiom)); } sep = peekToken(); if (COMMA.matches(sep)) { consumeToken(); } } return result; }
private <F, O> Set<OntologyAxiomPair> parseAnnotatedListItems(F s, AnnAxiom<F, O> itemParser, Set<OWLOntology> ontologies) { Set<OntologyAxiomPair> result = new HashSet<>(); String sep = COMMA.keyword(); while (COMMA.matches(sep)) { Set<OWLAnnotation> annotations = parseAnnotations(); O item = itemParser.parse.apply(s); OWLAxiom axiom = itemParser.createAxiom(s, item, annotations); for (OWLOntology ontology : ontologies) { result.add(new OntologyAxiomPair(ontology, axiom)); } sep = peekToken(); if (COMMA.matches(sep)) { consumeToken(); } } return result; }
private <F, O> Set<OntologyAxiomPair> parseAnnotatedListItems(F s, AnnAxiom<F, O> itemParser, Set<OWLOntology> ontologies) { Set<OntologyAxiomPair> result = new HashSet<>(); String sep = COMMA.keyword(); while (COMMA.matches(sep)) { Set<OWLAnnotation> annotations = parseAnnotations(); O item = itemParser.parse.apply(s); OWLAxiom axiom = itemParser.createAxiom(s, item, annotations); for (OWLOntology ontology : ontologies) { result.add(new OntologyAxiomPair(ontology, axiom)); } sep = peekToken(); if (COMMA.matches(sep)) { consumeToken(); } } return result; }
private <F, O> Set<OntologyAxiomPair> parseAnnotatedListItems(F s, AnnAxiom<F, O> itemParser, Set<OWLOntology> ontologies) { Set<OntologyAxiomPair> result = new HashSet<>(); String sep = COMMA.keyword(); while (COMMA.matches(sep)) { Set<OWLAnnotation> annotations = parseAnnotations(); O item = itemParser.parse.apply(s); OWLAxiom axiom = itemParser.createAxiom(s, item, annotations); for (OWLOntology ontology : ontologies) { result.add(new OntologyAxiomPair(ontology, axiom)); } sep = peekToken(); if (COMMA.matches(sep)) { consumeToken(); } } return result; }