Class ItemParser
java.lang.Object
com.cognite.client.servicesV1.parser.ItemParser
This class contains a set of methods to help parsing item object between Cognite api representations
(json and proto) and typed objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemParses aString(json payload from the Cognite api) into anItemparseItems(List<String> input) Parses aListof json items (payload from the Cognite api) into anListofItem.Try parsing the specified Json path as aLong.parseString(String itemJson, String fieldName) Try parsing the specified Json path as aString.toRequestItem(Item element) Builds a request item object fromItem.
-
Constructor Details
-
ItemParser
public ItemParser()
-
-
Method Details
-
parseItems
Parses aListof json items (payload from the Cognite api) into anListofItem.- Parameters:
input-- Returns:
- Throws:
Exception
-
parseItem
Parses aString(json payload from the Cognite api) into anItem- Returns:
- Throws:
Exception
-
toRequestItem
Builds a request item object fromItem. An item object creates a new asset data object in the Cognite system.- Parameters:
element-- Returns:
- Throws:
Exception
-
parseLong
-
parseString
-