congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ObjectNode.objectNode
Code IndexAdd Tabnine to your IDE (free)

How to use
objectNode
method
in
org.codehaus.jackson.node.ObjectNode

Best Java code snippets using org.codehaus.jackson.node.ObjectNode.objectNode (Showing top 20 results out of 315)

origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Method that will construct an ObjectNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ObjectNode (NOT the old value,
 *   which could be of any type)
 */
public ObjectNode putObject(String fieldName)
{
  ObjectNode n  = objectNode();
  _put(fieldName, n);
  return n;
}
origin: org.codehaus.jackson/jackson-mapper-asl

@Override
public ObjectNode with(String propertyName)
{
  if (_children == null) {
    _children = new LinkedHashMap<String, JsonNode>();
  } else {
    JsonNode n = _children.get(propertyName);
    if (n != null) {
      if (n instanceof ObjectNode) {
        return (ObjectNode) n;
      }
      throw new UnsupportedOperationException("Property '"+propertyName
          +"' has value that is not of type ObjectNode (but "
          +n.getClass().getName()+")");
    }
  }
  ObjectNode result = objectNode();
  _children.put(propertyName, result);
  return result;
}

origin: org.codehaus.jackson/jackson-mapper-asl

@Override
public JsonNode getSchema(SerializerProvider provider, Type typeHint)
  throws JsonMappingException
{
  ObjectNode o = createSchemaNode("object", true);
  //todo: should the classname go in the title?
  //o.put("title", _className);
  ObjectNode propertiesNode = o.objectNode();
  for (int i = 0; i < _props.length; i++) {
    BeanPropertyWriter prop = _props[i];
    JavaType propType = prop.getSerializationType();
    // 03-Dec-2010, tatu: SchemaAware REALLY should use JavaType, but alas it doesn't...
    Type hint = (propType == null) ? prop.getGenericPropertyType() : propType.getRawClass();
    // Maybe it already has annotated/statically configured serializer?
    JsonSerializer<Object> ser = prop.getSerializer();
    if (ser == null) { // nope
      Class<?> serType = prop.getRawSerializationType();
      if (serType == null) {
        serType = prop.getPropertyType();
      }
      ser = provider.findValueSerializer(serType, prop);
    }
    JsonNode schemaNode = (ser instanceof SchemaAware) ?
        ((SchemaAware) ser).getSchema(provider, hint) : 
        JsonSchema.getDefaultSchemaNode();
    propertiesNode.put(prop.getName(), schemaNode);
  }
  o.put("properties", propertiesNode);
  return o;
}
origin: camunda/camunda-bpm-platform

/**
 * Method that will construct an ObjectNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ObjectNode (NOT the old value,
 *   which could be of any type)
 */
public ObjectNode putObject(String fieldName)
{
  ObjectNode n  = objectNode();
  _put(fieldName, n);
  return n;
}
origin: camunda/camunda-bpm-platform

@Override
public ObjectNode with(String propertyName)
{
  if (_children == null) {
    _children = new LinkedHashMap<String, JsonNode>();
  } else {
    JsonNode n = _children.get(propertyName);
    if (n != null) {
      if (n instanceof ObjectNode) {
        return (ObjectNode) n;
      }
      throw new UnsupportedOperationException("Property '"+propertyName
          +"' has value that is not of type ObjectNode (but "
          +n.getClass().getName()+")");
    }
  }
  ObjectNode result = objectNode();
  _children.put(propertyName, result);
  return result;
}

origin: camunda/camunda-bpm-platform

@Override
public JsonNode getSchema(SerializerProvider provider, Type typeHint)
  throws JsonMappingException
{
  ObjectNode o = createSchemaNode("object", true);
  //todo: should the classname go in the title?
  //o.put("title", _className);
  ObjectNode propertiesNode = o.objectNode();
  for (int i = 0; i < _props.length; i++) {
    BeanPropertyWriter prop = _props[i];
    JavaType propType = prop.getSerializationType();
    // 03-Dec-2010, tatu: SchemaAware REALLY should use JavaType, but alas it doesn't...
    Type hint = (propType == null) ? prop.getGenericPropertyType() : propType.getRawClass();
    // Maybe it already has annotated/statically configured serializer?
    JsonSerializer<Object> ser = prop.getSerializer();
    if (ser == null) { // nope
      Class<?> serType = prop.getRawSerializationType();
      if (serType == null) {
        serType = prop.getPropertyType();
      }
      ser = provider.findValueSerializer(serType, prop);
    }
    JsonNode schemaNode = (ser instanceof SchemaAware) ?
        ((SchemaAware) ser).getSchema(provider, hint) : 
        JsonSchema.getDefaultSchemaNode();
    propertiesNode.put(prop.getName(), schemaNode);
  }
  o.put("properties", propertiesNode);
  return o;
}
origin: org.codehaus.jackson/jackson-mapper-lgpl

/**
 * Method that will construct an ObjectNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ObjectNode (NOT the old value,
 *   which could be of any type)
 */
public ObjectNode putObject(String fieldName)
{
  ObjectNode n  = objectNode();
  _put(fieldName, n);
  return n;
}
origin: com.barchart.wrap/barchart-wrap-jackson

/**
 * Method that will construct an ObjectNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ObjectNode (NOT the old value,
 *   which could be of any type)
 */
public ObjectNode putObject(String fieldName)
{
  ObjectNode n  = objectNode();
  _put(fieldName, n);
  return n;
}
origin: ovea-deprecated/jetty-session-redis

/**
 * Method that will construct an ObjectNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ObjectNode (NOT the old value,
 *   which could be of any type)
 */
public ObjectNode putObject(String fieldName)
{
  ObjectNode n  = objectNode();
  _put(fieldName, n);
  return n;
}
origin: org.codehaus.jackson/jackson-mapper-lgpl

@Override
public ObjectNode with(String propertyName)
{
  if (_children == null) {
    _children = new LinkedHashMap<String, JsonNode>();
  } else {
    JsonNode n = _children.get(propertyName);
    if (n != null) {
      if (n instanceof ObjectNode) {
        return (ObjectNode) n;
      }
      throw new UnsupportedOperationException("Property '"+propertyName
          +"' has value that is not of type ObjectNode (but "
          +n.getClass().getName()+")");
    }
  }
  ObjectNode result = objectNode();
  _children.put(propertyName, result);
  return result;
}

origin: ovea-deprecated/jetty-session-redis

@Override
public ObjectNode with(String propertyName)
{
  if (_children == null) {
    _children = new LinkedHashMap<String, JsonNode>();
  } else {
    JsonNode n = _children.get(propertyName);
    if (n != null) {
      if (n instanceof ObjectNode) {
        return (ObjectNode) n;
      }
      throw new UnsupportedOperationException("Property '"+propertyName
          +"' has value that is not of type ObjectNode (but "
          +n.getClass().getName()+")");
    }
  }
  ObjectNode result = objectNode();
  _children.put(propertyName, result);
  return result;
}

origin: com.barchart.wrap/barchart-wrap-jackson

@Override
public ObjectNode with(String propertyName)
{
  if (_children == null) {
    _children = new LinkedHashMap<String, JsonNode>();
  } else {
    JsonNode n = _children.get(propertyName);
    if (n != null) {
      if (n instanceof ObjectNode) {
        return (ObjectNode) n;
      }
      throw new UnsupportedOperationException("Property '"+propertyName
          +"' has value that is not of type ObjectNode (but "
          +n.getClass().getName()+")");
    }
  }
  ObjectNode result = objectNode();
  _children.put(propertyName, result);
  return result;
}

origin: com.plausiblelabs.warwizard/warwizard-core

private void addOverride(JsonNode root, String name, String value) {
  JsonNode node = root;
  final Iterator<String> keys = Splitter.on('.').trimResults().split(name).iterator();
  while (keys.hasNext()) {
    final String key = keys.next();
    if (!(node instanceof ObjectNode)) {
      throw new IllegalArgumentException("Unable to override " + name + "; it's not a valid path.");
    }
    final ObjectNode obj = (ObjectNode) node;
    if (keys.hasNext()) {
      JsonNode child = obj.get(key);
      if (child == null) {
        child = obj.objectNode();
        obj.put(key, child);
      }
      node = child;
    } else {
      obj.put(key, value);
    }
  }
}
origin: neo4j-contrib/cypher-dsl

ObjectNode nodeNode = entry.objectNode();
nodeNode.put( "_id", node.getId() );
for ( String propertyName : node.getPropertyKeys() )
origin: org.neo4j/neo4j-cypher-dsl

public ArrayNode toJSON(Iterable<Map<String, Object>> result)
{
  ArrayNode root = mapper.createArrayNode();
  for (Map<String, Object> stringObjectMap : result)
  {
    ObjectNode entry = root.objectNode();
    for (Map.Entry<String, Object> stringObjectEntry : stringObjectMap.entrySet())
    {
      if (stringObjectEntry.getValue() instanceof Path)
      {
        entry.put(stringObjectEntry.getKey(), stringObjectEntry.getValue().toString());
      } else if (stringObjectEntry.getValue() instanceof Node)
      {
        Node node = (Node) stringObjectEntry.getValue();
        ObjectNode nodeNode = entry.objectNode();
        nodeNode.put("_id", node.getId());
        for (String propertyName : node.getPropertyKeys())
        {
          addProperty(nodeNode, propertyName, node.getProperty(propertyName));
        }
        entry.put(stringObjectEntry.getKey(), nodeNode);
      } else
      {
        addProperty(entry, stringObjectEntry.getKey(), stringObjectEntry.getValue());
      }
    }
    root.add(entry);
  }
  return root;
}
origin: eBay/YiDB

public JoinExplanation(String sourceEnityType, long fromBeforeSize, long fromAfterSize,
    long targetEntitySizeBefore, List<List<String>> joinMap) {
  explanationNode = JsonNodeFactory.instance.objectNode();
  ObjectNode joinNode = explanationNode.objectNode();
  joinNode.put("sourceEntityType", sourceEnityType);
  joinNode.put("joinMap", joinMap.toString());
  joinNode.put("source size before size: ", fromBeforeSize);
  joinNode.put("source size after size: ", fromAfterSize);
  joinNode.put("target entity size involved: ", targetEntitySizeBefore);
  explanationNode.put("join", joinNode);
}
origin: org.codehaus.jackson/jackson-mapper-lgpl

@Override
public JsonNode getSchema(SerializerProvider provider, Type typeHint)
  throws JsonMappingException
{
  ObjectNode o = createSchemaNode("object", true);
  //todo: should the classname go in the title?
  //o.put("title", _className);
  ObjectNode propertiesNode = o.objectNode();
  for (int i = 0; i < _props.length; i++) {
    BeanPropertyWriter prop = _props[i];
    JavaType propType = prop.getSerializationType();
    // 03-Dec-2010, tatu: SchemaAware REALLY should use JavaType, but alas it doesn't...
    Type hint = (propType == null) ? prop.getGenericPropertyType() : propType.getRawClass();
    // Maybe it already has annotated/statically configured serializer?
    JsonSerializer<Object> ser = prop.getSerializer();
    if (ser == null) { // nope
      Class<?> serType = prop.getRawSerializationType();
      if (serType == null) {
        serType = prop.getPropertyType();
      }
      ser = provider.findValueSerializer(serType, prop);
    }
    JsonNode schemaNode = (ser instanceof SchemaAware) ?
        ((SchemaAware) ser).getSchema(provider, hint) : 
        JsonSchema.getDefaultSchemaNode();
    propertiesNode.put(prop.getName(), schemaNode);
  }
  o.put("properties", propertiesNode);
  return o;
}
origin: com.barchart.wrap/barchart-wrap-jackson

@Override
public JsonNode getSchema(SerializerProvider provider, Type typeHint)
  throws JsonMappingException
{
  ObjectNode o = createSchemaNode("object", true);
  //todo: should the classname go in the title?
  //o.put("title", _className);
  ObjectNode propertiesNode = o.objectNode();
  for (int i = 0; i < _props.length; i++) {
    BeanPropertyWriter prop = _props[i];
    JavaType propType = prop.getSerializationType();
    // 03-Dec-2010, tatu: SchemaAware REALLY should use JavaType, but alas it doesn't...
    Type hint = (propType == null) ? prop.getGenericPropertyType() : propType.getRawClass();
    // Maybe it already has annotated/statically configured serializer?
    JsonSerializer<Object> ser = prop.getSerializer();
    if (ser == null) { // nope
      Class<?> serType = prop.getRawSerializationType();
      if (serType == null) {
        serType = prop.getPropertyType();
      }
      ser = provider.findValueSerializer(serType, prop);
    }
    JsonNode schemaNode = (ser instanceof SchemaAware) ?
        ((SchemaAware) ser).getSchema(provider, hint) : 
        JsonSchema.getDefaultSchemaNode();
    propertiesNode.put(prop.getName(), schemaNode);
  }
  o.put("properties", propertiesNode);
  return o;
}
origin: org.codehaus.jackson/com.springsource.org.codehaus.jackson.mapper

ObjectNode propertiesNode = o.objectNode();
for (int i = 0; i < _props.length; i++) {
  BeanPropertyWriter prop = _props[i];
origin: ovea-deprecated/jetty-session-redis

@Override
public JsonNode getSchema(SerializerProvider provider, Type typeHint)
  throws JsonMappingException
{
  ObjectNode o = createSchemaNode("object", true);
  //todo: should the classname go in the title?
  //o.put("title", _className);
  ObjectNode propertiesNode = o.objectNode();
  for (int i = 0; i < _props.length; i++) {
    BeanPropertyWriter prop = _props[i];
    JavaType propType = prop.getSerializationType();
    // 03-Dec-2010, tatu: SchemaAware REALLY should use JavaType, but alas it doesn't...
    Type hint = (propType == null) ? prop.getGenericPropertyType() : propType.getRawClass();
    // Maybe it already has annotated/statically configured serializer?
    JsonSerializer<Object> ser = prop.getSerializer();
    if (ser == null) { // nope
      Class<?> serType = prop.getRawSerializationType();
      if (serType == null) {
        serType = prop.getPropertyType();
      }
      ser = provider.findValueSerializer(serType, prop);
    }
    JsonNode schemaNode = (ser instanceof SchemaAware) ?
        ((SchemaAware) ser).getSchema(provider, hint) : 
        JsonSchema.getDefaultSchemaNode();
    propertiesNode.put(prop.getName(), schemaNode);
  }
  o.put("properties", propertiesNode);
  return o;
}
org.codehaus.jackson.nodeObjectNodeobjectNode

Popular methods of ObjectNode

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

Popular in Java

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • startActivity (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Path (java.nio.file)
  • Permission (java.security)
    Legacy security code; do not use.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now