public interface ModelSerializer
to be used in Events and Entities
| Modifier and Type | Method and Description |
|---|---|
com.ibm.ia.model.Entity |
parseEntity(DataFormat format,
byte[] entityData,
java.lang.String encoding)
Creates Entity instance from a byte array
|
com.ibm.ia.model.Entity |
parseEntity(DataFormat format,
org.w3c.dom.Document entityDom)
Creates Entity instance from a DOM document
|
com.ibm.ia.model.Entity |
parseEntity(DataFormat format,
java.io.InputStream entityData,
java.lang.String encoding)
Creates Entity instance from a byte stream
|
com.ibm.ia.model.Entity |
parseEntity(DataFormat format,
java.io.Reader entityData)
Creates Entity instance from a charset stream reader
|
com.ibm.ia.model.Entity |
parseEntity(DataFormat format,
java.lang.String entityData)
Creates Entity instance from a string
|
com.ibm.ia.model.Event |
parseEvent(DataFormat format,
byte[] eventData,
java.lang.String encoding)
Creates Event instance from byte array.
|
com.ibm.ia.model.Event |
parseEvent(DataFormat format,
org.w3c.dom.Document eventDocument)
Creates Event instance from a Dom document.
|
com.ibm.ia.model.Event |
parseEvent(DataFormat format,
java.io.InputStream eventData,
java.lang.String encoding)
Creates Event instance from a byte stream.
|
com.ibm.ia.model.Event |
parseEvent(DataFormat format,
java.io.Reader eventData)
Creates Event instance from a charset stream
If the event data is not known by the solution, a
UnknownDataElementException is thrown. |
com.ibm.ia.model.Event |
parseEvent(DataFormat format,
java.lang.String eventData)
Creates Event instance from a String
If the event data is not known by the solution, a
UnknownDataElementException is thrown. |
java.lang.String |
serializeEntity(DataFormat format,
com.ibm.ia.model.Entity entity)
Serializes Entity instance to String
|
void |
serializeEntity(DataFormat format,
java.io.OutputStream outputStream,
com.ibm.ia.model.Entity entity,
java.lang.String encoding)
Serializes Entity instance to byte stream
|
java.lang.String |
serializeEvent(DataFormat format,
com.ibm.ia.model.Event event)
Serializes given Event to String
|
void |
serializeEvent(DataFormat format,
java.io.OutputStream outputStream,
com.ibm.ia.model.Event event,
java.lang.String encoding)
Serializes given Event to byte stream
|
com.ibm.ia.model.Event parseEvent(DataFormat format, byte[] eventData, java.lang.String encoding) throws java.lang.UnsupportedOperationException, DataParseException
UnknownDataElementException is thrown.DataParseException - if the event data cannot be parsed.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat);eventData - event bytesencoding - optional encoding type, default to UTF-8com.ibm.ia.model.Event parseEvent(DataFormat format, java.io.InputStream eventData, java.lang.String encoding) throws java.lang.UnsupportedOperationException, DataParseException, java.io.IOException
UnknownDataElementException is thrown.com.ibm.ia.model.Event parseEvent(DataFormat format, org.w3c.dom.Document eventDocument) throws java.lang.UnsupportedOperationException, DataParseException
UnknownDataElementException is thrown.DataParseException - if the event data cannot be parsed.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat)eventDocument - event's Dom documentcom.ibm.ia.model.Event parseEvent(DataFormat format, java.lang.String eventData) throws java.lang.UnsupportedOperationException, DataParseException
UnknownDataElementException is thrown.DataParseException - if the event data cannot be parsed.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat)eventData - event Stringcom.ibm.ia.model.Event parseEvent(DataFormat format, java.io.Reader eventData) throws java.lang.UnsupportedOperationException, DataParseException, java.io.IOException
UnknownDataElementException is thrown.DataParseException - if the event data cannot be parsed.java.io.IOException - if the input cannot be read.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat)eventData - event charset readerjava.lang.String serializeEvent(DataFormat format, com.ibm.ia.model.Event event) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat)event - Event instancevoid serializeEvent(DataFormat format, java.io.OutputStream outputStream, com.ibm.ia.model.Event event, java.lang.String encoding) throws java.lang.UnsupportedOperationException, java.io.IOException
java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.java.io.IOException - if the output cannot be written.format - data format (#see DataFormat)outputStream - stream to write bytes toevent - Event instanceencoding - optional encoding type, default to UTF-8com.ibm.ia.model.Entity parseEntity(DataFormat format, byte[] entityData, java.lang.String encoding) throws java.lang.UnsupportedOperationException, DataParseException
DataParseException - if the entity data cannot be parsed.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat);entityData - entity bytesencoding - optional encoding type, default to UTF-8com.ibm.ia.model.Entity parseEntity(DataFormat format, java.io.InputStream entityData, java.lang.String encoding) throws java.lang.UnsupportedOperationException, DataParseException, java.io.IOException
DataParseException - if the entity data cannot be parsed.java.io.IOException - if the input cannot be read.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat);entityData - entity input streamencoding - optional encoding type, default to UTF-8com.ibm.ia.model.Entity parseEntity(DataFormat format, org.w3c.dom.Document entityDom) throws java.lang.UnsupportedOperationException, DataParseException
DataParseException - if the entity data cannot be parsed.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat);entityDom - entity Dom documentcom.ibm.ia.model.Entity parseEntity(DataFormat format, java.lang.String entityData) throws java.lang.UnsupportedOperationException, DataParseException
DataParseException - if the entity data cannot be parsed.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat);entityData - entity Stringcom.ibm.ia.model.Entity parseEntity(DataFormat format, java.io.Reader entityData) throws java.lang.UnsupportedOperationException, DataParseException, java.io.IOException
DataParseException - if the entity data cannot be parsed.java.io.IOException - if the input cannot be read.java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat);entityData - entity charset readerjava.lang.String serializeEntity(DataFormat format, com.ibm.ia.model.Entity entity) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.format - data format (#see DataFormat);entity - Entity instancevoid serializeEntity(DataFormat format, java.io.OutputStream outputStream, com.ibm.ia.model.Entity entity, java.lang.String encoding) throws java.lang.UnsupportedOperationException, java.io.IOException
java.lang.UnsupportedOperationException - if the operation is not supported for the specified data format.java.io.IOException - if the output cannot be written.format - data format (#see DataFormat);outputStream - stream to write bytes toentity - Entity instanceencoding - optional encoding type, default to UTF-8© Copyright IBM 2017