public boolean isMissingNode() { return delegate.isMissingNode(); }
public boolean hasNode(String key) { JsonNode result = node.path(key); return result.isMissingNode() == false; }
private Boolean isNull(final JsonNode node) { if (node == null || node.isMissingNode()) { // not exclude if node.isNull, cos that's the point of this. return null; } return node.isNull(); }
private Boolean isNull(final JsonNode node) { if (node == null || node.isMissingNode()) { // not exclude if node.isNull, cos that's the point of this. return null; } return node.isNull(); }
boolean checkRequiredNonEmptyStringNode(JsonNode root, String fieldName) { JsonNode target = root.path(fieldName); return !target.isMissingNode() && target.isTextual() && !target.getTextValue().trim().isEmpty(); }
public boolean isLazyLoad() { JsonNode target = descriptorNode.path(ATT_LAZYLOAD); return !target.isMissingNode() ? target.getBooleanValue() : true; }
boolean checkOptionalNonEmptyStringNode(JsonNode root, String fieldName) { JsonNode target = root.path(fieldName); return !target.isMissingNode() ? target.isTextual() && !target.getTextValue().trim().isEmpty() : true; }
boolean checkOptionalObjectNode(JsonNode root, String fieldName) { JsonNode target = root.path(fieldName); return !target.isMissingNode() ? target.isObject() : true; }
boolean checkOptionalBooleanNode(JsonNode root, String fieldName) { JsonNode target = root.path(fieldName); return !target.isMissingNode() ? target.isBoolean() : true; }
public String getResourcePath() { JsonNode target = descriptorNode.path(ATT_RESOURCEPATH); return !target.isMissingNode() ? target.getTextValue() : null; }
private JsonRepresentation getNull(final String path, final JsonNode node) { if (node == null || node.isMissingNode()) { // exclude if node.isNull, cos that's the point of this. return null; } checkValue(path, node, "the null value"); if (!node.isNull()) { throw new IllegalArgumentException(formatExMsg(path, "is not the null value")); } return new JsonRepresentation(node); }
private JsonRepresentation getNull(final String path, final JsonNode node) { if (node == null || node.isMissingNode()) { // exclude if node.isNull, cos that's the point of this. return null; } checkValue(path, node, "the null value"); if (!node.isNull()) { throw new IllegalArgumentException(formatExMsg(path, "is not the null value")); } return new JsonRepresentation(node); }
private void convertLongitude(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation"); final JsonNode current = node.path("Longitude"); if (!current.isMissingNode() && !current.isNull()) { final double value = Double.parseDouble(current.asText()); node.put("Longitude", value); } if (current.isNull()) { node.remove("Longitude"); } }
private void convertLongitude(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation"); final JsonNode current = node.path("Longitude"); if (!current.isMissingNode() && !current.isNull()) { final double value = Double.parseDouble(current.asText()); node.put("Longitude", value); } if (current.isNull()) { node.remove("Longitude"); } }
private void convertLatitude(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation"); final JsonNode current = node.path("Latitude"); if (!current.isMissingNode() && !current.isNull()) { final double value = Double.parseDouble(current.asText()); node.put("Latitude", value); } if (current.isNull()) { node.remove("Latitude"); } }
private void convertLatitude(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation"); final JsonNode current = node.path("Latitude"); if (!current.isMissingNode() && !current.isNull()) { final double value = Double.parseDouble(current.asText()); node.put("Latitude", value); } if (current.isNull()) { node.remove("Latitude"); } }
private void convertDeviceOwnerWebsite(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("DeviceOwner"); final JsonNode current = node.path("Website"); if (!current.isMissingNode() && !current.isNull()) { node.put("Website", this.createValueDatatype("uri", current.asText())); } if (current.isNull()) { node.remove("Website"); } }
private void convertDeviceControllerWebsite(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("DeviceController"); final JsonNode current = node.path("Website"); if (!current.isMissingNode() && !current.isNull()) { node.put("Website", this.createValueDatatype("uri", current.asText())); } if (current.isNull()) { node.remove("Website"); } }
private void convertDeviceControllerWebsite(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("DeviceController"); final JsonNode current = node.path("Website"); if (!current.isMissingNode() && !current.isNull()) { node.put("Website", this.createValueDatatype("uri", current.asText())); } if (current.isNull()) { node.remove("Website"); } }
private void convertDeviceOwnerWebsite(final JsonNode obj) { final ObjectNode node = (ObjectNode) obj.path("DeviceOwner"); final JsonNode current = node.path("Website"); if (!current.isMissingNode() && !current.isNull()) { node.put("Website", this.createValueDatatype("uri", current.asText())); } if (current.isNull()) { node.remove("Website"); } }