Package gov.nasa.pds.registry.common.dd
Class LddEsJsonWriter
java.lang.Object
gov.nasa.pds.registry.common.dd.LddEsJsonWriter
Writes Elasticsearch JSON data file to be loaded into data dictionary index.
- Author:
- karpenko
-
Constructor Summary
ConstructorsConstructorDescriptionLddEsJsonWriter(File outFile, Pds2EsDataTypeMap dtMap, Map<String, DDAttribute> ddAttrCache, boolean overwrite) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close output filevoidsetNamespaceFilter(String filter) Set namespace filter.voidwriteFieldDefinition(String classNs, String className, String attrId) Write field definition (Elasticsearch field name, data type and other information)voidwriteLddInfo(String namespace, String schemaFileName, String imVersion, String lddVersion, String date) Write PDS LDD version and date
-
Constructor Details
-
LddEsJsonWriter
public LddEsJsonWriter(File outFile, Pds2EsDataTypeMap dtMap, Map<String, DDAttribute> ddAttrCache, boolean overwrite) throws ExceptionConstructor- Parameters:
outFile- Elasticsearch JSON data filedtMap- PDS to Elasticsearch data type mapddAttrCache- LDD attribute cache- Throws:
Exception- an exception
-
-
Method Details
-
setNamespaceFilter
Set namespace filter. Only process classes having this namespace.- Parameters:
filter- namespace, such as 'pds'
-
close
Close output file- Throws:
Exception- an exception
-
writeFieldDefinition
Write field definition (Elasticsearch field name, data type and other information)- Parameters:
classNs- LDD class namespaceclassName- LDD class nameattrId- LDD attribute ID- Throws:
Exception- an exception
-
writeLddInfo
public void writeLddInfo(String namespace, String schemaFileName, String imVersion, String lddVersion, String date) throws Exception Write PDS LDD version and date- Parameters:
namespace- namespaceschemaFileName- schema file nameimVersion- IM versionlddVersion- LDD versiondate- date- Throws:
Exception- an exception
-