public class JsonLabel extends Object implements PDSObject
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT |
ContextUtil |
ctxtUtil |
Constructor and Description |
---|
JsonLabel()
Empty Constructor, set everything later on
|
JsonLabel(com.fasterxml.jackson.databind.JsonNode jsonNode)
Constructor
Construct the Jsonlabel using a DOM object from somewhere else
the JsonNode was created smewhere else
|
JsonLabel(String filePath)
Constructor
the filePath will read and parsed as json
|
Modifier and Type | Method and Description |
---|---|
Object |
get(String key)
Retrieves the value for the specified key
|
String |
getContext()
Returns the variable to be used in the Velocity Template Engine to map to
this object.
|
String |
getFilePath() |
ImageInputStream |
getImageInputStream() |
Long |
getImageStartByte() |
List |
getList(String key) |
List<String> |
getPDSObjectNames()
Added per request from mcayanan in order to be able to loop through the
PDS Objects that can be found in the label
|
String |
getReaderFormat() |
String |
getUnits(String key) |
void |
parseJson(String jsonString)
parseJson
Parse a json String and load it into the flatLabel.
|
void |
setFilePath(String filePath) |
void |
setImageInputStream(ImageInputStream iis) |
void |
setImageStartByte(Long x) |
void |
setIncludePaths(List<String> i)
Set the paths to search for files referenced by pointers.
|
void |
setJsonFilename(String s) |
void |
setJsonString(String s) |
void |
setMappings() |
void |
setParameters(PDSObject pdsObject) |
void |
setParserType(ParserType type) |
void |
setReaderFormat(String format) |
String |
toString() |
public static String CONTEXT
public ContextUtil ctxtUtil
public JsonLabel()
public JsonLabel(com.fasterxml.jackson.databind.JsonNode jsonNode)
JsonNode
- public JsonLabel(String filePath)
filePath
- public final Object get(String key)
get
in interface PDSObjectContext
key
- public final String getContext()
getContext
in interface PDSContext
public final String getFilePath()
getFilePath
in interface PDSObject
public void setFilePath(String filePath)
setFilePath
in interface PDSObject
public final List getList(String key) throws TemplateException
getList
in interface PDSObject
TemplateException
public final String getUnits(String key)
getUnits
in interface PDSObjectContext
public final void setParameters(PDSObject pdsObject)
setParameters
in interface PDSObjectContext
public void setImageInputStream(ImageInputStream iis)
public ImageInputStream getImageInputStream()
getImageInputStream
in interface PDSObject
public void setReaderFormat(String format)
setReaderFormat
in interface PDSObject
public String getReaderFormat()
getReaderFormat
in interface PDSObject
public void setImageStartByte(Long x)
public Long getImageStartByte()
getImageStartByte
in interface PDSObject
public void setMappings()
setMappings
in interface PDSObjectContext
public final List<String> getPDSObjectNames()
public void setJsonFilename(String s)
public void setJsonString(String s)
public void setParserType(ParserType type)
public void setIncludePaths(List<String> i)
Default is to always look first in the same directory as the label, then search specified directories.
i
- List of pathspublic void parseJson(String jsonString)
jsonString
- Copyright © 2019. All rights reserved.