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 PDSObjectContextkey - public final String getContext()
getContext in interface PDSContextpublic final String getFilePath()
getFilePath in interface PDSObjectpublic void setFilePath(String filePath)
setFilePath in interface PDSObjectpublic final List getList(String key) throws TemplateException
getList in interface PDSObjectTemplateExceptionpublic final String getUnits(String key)
getUnits in interface PDSObjectContextpublic final void setParameters(PDSObject pdsObject)
setParameters in interface PDSObjectContextpublic void setImageInputStream(ImageInputStream iis)
public ImageInputStream getImageInputStream()
getImageInputStream in interface PDSObjectpublic void setReaderFormat(String format)
setReaderFormat in interface PDSObjectpublic String getReaderFormat()
getReaderFormat in interface PDSObjectpublic void setImageStartByte(Long x)
public Long getImageStartByte()
getImageStartByte in interface PDSObjectpublic void setMappings()
setMappings in interface PDSObjectContextpublic 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 © 2020. All rights reserved.