/** * 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); }
/** * 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); }
/** * 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); }
/** * Ensure that the stream contains a single document and construct it * * @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) { if (Object.class != type) { node.setTag(new Tag(type)); } else if (rootTag != null) { node.setTag(rootTag); } return constructDocument(node); } return null; }
/** * Ensure that the stream contains a single document and construct it * * @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) { if (Object.class != type) { node.setTag(new Tag(type)); } else if (rootTag != null) { node.setTag(rootTag); } return constructDocument(node); } return 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; }