} else if (node.isInt()) {
return new IntegerScalar(node.asInt());
} else if (node.isLong()) {
return new LongScalar(node.asLong());
} else if (node.isTextual()) {
return new StringScalar(node.asText());
} else {
throw new UnsupportedOperationException(String.format("Don't know how to convert value of type %s.", node
.getClass().getCanonicalName()));
}