public class XmlLoader extends Object
Constructor and Description |
---|
XmlLoader()
Create an instance of the XmlLoader.
|
Modifier and Type | Method and Description |
---|---|
Schema |
getSchema()
Gets an in-memory representation of the schema which is expected
for the
loadDataMsgFromFile()
and loadHeartbeatMsgFromFile()
methods of this class. |
com.addicticks.avenuemq.dto.DataMsg |
loadDataMsgFromFile(File file,
boolean validate)
Loads a
DataMsg from an XML file. |
com.addicticks.avenuemq.dto.HeartbeatMsg |
loadHeartbeatMsgFromFile(File file,
boolean validate)
Loads a
HeartbeatMsg from an XML file. |
void |
writeSchemaFile(File file)
Writes to a file an XSD representation of the schema which is expected
for the
loadDataMsgFromFile()
and loadHeartbeatMsgFromFile()
methods of this class. |
public XmlLoader()
public Schema getSchema()
loadDataMsgFromFile()
and loadHeartbeatMsgFromFile()
methods of this class.public void writeSchemaFile(File file) throws IOException
loadDataMsgFromFile()
and loadHeartbeatMsgFromFile()
methods of this class.file
- the file to write the XSD toIOException
- if output file cannot be writtenpublic com.addicticks.avenuemq.dto.DataMsg loadDataMsgFromFile(File file, boolean validate) throws JAXBException
DataMsg
from an XML file.file
- XML to load fromvalidate
- perform validation of the input file against the schema (recommended)JAXBException
public com.addicticks.avenuemq.dto.HeartbeatMsg loadHeartbeatMsgFromFile(File file, boolean validate) throws JAXBException
HeartbeatMsg
from an XML file.file
- XML to load fromvalidate
- perform validation of the input file against the schema (recommended)JAXBException
Copyright © 2019 Addicticks. All rights reserved.