ObjectNode.path
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.codehaus.jackson.node.ObjectNode.path(Showing top 15 results out of 315)

  • Common ways to obtain ObjectNode
private void myMethod () {
ObjectNode o =
  • JsonNodeFactory jsonNodeFactory;jsonNodeFactory.objectNode()
  • AI code suggestions by Codota
}
origin: rdelbru/SIREn

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");
 }
}
origin: sirensolutions/siren

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");
 }
}
origin: apache/stanbol

@Override
public NerTag parse(ObjectNode jValue, AnalysedText at) {
  JsonNode tag = jValue.path("tag");
  if(!tag.isTextual()){
    throw new IllegalStateException("Unable to parse NerTag. The value of the "
      +"'tag' field MUST have a textual value (json: "+jValue+")");
  }
  JsonNode uri = jValue.path("uri");
  if(uri.isTextual()){
    return new NerTag(tag.getTextValue(), new IRI(uri.getTextValue()));
  } else {
    return new NerTag(tag.getTextValue());
  }
}
origin: sirensolutions/siren

private void convertRatedOutputVoltage(final JsonNode obj) {
 final Iterator<JsonNode> nodes = obj.path("Connector").iterator();
 while (nodes.hasNext()) {
  final ObjectNode node = (ObjectNode) nodes.next();
  final JsonNode current = node.path("RatedOutputVoltage");
  if (!current.isMissingNode() && !current.isNull()) {
   final int value = Integer.parseInt(current.asText());
   node.put("RatedOutputVoltage", value);
  }
  if (current.isNull()) {
   node.remove("RatedOutputVoltage");
  }
 }
}
origin: rdelbru/SIREn

private void convertRatedOutputkW(final JsonNode obj) {
 final Iterator<JsonNode> nodes = obj.path("Connector").iterator();
 while (nodes.hasNext()) {
  final ObjectNode node = (ObjectNode) nodes.next();
  final JsonNode current = node.path("RatedOutputkW");
  if (!current.isMissingNode() && !current.isNull()) {
   final double value = Double.parseDouble(current.asText());
   node.put("RatedOutputkW", value);
  }
  if (current.isNull()) {
   node.remove("RatedOutputkW");
  }
 }
}
origin: sirensolutions/siren

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");
 }
}
origin: sirensolutions/siren

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");
 }
}
origin: rdelbru/SIREn

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");
 }
}
origin: rdelbru/SIREn

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");
 }
}
origin: rdelbru/SIREn

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");
 }
}
origin: sirensolutions/siren

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");
 }
}
origin: rdelbru/SIREn

private void convertRatedOutputCurrent(final JsonNode obj) {
 final Iterator<JsonNode> nodes = obj.path("Connector").iterator();
 while (nodes.hasNext()) {
  final ObjectNode node = (ObjectNode) nodes.next();
  final JsonNode current = node.path("RatedOutputCurrent");
  if (!current.isMissingNode() && !current.isNull()) {
   final int value = Integer.parseInt(current.asText());
   node.put("RatedOutputCurrent", value);
  }
  if (current.isNull()) {
   node.remove("RatedOutputCurrent");
  }
 }
}
origin: sirensolutions/siren

private void convertTetheredCable(final JsonNode obj) {
 final Iterator<JsonNode> nodes = obj.path("Connector").iterator();
 while (nodes.hasNext()) {
  final ObjectNode node = (ObjectNode) nodes.next();
  final JsonNode current = node.path("TetheredCable");
  if (!current.isMissingNode() && !current.isNull()) {
   final int value = Integer.parseInt(current.asText());
   node.put("TetheredCable", value);
  }
  if (current.isNull()) {
   node.remove("TetheredCable");
  }
 }
}
origin: sirensolutions/siren

private void convertChargeMode(final JsonNode obj) {
 final Iterator<JsonNode> nodes = obj.path("Connector").iterator();
 while (nodes.hasNext()) {
  final ObjectNode node = (ObjectNode) nodes.next();
  final JsonNode current = node.path("ChargeMode");
  if (!current.isMissingNode() && !current.isNull()) {
   final int value = Integer.parseInt(current.asText());
   node.put("ChargeMode", value);
  }
  if (current.isNull()) {
   node.remove("ChargeMode");
  }
 }
}
origin: rdelbru/SIREn

private void convertChargeMode(final JsonNode obj) {
 final Iterator<JsonNode> nodes = obj.path("Connector").iterator();
 while (nodes.hasNext()) {
  final ObjectNode node = (ObjectNode) nodes.next();
  final JsonNode current = node.path("ChargeMode");
  if (!current.isMissingNode() && !current.isNull()) {
   final int value = Integer.parseInt(current.asText());
   node.put("ChargeMode", value);
  }
  if (current.isNull()) {
   node.remove("ChargeMode");
  }
 }
}
org.codehaus.jackson.nodeObjectNodepath

Popular methods of ObjectNode

  • put
    Method for setting value of a field to specified binary value
  • get
  • toString
  • putArray
    Method that will construct an ArrayNode and add it as a field of this ObjectNode, replacing old valu
  • getFields
    Method to use for accessing all fields (with both names and values) of this JSON Object.
  • has
  • putObject
    Method that will construct an ObjectNode and add it as a field of this ObjectNode, replacing old val
  • nullNode
  • objectNode
  • putNull
  • size
  • POJONode
  • size,
  • POJONode,
  • _put,
  • arrayNode,
  • binaryNode,
  • booleanNode,
  • equals,
  • numberNode,
  • putContentsTo

Popular classes and methods

  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • RandomAccessFile (java.io)
    Saves binary data to the local storage; currently using hex encoding. The string is prefixed with "h
  • String (java.lang)
    An immutable sequence of characters/code units ( chars). A String is represented by array of UTF-16
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)