本文整理了Java中org.codehaus.jackson.node.ObjectNode.path()
方法的一些代码示例,展示了ObjectNode.path()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectNode.path()
方法的具体详情如下:
包路径:org.codehaus.jackson.node.ObjectNode
类名称:ObjectNode
方法名:path
暂无
代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib
public String getRel() {
return asObjectNode().path("rel").getTextValue();
}
代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib
public String getHref() {
return asObjectNode().path("href").getTextValue();
}
代码示例来源:origin: org.apache.isis.viewer/json-applib
public String getRel() {
return asObjectNode().path("rel").getTextValue();
}
代码示例来源:origin: org.apache.isis.viewer/json-applib
public MediaType getType() {
final String typeStr = asObjectNode().path("type").getTextValue();
if (typeStr == null) {
return MediaType.APPLICATION_JSON_TYPE;
}
return MediaType.valueOf(typeStr);
}
代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib
public MediaType getType() {
final String typeStr = asObjectNode().path("type").getTextValue();
if (typeStr == null) {
return MediaType.APPLICATION_JSON_TYPE;
}
return MediaType.valueOf(typeStr);
}
代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib
public RestfulHttpMethod getHttpMethod() {
final String methodStr = asObjectNode().path("method").getTextValue();
return RestfulHttpMethod.valueOf(methodStr);
}
代码示例来源:origin: org.apache.isis.viewer/json-applib
public HttpMethod getHttpMethod() {
final String methodStr = asObjectNode().path("method").getTextValue();
return HttpMethod.valueOf(methodStr);
}
代码示例来源: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");
}
}
}
代码示例来源: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: 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: 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: org.apache.stanbol/org.apache.stanbol.enhancer.nlp.json
@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: 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 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: 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: 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 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 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 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");
}
}
内容来源于网络,如有侵权,请联系作者删除!