Class RelationshipParser


  • public class RelationshipParser
    extends Object
    This class contains a set of methods to help parsing file objects between Cognite api representations (json and proto) and typed objects.
    • Constructor Detail

      • RelationshipParser

        public RelationshipParser()
    • Method Detail

      • toRequestInsertItem

        public static Map<String,​Object> toRequestInsertItem​(Relationship element)
        Builds a request insert item object from Relationship. An insert item object creates a new asset data object in the Cognite system.
        Parameters:
        element -
        Returns:
      • toRequestUpdateItem

        public static Map<String,​Object> toRequestUpdateItem​(Relationship element)
        Builds a request update item object from Relationship. An update item object updates an existing relationship object with new values for all provided fields. Fields that are not in the update object retain their original value.
        Parameters:
        element -
        Returns:
      • toString

        public static String toString​(Relationship.ResourceType resourceType)
        Returns the string representation of a relationship reference resource type.
        Parameters:
        resourceType -
        Returns:
      • parseResourceType

        public static Optional<Relationship.ResourceType> parseResourceType​(String type)
        Tries to parse a string into a ResourceType. If the string cannot be parsed, the returned Optional will be empty.
        Parameters:
        type -
        Returns: