public Node(Tag tag, Mark startMark, Mark endMark) { setTag(tag); this.startMark = startMark; this.endMark = endMark; this.type = Object.class; this.twoStepsConstruction = false; this.resolved = true; this.useClassConstructor = null; }
/** * Ensure that the stream contains a single document and construct it * * @param type the class of the instance being created * @return constructed instance * @throws ComposerException in case there are more documents in the stream */ public Object getSingleData(Class<?> type) { // Ensure that the stream contains a single document and construct it Node node = composer.getSingleNode(); if (node != null && !Tag.NULL.equals(node.getTag())) { if (Object.class != type) { node.setTag(new Tag(type)); } else if (rootTag != null) { node.setTag(rootTag); } return constructDocument(node); } return null; }
/** * Construct and return the next document * * @return constructed instance */ public Object getData() { // Construct and return the next document. composer.checkNode(); Node node = composer.getNode(); if (rootTag != null) { node.setTag(rootTag); } return constructDocument(node); }
public void serialize(Node node) throws IOException { if (closed == null) { throw new SerializerException("serializer is not opened"); } else if (closed) { throw new SerializerException("serializer is closed"); } this.emitter.emit(new DocumentStartEvent(null, null, this.explicitStart, this.useVersion, useTags)); 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(); }
Node childValueNode = valueNode.getValueNode(); if (keyNode instanceof ScalarNode && "configuration".equals(((ScalarNode) keyNode).getValue())) { childValueNode.setTag(XPP3DOM_TAG);
public Node(Tag tag, Mark startMark, Mark endMark) { setTag(tag); this.startMark = startMark; this.endMark = endMark; this.type = Object.class; this.twoStepsConstruction = false; this.resolved = true; this.useClassConstructor = null; }
public Node(Tag tag, Mark startMark, Mark endMark) { setTag(tag); this.startMark = startMark; this.endMark = endMark; this.type = Object.class; this.twoStepsConstruction = false; this.resolved = true; this.useClassConstructor = null; }
public Node(Tag tag, Mark startMark, Mark endMark) { setTag(tag); this.startMark = startMark; this.endMark = endMark; this.type = Object.class; this.twoStepsConstruction = false; this.resolved = true; this.useClassConstructor = null; }
@Override protected Object constructObject(Node node) { Tag tag = node.getTag(); if (!SUPPORTED_TAGS.contains(tag)) { node.setTag(Tag.STR); } return super.constructObject(node); }
/** * Construct and return the next document * * @return constructed instance */ public Object getData() { // Construct and return the next document. composer.checkNode(); Node node = composer.getNode(); if (rootTag != null) { node.setTag(rootTag); } return constructDocument(node); }
/** * Construct and return the next document * * @return constructed instance */ public Object getData() { // Construct and return the next document. composer.checkNode(); Node node = composer.getNode(); if (rootTag != null) { node.setTag(rootTag); } return constructDocument(node); }
NodeTuple tagInclude(NodeTuple tuple) { if (Tag.NULL.equals(tuple.getValueNode().getTag())) { return tuple; } if (templateInclude != null) { tuple.getValueNode().setTag(templateInclude); } return tuple; } }
NodeTuple tagInclude(NodeTuple tuple) { if (Tag.NULL.equals(tuple.getValueNode().getTag())) { return tuple; } if (templateInclude != null) { tuple.getValueNode().setTag(templateInclude); } return tuple; } }
@Override protected void constructMapping2ndStep(MappingNode node, Map<Object, Object> mapping) { List<NodeTuple> nodeValue = node.getValue(); for (NodeTuple tuple : nodeValue) { if (Tag.INT.equals(tuple.getKeyNode().getTag())) { tuple.getKeyNode().setTag(Tag.STR); } } super.constructMapping2ndStep(node, mapping); }