Examples of nextEvent()


Examples of com.collective2.signalEntry.adapter.IterableXMLEventReader.nextEvent()

       
        IterableXMLEventReader reader = getXMLEventReader();
        try {
            Deque<C2Element> stack = new ArrayDeque<C2Element>();
            while (reader.hasNext()) {
                XMLEvent event =  reader.nextEvent();
                if (event.isEndElement()) {
                    stack.pop();
                } else if (event.isStartElement()) {
                   
                    String name = event.asStartElement().getName().getLocalPart();
View Full Code Here

Examples of com.sun.jdi.event.EventIterator.nextEvent()

/* 216 */         EventSet events = null;
/*     */         try {
/* 218 */           events = HotSwapper.this.waitEvent();
/* 219 */           EventIterator iter = events.eventIterator();
/* 220 */           while (iter.hasNext()) {
/* 221 */             Event event = iter.nextEvent();
/* 222 */             if ((event instanceof MethodEntryEvent)) {
/* 223 */               HotSwapper.this.hotswap();
/* 224 */               break;
/*     */             }
/*     */           }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.datasource.bundle.BundleStreamSource.nextEvent()

          MultipleObjectsBundle parsingResult = parser.parse(inputStream);
          // normalize objects and transform labels
          source = new StreamFromBundle(parsingResult);
        }
        BundleMeta meta = null; // NullPointerException on invalid streams
        loop: for(Event e = source.nextEvent();; e = source.nextEvent()) {
          switch(e){
          case END_OF_STREAM:
            break loop;
          case META_CHANGED:
            meta = source.getMeta();
View Full Code Here

Examples of gov.nasa.worldwind.util.xml.XMLEventParserContext.nextEvent()

  
   public GfrOGCCapabilities parse(Object... args) throws XMLStreamException
    {
        XMLEventParserContext ctx = this.parserContext;

        for (XMLEvent event = ctx.nextEvent(); ctx.hasNext(); event = ctx.nextEvent())
        {
            if (event == null)
                continue;

            if (event.isStartElement() && this.isRootElementName(event.asStartElement().getName()))
View Full Code Here

Examples of javax.jcr.observation.EventIterator.nextEvent()

        when(propertyEvent.getType()).thenReturn(Event.PROPERTY_ADDED);
        when(propertyEvent.getPath()).thenReturn(resourcePath + "/" + SuperimposingResourceProvider.PROP_SUPERIMPOSE_SOURCE_PATH);

        EventIterator eventIterator = mock(EventIterator.class);
        when(eventIterator.hasNext()).thenReturn(true, true, false);
        when(eventIterator.nextEvent()).thenReturn(nodeEvent, propertyEvent);
        return eventIterator;
    }

    private EventIterator prepareNodeChangeEvent(Resource pResource) throws RepositoryException {
        String resourcePath = pResource.getPath();
View Full Code Here

Examples of javax.jcr.observation.EventIterator.nextEvent()

        when(propertyEvent.getType()).thenReturn(Event.PROPERTY_CHANGED);
        when(propertyEvent.getPath()).thenReturn(resourcePath + "/" + SuperimposingResourceProvider.PROP_SUPERIMPOSE_SOURCE_PATH);

        EventIterator eventIterator = mock(EventIterator.class);
        when(eventIterator.hasNext()).thenReturn(true, false);
        when(eventIterator.nextEvent()).thenReturn(propertyEvent);
        return eventIterator;
    }

    private EventIterator prepareNodeRemoveEvent(Resource pResource) throws RepositoryException {
        String resourcePath = pResource.getPath();
View Full Code Here

Examples of javax.jcr.observation.EventIterator.nextEvent()

        when(nodeEvent.getType()).thenReturn(Event.NODE_REMOVED);
        when(nodeEvent.getPath()).thenReturn(resourcePath);

        EventIterator eventIterator = mock(EventIterator.class);
        when(eventIterator.hasNext()).thenReturn(true, false);
        when(eventIterator.nextEvent()).thenReturn(nodeEvent);
        return eventIterator;
    }

    private EventIterator prepareNodeMoveEvent(Resource pResource, String pOldPath) throws RepositoryException {
        String resourcePath = pResource.getPath();
View Full Code Here

Examples of javax.jcr.observation.EventIterator.nextEvent()

        when(nodeCreateEvent.getType()).thenReturn(Event.NODE_ADDED);
        when(nodeCreateEvent.getPath()).thenReturn(resourcePath);

        EventIterator eventIterator = mock(EventIterator.class);
        when(eventIterator.hasNext()).thenReturn(true, true, false);
        when(eventIterator.nextEvent()).thenReturn(nodeRemoveEvent, nodeCreateEvent);
        return eventIterator;
    }

    @SuppressWarnings("unchecked")
    @Test
View Full Code Here

Examples of javax.jcr.observation.EventJournal.nextEvent()

        List<Event> events = new ArrayList<Event>();
        int batchSize = 1024;
        boolean distinctDates = true;
        long lastDate = Long.MIN_VALUE;
        while (journal.hasNext() && (batchSize > 0 || !distinctDates)) {
            Event e = factory.fromJCREvent(journal.nextEvent());
            if (filter.accept(e, false)) {
                distinctDates = lastDate != e.getDate();
                lastDate = e.getDate();
                events.add(e);
                batchSize--;
View Full Code Here

Examples of javax.xml.stream.XMLEventReader.nextEvent()

    StringWriter writer = new StringWriter();

    while ( eventReader.hasNext() )
    {
      XMLEvent event = eventReader.nextEvent();
      event.writeAsEncodedUnicode( writer );
    }

    writer.flush();
    String resultingXml = writer.toString();
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.