Class AssetParser


  • public class AssetParser
    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

      • AssetParser

        public AssetParser()
    • Method Detail

      • parseAsset

        public static Asset parseAsset​(String json)
                                throws Exception
        Parses an event json string to Asset proto object.
        Parameters:
        json -
        Returns:
        Throws:
        Exception
      • toRequestInsertItem

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

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

        public static Map<String,​Object> toRequestReplaceItem​(Asset element)
        Builds a request insert item object from Asset. A replace item object replaces an existing event object with new values for all provided fields. Fields that are not in the update object are set to null.
        Parameters:
        element -
        Returns: