Class BaseLddParser
java.lang.Object
gov.nasa.pds.registry.common.dd.parser.BaseLddParser
- Direct Known Subclasses:
AttributeDictionaryParser,ClassAttrAssociationParser
Base parser of PDS LDD JSON files (Data dictionary files).
This implementation is using Google "GSON" streaming parser to reduce memory footprint.
(We only need a subset of values from a JSON file).
- Author:
- karpenko
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns Information Model versionReturns LDD (creation) dateReturns LDD versionvoidparse()Parse PDS LDD JSON fileprotected voidParse "dataDictionary" -> "attributeDictionary" subtreeprotected voidParse "dataDictionary" -> "classDictionary" subtree
-
Field Details
-
ddFile
-
jsonReader
protected com.google.gson.stream.JsonReader jsonReader -
imVersion
-
lddVersion
-
ddDate
-
-
Constructor Details
-
BaseLddParser
Constructor- Parameters:
file- PDS LDD JSON file to parse- Throws:
Exception- an exception
-
-
Method Details
-
getLddVersion
Returns LDD version- Returns:
- LDD version
-
getImVersion
Returns Information Model version- Returns:
- Information Model version
-
getLddDate
Returns LDD (creation) date- Returns:
- LDD date
-
parse
Parse PDS LDD JSON file- Throws:
Exception- an exception
-
parseClassDictionary
Parse "dataDictionary" -> "classDictionary" subtree- Throws:
Exception- an exception
-
parseAttributeDictionary
Parse "dataDictionary" -> "attributeDictionary" subtree- Throws:
Exception- an exception
-