Class JsonNodeFactory

java.lang.Object
cz.cvut.kbss.jsonld.serialization.JsonNodeFactory

public class JsonNodeFactory extends Object
Factory for constructing JsonNode instances.
  • Method Details

    • createLiteralNode

      public static LiteralNode<?> createLiteralNode(Object value)
    • createLiteralNode

      public static LiteralNode<?> createLiteralNode(String name, Object value)
    • createBooleanLiteralNode

      public static BooleanLiteralNode createBooleanLiteralNode(String name, Boolean value)
    • createNumericLiteralNode

      public static NumericLiteralNode<Number> createNumericLiteralNode(String name, Number value)
    • createStringLiteralNode

      public static StringLiteralNode createStringLiteralNode(String name, String value)
    • createCollectionNode

      public static CollectionNode<?> createCollectionNode(String name, Collection<?> value)
      Creates collection node with the specified name, for the specified collection.
      Parameters:
      name - Name of the node (attribute)
      value - The collection. It is used only to determine the type of the target node, no values are added to the result
      Returns:
      An empty collection node
    • createSetNode

      public static SetNode createSetNode(String name)
    • createCollectionNodeFromArray

      public static SetNode createCollectionNodeFromArray(String name)
    • createObjectNode

      public static ObjectNode createObjectNode()
    • createObjectNode

      public static ObjectNode createObjectNode(String name)
    • createObjectIdNode

      public static ObjectIdNode createObjectIdNode(String name, Object id)