public abstract class GeneralJSON extends Object implements ReadWriteable
| Modifier and Type | Field and Description |
|---|---|
Map<String,Object> |
analysis
analysos held in the object
|
protected static com.google.gson.Gson |
gson |
| Constructor and Description |
|---|
GeneralJSON() |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
addAnalysis(String annKey,
T annVal)
Add analysis to the analysis object.
|
String |
analysisToJSON()
Get all the Analysis in JSON format.
|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
void |
fillAnalysis(GeneralJSON other) |
abstract void |
fillUSMF(USMFStatus status)
This is the method that will be called by USMFStatus to fill itself with
the matching values from the extending class.
|
abstract void |
fromUSMF(USMFStatus status)
This is the method that will be called to allow this object
to fill itself from a USMF object.
|
<T> T |
getAnalysis(String name) |
abstract GeneralJSON |
instanceFromString(String line) |
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeASCIIAnalysis(PrintWriter outputWriter,
List<String> selectiveAnalysis)
Convenience to allow writing of just the analysis to a writer
|
void |
writeASCIIAnalysis(PrintWriter outputWriter,
List<String> selectiveAnalysis,
List<String> selectiveStatus)
Convenience to allow writing of just the analysis and some status
information to a writer
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadASCIIprotected static transient com.google.gson.Gson gson
public GeneralJSON()
public abstract void fillUSMF(USMFStatus status)
status - = USMFStatus to be filledpublic abstract void fromUSMF(USMFStatus status)
status - = USMFStatus to be filledpublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIout - sink to write toIOException - an error writing to outpublic void writeASCIIAnalysis(PrintWriter outputWriter, List<String> selectiveAnalysis)
outputWriter - selectiveAnalysis - public void writeASCIIAnalysis(PrintWriter outputWriter, List<String> selectiveAnalysis, List<String> selectiveStatus)
outputWriter - selectiveAnalysis - selectiveStatus - public <T> void addAnalysis(String annKey, T annVal)
T - The type of data being savedannKey - the keyannVal - the valuepublic <T> T getAnalysis(String name)
T - name - public String analysisToJSON()
public void fillAnalysis(GeneralJSON other)
other - public abstract GeneralJSON instanceFromString(String line)
line -