|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.legstar.coxb.transform.AbstractJsonTransformers
public abstract class AbstractJsonTransformers
A generic class that provides transformer capabilities for a given structure.
A structure maps to an XSD and a COBOL structure. This class does not implement the transformers, it acts as a container. Classes derived from this one will typically implement a constructor that creates the directional transformers, JSON to host and host to JSON.
| Constructor Summary | |
|---|---|
AbstractJsonTransformers()
No arg constructor. |
|
AbstractJsonTransformers(IJsonToHostTransformer jsonToHost,
IHostToJsonTransformer hostToJson)
Creates a provider with its directional transformers. |
|
| Method Summary | |
|---|---|
IHostToJsonTransformer |
getHostToJson()
|
IJsonToHostTransformer |
getJsonToHost()
|
void |
setHostToJson(IHostToJsonTransformer hostToJson)
|
void |
setJsonToHost(IJsonToHostTransformer jsonToHost)
|
byte[] |
toHost(Reader reader)
Transforms JSON to host data. |
byte[] |
toHost(Reader reader,
HostTransformStatus status)
Transforms JSON source to host data. |
byte[] |
toHost(Reader reader,
String hostCharset)
Transforms JSON to host data with a specific host character set. |
byte[] |
toHost(Reader reader,
String hostCharset,
HostTransformStatus status)
Transforms JSON source to host data with a specific host character set. |
void |
toJson(byte[] hostData,
Writer writer)
Transforms host data to JSON. |
void |
toJson(byte[] hostData,
Writer writer,
HostTransformStatus status)
Transforms host data to JSON. |
void |
toJson(byte[] hostData,
Writer writer,
String hostCharset)
Transforms host data to JSON with a specific host character set. |
void |
toJson(byte[] hostData,
Writer writer,
String hostCharset,
HostTransformStatus status)
Transforms host data to JSON using a specific host character set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractJsonTransformers()
public AbstractJsonTransformers(IJsonToHostTransformer jsonToHost,
IHostToJsonTransformer hostToJson)
jsonToHost - JSON to host transformerhostToJson - host to JSON transformer| Method Detail |
|---|
public IJsonToHostTransformer getJsonToHost()
public void setJsonToHost(IJsonToHostTransformer jsonToHost)
jsonToHost - the transformer that turns an JSON into host data to
setpublic IHostToJsonTransformer getHostToJson()
public void setHostToJson(IHostToJsonTransformer hostToJson)
hostToJson - the transformer that turns host data into an JSON to
set
public byte[] toHost(Reader reader,
String hostCharset)
throws HostTransformException
toHost in interface IHostJsonTransformersreader - the JSON Reader to unmarshal JSON data fromhostCharset - the host character set
HostTransformException - if transformation fails
public byte[] toHost(Reader reader)
throws HostTransformException
toHost in interface IHostJsonTransformersreader - the JSON reader to unmarshal JSON data from
HostTransformException - if transformation fails
public void toJson(byte[] hostData,
Writer writer,
String hostCharset)
throws HostTransformException
toJson in interface IHostJsonTransformershostData - a byte array containing host datawriter - JSON will be sent to this writer.hostCharset - the host character set
HostTransformException - if transformation fails
public void toJson(byte[] hostData,
Writer writer)
throws HostTransformException
toJson in interface IHostJsonTransformershostData - a byte array containing host datawriter - JSON will be sent to this writer.
HostTransformException - if transformation fails
public byte[] toHost(Reader reader,
String hostCharset,
HostTransformStatus status)
throws HostTransformException
toHost in interface IHostJsonTransformersreader - the JSON Reader to unmarshal JSON data fromhostCharset - the host character setstatus - will contain information on the transformation after it is
executed
HostTransformException - if transformation fails
public byte[] toHost(Reader reader,
HostTransformStatus status)
throws HostTransformException
toHost in interface IHostJsonTransformersreader - the JSON Reader to unmarshal JSON data fromstatus - will contain information on the transformation after it is
executed
HostTransformException - if transformation fails
public void toJson(byte[] hostData,
Writer writer,
String hostCharset,
HostTransformStatus status)
throws HostTransformException
toJson in interface IHostJsonTransformershostData - a byte array containing host datawriter - JSON will be sent to this writer.hostCharset - the host character setstatus - will contain information on the transformation after it is
executed
HostTransformException - if transformation fails
public void toJson(byte[] hostData,
Writer writer,
HostTransformStatus status)
throws HostTransformException
toJson in interface IHostJsonTransformershostData - a byte array containing host datawriter - JSON will be sent to this writer.status - will contain information on the transformation after it is
executed
HostTransformException - if transformation fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||