Class SimpleInventoryParser
- java.lang.Object
-
- edu.wisc.library.ocfl.core.validation.SimpleInventoryParser
-
public class SimpleInventoryParser extends Object
Parses a JSON inventory into a minimally valid SimpleInventory object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleInventoryParser.ParseSimpleInventoryResult
-
Constructor Summary
Constructors Constructor Description SimpleInventoryParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleInventoryParser.ParseSimpleInventoryResultparse(InputStream inventoryStream, String inventoryPath)Parses the input stream JSON into a minimally valid SimpleInventory object.
-
-
-
Method Detail
-
parse
public SimpleInventoryParser.ParseSimpleInventoryResult parse(InputStream inventoryStream, String inventoryPath)
Parses the input stream JSON into a minimally valid SimpleInventory object. The only reason an inventory object would not be returned is if the JSON is syntactically invalid. Otherwise, a SimpleInventory is returned with any validation issues noted. The validation issues reported here are strictly related to JSON structural issues such as invalid types or keys.- Parameters:
inventoryStream- JSON inventory streaminventoryPath- path to the source JSON file, this is used for constructing validation messages- Returns:
- the results of the parse
-
-