List of usage examples for java.util.stream Stream count
long count();
From source file:org.semanticweb.owlapi6.api.test.fileroundtrip.FileRoundTripSubClassOfUntypedOWLClassStrictTestCase.java
@Test public void testAxioms() throws OWLOntologyCreationException { config = config.setStrict(true);//w w w . j a v a2 s . c o m StreamDocumentSource documentSource = new StreamDocumentSource( getClass().getResourceAsStream('/' + fileName)); OWLOntology ont = m1.loadOntologyFromOntologyDocument(documentSource, config); assertEquals(0, ont.axioms(AxiomType.SUBCLASS_OF).count()); OWLDocumentFormat format = ont.getFormat(); assertTrue(format instanceof RDFXMLDocumentFormat); assertTrue(documentSource.getOntologyLoaderMetaData().isPresent()); Stream<Triple> triples = documentSource.getOntologyLoaderMetaData().get().getUnparsedTriples(); assertEquals(1, triples.count()); }