Examples of DocumentEndEvent


Examples of com.esotericsoftware.yamlbeans.parser.DocumentEndEvent

        started = true;
      }
      emitter.emit(new DocumentStartEvent(config.writeConfig.explicitFirstDocument, null, null));
      isRoot = true;
      writeValue(object, config.writeConfig.writeRootTags ? null : object.getClass(), null, null);
      emitter.emit(new DocumentEndEvent(config.writeConfig.explicitEndDocument));
    } catch (EmitterException ex) {
      throw new YamlException("Error writing YAML.", ex);
    } catch (IOException ex) {
      throw new YamlException("Error writing YAML.", ex);
    }
View Full Code Here

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

Examples of org.yaml.snakeyaml.events.DocumentEndEvent

                            "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

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

Examples of org.yaml.snakeyaml.events.DocumentEndEvent

            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

Examples of org.yaml.snakeyaml.events.DocumentEndEvent

                    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

Examples of org.yaml.snakeyaml.events.DocumentEndEvent

        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

Examples of org.yaml.snakeyaml.events.DocumentEndEvent

                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

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

Examples of org.yaml.snakeyaml.events.DocumentEndEvent

        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
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.