@Test public void readXML() throws Exception { File xmlCollectionConfig = getSourceFile(); assertTrue(XmlDataCollectionConfig.XML_DATACOLLECTION_CONFIG_FILE + " is readable", xmlCollectionConfig.canRead()); XmlDataCollectionConfig exampleXmldcc = JaxbUtils.unmarshal(XmlDataCollectionConfig.class, xmlCollectionConfig); assertTrue("Compare XML Data Collection Config objects.", xmldcc.equals(exampleXmldcc)); }
@Override public boolean equals(Object obj) { if (obj instanceof XmlDataCollectionConfig) { XmlDataCollectionConfig other = (XmlDataCollectionConfig) obj; return new EqualsBuilder() .append(getRrdRepository(), other.getRrdRepository()) .append(getXmlDataCollections().toArray(OF_DATA_COLLECTIONS), other.getXmlDataCollections().toArray(OF_DATA_COLLECTIONS)) .isEquals(); } return false; }
XmlDataCollectionConfig implements Serializable, Comparable<XmlDataCollectionConfig> { @Override public boolean equals(Object obj) { if (obj instanceof XmlDataCollectionConfig) { XmlDataCollectionConfig other = (XmlDataCollectionConfig) obj; return new EqualsBuilder() .append(getRrdRepository(), other.getRrdRepository()) .append(getXmlDataCollections().toArray(OF_DATA_COLLECTIONS), other.getXmlDataCollections().toArray(OF_DATA_COLLECTIONS)) .isEquals(); } return false; } }
XmlDataCollectionConfig implements Serializable, Comparable<XmlDataCollectionConfig> { @Override public boolean equals(Object obj) { if (obj instanceof XmlDataCollectionConfig) { XmlDataCollectionConfig other = (XmlDataCollectionConfig) obj; return new EqualsBuilder() .append(getRrdRepository(), other.getRrdRepository()) .append(getXmlDataCollections().toArray(OF_DATA_COLLECTIONS), other.getXmlDataCollections().toArray(OF_DATA_COLLECTIONS)) .isEquals(); } return false; } XmlDataCollectionConfig(); }
XmlDataCollectionConfig implements Serializable, Comparable<XmlDataCollectionConfig> { @Override public boolean equals(Object obj) { if (obj instanceof XmlDataCollectionConfig) { XmlDataCollectionConfig other = (XmlDataCollectionConfig) obj; return new EqualsBuilder() .append(getRrdRepository(), other.getRrdRepository()) .append(getXmlDataCollections().toArray(OF_DATA_COLLECTIONS), other.getXmlDataCollections().toArray(OF_DATA_COLLECTIONS)) .isEquals(); } return false; } XmlDataCollectionConfig(); List<XmlDataCollection> getXmlDataCollections(); void setXmlDataCollections(List<XmlDataCollection> xmlDataCollections); String getRrdRepository(); void setRrdRepository(String rrdRepository); void addDataCollection(XmlDataCollection dataCollection); void removeDataCollection(XmlDataCollection dataCollection); void removeDataCollectionByName(String name); XmlDataCollection getDataCollectionByName(String name); RrdRepository buildRrdRepository(String collectionName); int compareTo(XmlDataCollectionConfig obj); @Override boolean equals(Object obj); }
XmlDataCollectionConfig implements Serializable, Comparable<XmlDataCollectionConfig> { @Override public boolean equals(Object obj) { if (obj instanceof XmlDataCollectionConfig) { XmlDataCollectionConfig other = (XmlDataCollectionConfig) obj; return new EqualsBuilder() .append(getRrdRepository(), other.getRrdRepository()) .append(getXmlDataCollections().toArray(OF_DATA_COLLECTIONS), other.getXmlDataCollections().toArray(OF_DATA_COLLECTIONS)) .isEquals(); } return false; } XmlDataCollectionConfig(); List<XmlDataCollection> getXmlDataCollections(); void setXmlDataCollections(List<XmlDataCollection> xmlDataCollections); String getRrdRepository(); void setRrdRepository(String rrdRepository); void addDataCollection(XmlDataCollection dataCollection); void removeDataCollection(XmlDataCollection dataCollection); void removeDataCollectionByName(String name); XmlDataCollection getDataCollectionByName(String name); RrdRepository buildRrdRepository(String collectionName); int compareTo(XmlDataCollectionConfig obj); @Override boolean equals(Object obj); @XmlTransient
    static final String XML_DATACOLLECTION_CONFIG_FILE; }