Examples of nextEvent()


Examples of opennlp.maxent.EventStream.nextEvent()

    }
   
    public static void main(String[] args) {
      EventStream es =  new SDEventStream(new PlainTextByLineDataStream(new InputStreamReader(System.in)));
      while(es.hasNext()) {
        System.out.println(es.nextEvent());
      }
    }
}
View Full Code Here

Examples of org.apache.cocoon.stax.stress.src.EmitElementTransformer.nextEvent()

            }
        });

        // "parent" start-tag
        assertTrue(transformer.hasNext());
        XMLEvent event = transformer.nextEvent();
        assertTrue(event.isStartElement());
        assertEquals(event.asStartElement().getName().getLocalPart(), "parent");

        // "child" start-tag
        assertTrue(transformer.hasNext());
View Full Code Here

Examples of org.apache.commons.configuration2.builder.BuilderEventListenerImpl.nextEvent()

        switchToConfig(1);
        builder.addEventListener(ConfigurationBuilderEvent.RESET, listener);
        XMLConfiguration configuration = builder.getConfiguration();
        managedBuilders.iterator().next().resetResult();
        ConfigurationBuilderEvent event =
                listener.nextEvent(ConfigurationBuilderEvent.RESET);
        assertSame("Wrong event source", builder, event.getSource());
        assertNotSame("Configuration not reset", configuration,
                builder.getConfiguration());
    }
View Full Code Here

Examples of org.apache.xml.security.stax.impl.XMLSecurityEventReader.nextEvent()

            xmlInputFactory.createXMLEventReader(this.getClass().getClassLoader().getResourceAsStream(
                "org/apache/xml/security/c14n/inExcl/plain-soap-1.1.xml"));
        while (xmlEventReader.hasNext()) {
            Assert.assertEquals(xmlEventReader.hasNext(), xmlSecurityEventReader.hasNext());
            XMLEvent stdXmlEvent = xmlEventReader.nextEvent();
            XMLEvent secXmlEvent = xmlSecurityEventReader.nextEvent();
            Assert.assertEquals(stdXmlEvent.getEventType(), secXmlEvent.getEventType());

            XMLEvent stdPeekedXMLEvent = xmlEventReader.peek();
            XMLEvent secPeekedXMLEvent = xmlSecurityEventReader.peek();
            if (stdPeekedXMLEvent == null) {
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.DSCParser.nextEvent()

            }
        });

        //Get PostScript language level (may be missing)
        while (true) {
            DSCEvent event = parser.nextEvent();
            if (event == null) {
                reportInvalidDSC();
            }
            if (DSCTools.headerCommentsEndHere(event)) {
                //Set number of pages
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.DSCParser.nextEvent()

            }
        }
       
        //Write the rest
        while (parser.hasNext()) {
            DSCEvent event = parser.nextEvent();
            event.generate(gen);
        }
    }

    private static void reportInvalidDSC() throws DSCException {
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.DSCParser.nextEvent()

            }
        }

        //Write the rest
        while (parser.hasNext()) {
            DSCEvent event = parser.nextEvent();
            event.generate(gen);
        }
    }

}
View Full Code Here

Examples of org.codehaus.stax2.XMLEventReader2.nextEvent()

 
        // Need to disable coalescing though for test to work:
        XMLEventReader2 er = getReader(XML, false);
        // Need to set Base URI; can do it for factory or instance
        er.setProperty(WstxInputProperties.P_BASE_URL, new URL(URI));
        assertTrue(er.nextEvent().isStartDocument());
        XMLEvent evt = er.nextEvent(); // DTD
        assertTokenType(DTD, evt.getEventType());

        DTD dtd = (DTD) evt;
        List<?> nots = dtd.getNotations();
View Full Code Here

Examples of org.codehaus.stax2.XMLEventReader2.nextEvent()

        // Need to disable coalescing though for test to work:
        XMLEventReader2 er = getReader(XML, false);
        // Need to set Base URI; can do it for factory or instance
        er.setProperty(WstxInputProperties.P_BASE_URL, new URL(URI));
        assertTrue(er.nextEvent().isStartDocument());
        XMLEvent evt = er.nextEvent(); // DTD
        assertTokenType(DTD, evt.getEventType());

        DTD dtd = (DTD) evt;
        List<?> nots = dtd.getNotations();
        assertEquals(1, nots.size());
View Full Code Here

Examples of org.cyberneko.pull.XMLPullParser.nextEvent()

        // pull-parse the document until we reach the document element and put the collected information
        // into the sourceInfo object
        try
        {
            XMLEvent event;
            while ((event = parser.nextEvent()) != null)
            {
                if (event.type == XMLEvent.DOCTYPE_DECL)
                {
                    DoctypeDeclEvent doctypeDeclEvent = (DoctypeDeclEvent)event;
                    sourceInfo.setPublicId(doctypeDeclEvent.pubid);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.