Package org.yaml.snakeyaml.events

Examples of org.yaml.snakeyaml.events.DocumentEndEvent


        return this;
    }

    @JRubyMethod
    public IRubyObject end_document(ThreadContext context, IRubyObject implicit) {
        DocumentEndEvent event = new DocumentEndEvent(NULL_MARK, NULL_MARK, implicit.isTrue());
        emit(context, event);
        return this;
    }
View Full Code Here


                            "start_document",
                            version,
                            tags,
                            runtime.newBoolean(dse.getExplicit()));
                } else if (event.is(ID.DocumentEnd)) {
                    DocumentEndEvent dee = (DocumentEndEvent)event;
                    invoke(
                            context,
                            handler,
                            "end_document",
                            runtime.newBoolean(dee.getExplicit()));
                } else if (event.is(ID.Alias)) {
                    AliasEvent ae = (AliasEvent)event;
                    IRubyObject alias = runtime.getNil();
                    if (ae.getAnchor() != null) {
                        alias = RubyString.newString(runtime, ae.getAnchor());
View Full Code Here

        return this;
    }

    @JRubyMethod
    public IRubyObject end_document(ThreadContext context, IRubyObject implicit) {
        DocumentEndEvent event = new DocumentEndEvent(NULL_MARK, NULL_MARK, !implicit.isTrue());
        emit(context, event);
        return this;
    }
View Full Code Here

            scanner.getToken(Token.ID.Directive);
        }
        scanner.getToken(Token.ID.DocumentStart);
        events.add(new DocumentStartEvent(null, null, true, Version.V1_1, null));
        parseNode();
        events.add(new DocumentEndEvent(null, null, true));
    }
View Full Code Here

                    implicit = true;
                }
                value = new MappingStartEvent((String) mapping.get("anchor"), tag, implicit, null,
                        null, false);
            } else if (className.equals("DocumentEndEvent")) {
                value = new DocumentEndEvent(null, null, false);
            } else if (className.equals("DocumentStartEvent")) {
                Map<String, String> tags = (Map<String, String>) mapping.get("tags");
                List<Integer> versionList = (List<Integer>) mapping.get("version");
                Version version = null;
                // TODO ???
View Full Code Here

        etalonEvents.add(new ScalarEvent(null, null, new ImplicitTuple(true, false), "string",
                dummyMark, dummyMark, (char) 0));
        etalonEvents.add(new ScalarEvent(null, null, new ImplicitTuple(true, false), "abcd",
                dummyMark, dummyMark, (char) 0));
        etalonEvents.add(new MappingEndEvent(dummyMark, dummyMark));
        etalonEvents.add(new DocumentEndEvent(dummyMark, dummyMark, false));
        etalonEvents.add(new StreamEndEvent(dummyMark, dummyMark));
        while (parser.checkEvent(null)) {
            Event event = parser.getEvent();
            if (etalonEvents.isEmpty()) {
                fail("unexpected event: " + event);
View Full Code Here

                Boolean.FALSE));
        etalonEvents.add(new ScalarEvent(null, null, new ImplicitTuple(true, false),
                "Boston Red Sox", dummyMark, dummyMark, (char) 0));
        etalonEvents.add(new SequenceEndEvent(dummyMark, dummyMark));
        etalonEvents.add(new MappingEndEvent(dummyMark, dummyMark));
        etalonEvents.add(new DocumentEndEvent(dummyMark, dummyMark, false));
        etalonEvents.add(new StreamEndEvent(dummyMark, dummyMark));
        while (parser.checkEvent(null)) {
            Event event = parser.getEvent();
            if (etalonEvents.isEmpty()) {
                fail("unexpected event: " + event);
View Full Code Here

        return this;
    }

    @JRubyMethod
    public IRubyObject end_document(ThreadContext context, IRubyObject implicit) {
        DocumentEndEvent event = new DocumentEndEvent(NULL_MARK, NULL_MARK, !implicit.isTrue());
        emit(context, event);
        return this;
    }
View Full Code Here

        anchorNode(node);
        if (explicitRoot != null) {
            node.setTag(explicitRoot);
        }
        serializeNode(node, null);
        this.emitter.emit(new DocumentEndEvent(null, null, this.explicitEnd));
        this.serializedNodes.clear();
        this.anchors.clear();
        this.lastAnchorId = 0;
    }
View Full Code Here

            if (scanner.checkToken(Token.ID.DocumentEnd)) {
                token = scanner.getToken();
                endMark = token.getEndMark();
                explicit = true;
            }
            Event event = new DocumentEndEvent(startMark, endMark, explicit);
            // Prepare the next state.
            state = new ParseDocumentStart();
            return event;
        }
View Full Code Here

TOP

Related Classes of org.yaml.snakeyaml.events.DocumentEndEvent

Copyright © 2018 www.massapicom. 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.