public class NMRStatisticsDataWriter extends Object implements NMRStatisticsDataXMLConstants, Serializable
ACTIVE_CHANNEL_KEY, ACTIVE_CHANNELS_LIST_KEY, ACTIVE_ENDPOINT_KEY, ACTIVE_ENDPOINTS_LIST_KEY, INSTANCE_NAME_KEY, NAMESPACE_KEY, NAMESPACE_VALUE, NMR_STATISTICS_DATA_KEY, NMR_STATISTICS_DATA_LIST_KEY, VERSION_KEY, VERSION_VALUE| Constructor and Description |
|---|
NMRStatisticsDataWriter()
Constructor - Creates an NMRStatisticsDataWriter
|
| Modifier and Type | Method and Description |
|---|---|
protected static Element |
createActiveChannelsList(Document document,
NMRStatisticsData data)
Create Active Channels List
|
protected static Element |
createActiveEndpointsList(Document document,
NMRStatisticsData data)
Create Active Channels List
|
protected Element |
createNMRStatisticsDataElement(Document document,
NMRStatisticsData data) |
static void |
main(String[] args) |
static String |
serialize(Map<String,NMRStatisticsData> dataMap) |
static void |
setContents(File aFile,
String aContents)
Change the contents of text file in its entirety, overwriting any
existing text.
|
static void |
writeToFile(Document document,
String directoryPath) |
protected String |
writeToString(Document document) |
public NMRStatisticsDataWriter()
public static void writeToFile(Document document, String directoryPath) throws TransformerConfigurationException, TransformerException, Exception
document - directoryPath - TransformerConfigurationExceptionTransformerExceptionExceptionpublic static void setContents(File aFile, String aContents) throws FileNotFoundException, IOException
aFile - is an existing file which can be written to.IllegalArgumentException - if param does not comply.FileNotFoundException - if the file does not exist.IOException - if problem encountered during write.public static String serialize(Map<String,NMRStatisticsData> dataMap) throws ParserConfigurationException, TransformerException
NMRStatisticsData - dataParserConfigurationExceptionTransformerExceptionprotected Element createNMRStatisticsDataElement(Document document, NMRStatisticsData data)
document - data - protected static Element createActiveChannelsList(Document document, NMRStatisticsData data)
document - data - protected static Element createActiveEndpointsList(Document document, NMRStatisticsData data)
document - data - protected String writeToString(Document document) throws TransformerException
document - TransformerExceptionpublic static void main(String[] args)
args - Copyright © 2011-2016 OpenESB Community. All Rights Reserved.