signature:
public class FilemakerLayoutDocument { /** * Creates a { @ link FilemakerLayoutDocument } from a { @ link FMPXMLLAYOUT } object .
 * @ param xmlLayout Java object , that represents the & lt ; FMPXMLLAYOUT & gt ; root element
 * @ return created document
 * @ throws ParserConfigurationException if the parser is not properly configured
 * @ throws JAXBException if a problem with JAXB occurred */
public static FilemakerLayoutDocument newDocument ( FMPXMLLAYOUT xmlLayout ) throws ParserConfigurationException , JAXBException { } }

implementation: Document document = XmlUtils . newDocument ( ) ; FilemakerUtils . createMarshaller ( "UTF-8" , true ) . marshal ( xmlLayout , document ) ; return new FilemakerLayoutDocument ( document ) ;


signature:
public class CasaItReadingExample { /** * Read an { @ link InputStream } into a { @ link CasaItDocument } and print some
 * of its content to console .
 * @ param xmlInputStream the input stream to read
 * @ throws SAXException if the file is not readable by the XML parser
 * @ throws IOException if the file is not readable
 * @ throws ParserConfigurationException if the XML parser is improperly configured
 * @ throws JAXBException if XML conversion into Java objects failed */
protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { } }

implementation: LOGGER . info ( "process example file" ) ; CasaItDocument doc = CasaItUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; }


signature:
public class CasaItReadingExample { /** * Print some content of a { @ link CasaItDocument } to console .
 * @ param doc the document to process
 * @ throws JAXBException if XML conversion into Java objects failed */
protected static void printToConsole ( CasaItDocument doc ) throws JAXBException { } }

implementation:
Container container = doc . toObject ( ) ; // process real estates
if ( container . getRealestateitems ( ) != null ) { for ( Container . Realestateitems . Realestate obj : container . getRealestateitems ( ) . getRealestate ( ) ) { // get object nr
String objectNr = StringUtils . trimToNull ( obj . getReference ( ) ) ; if ( objectNr == null ) objectNr = "???" ; // get object title
String objectTitle = ( obj . getDescription ( ) != null ) ? StringUtils . trimToNull ( obj . getDescription ( ) . getValue ( ) ) : null ; if ( objectTitle == null ) objectTitle = "???" ; // print object information to console
LOGGER . info ( "> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; } }


signature:
public class BoxProject { /** * Sets the value of the type property .
 * @ param value
 * allowed object is
 * { @ link BoxProject . BoxProjectType } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public void setType ( BoxProject . BoxProjectType value ) { } }

implementation: this . type = value ;


signature:
public class BebaubarNach { /** * Sets the value of the bebaubarAttr property .
 * @ param value
 * allowed object is
 * { @ link BebaubarNach . BebaubarAttr } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setBebaubarAttr ( BebaubarNach . BebaubarAttr value ) { } }

implementation: this . bebaubarAttr = value ;


signature:
public class OpenImmo_1_2_4 { /** * Downgrade an OpenImmo document from version 1.2.4 to 1.2.3.
 * @ param doc OpenImmo document in version 1.2.4 */
@ Override public void downgradeToPreviousVersion ( OpenImmoDocument doc ) { } }

implementation:
doc . setDocumentVersion ( OpenImmoVersion . V1_2_3 ) ; // downgrade a feedback document
if ( doc instanceof OpenImmoFeedbackDocument ) { try { this . removeFeedbackVersionElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported <version> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeFeedbackInteressentChildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported children of <interessent> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } } // downgrade a transfer document
else if ( doc instanceof OpenImmoTransferDocument ) { try { this . removePreiseChildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported children of <preise> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeWintergartenElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported <wintergarten> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeEnergietypElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <energietyp> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBebaubarNachElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <bebaubar_nach> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeAnhangElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <anhang> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeWohnungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <wohnung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeGrundstueckElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <grundstueck> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeLandUndForstwirtschaftElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <land_und_forstwirtschaft> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeParkenElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <parken> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } }


signature:
public class OpenImmo_1_2_4 { /** * Upgrade an OpenImmo document from version 1.2.3 to 1.2.4.
 * @ param doc OpenImmo document in version 1.2.3 */
@ Override public void upgradeFromPreviousVersion ( OpenImmoDocument doc ) { } }

implementation: doc . setDocumentVersion ( OpenImmoVersion . V1_2_4 ) ; if ( doc instanceof OpenImmoTransferDocument ) { try { this . upgradeAnzahlBalkonTerrassenElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <anzahl_balkon_terrassen> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeAnhangElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <anhang> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeSonstigeElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <sonstige> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } }


signature:
public class OpenImmo_1_2_4 { /** * Downgrade & lt ; anhang & gt ; elements to OpenImmo 1.2.3.
 * The options " QRCODE " , " FILM " , " FILMLINK " for the " gruppe " attribute of
 * & lt ; anhang & gt ; elements are not available in version 1.2.3.
 * The option " REMOTE " for the " location " attribute of
 * & lt ; anhang & gt ; elements is not available in version 1.2.3.
 * The the child element & lt ; check & gt ; of & lt ; anhang & gt ; elements is not
 * available in version 1.2.3.
 * @ param doc OpenImmo document in version 1.2.4
 * @ throws JaxenException if xpath evaluation failed */
protected void downgradeAnhangElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:anhang | " + "/io:openimmo/io:anbieter/io:immobilie/io:anhaenge/io:anhang" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; String value = StringUtils . trimToNull ( node . getAttribute ( "gruppe" ) ) ; if ( "QRCODE" . equalsIgnoreCase ( value ) ) node . removeAttribute ( "gruppe" ) ; else if ( "FILM" . equalsIgnoreCase ( value ) ) node . removeAttribute ( "gruppe" ) ; else if ( "FILMLINK" . equalsIgnoreCase ( value ) ) node . removeAttribute ( "gruppe" ) ; value = StringUtils . trimToNull ( node . getAttribute ( "location" ) ) ; if ( "REMOTE" . equalsIgnoreCase ( value ) ) node . setAttribute ( "location" , "EXTERN" ) ; List childNodes = XmlUtils . newXPath ( "io:check" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { node . removeChild ( ( Node ) childItem ) ; } }


signature:
public class OpenImmo_1_2_4 { /** * Remove unsupported children from all & lt ; interessent & gt ; elements in
 * feedback XML .
 * OpenImmo 1.2.3 does not support more then one & lt ; bevorzugt & gt ; ,
 * & lt ; wunsch & gt ; elements in feedback XML .
 * @ param doc OpenImmo document in version 1.2.4
 * @ throws JaxenException if xpath evaluation failed */
@ SuppressWarnings ( "Duplicates" ) protected void removeFeedbackInteressentChildElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:openimmo_feedback/io:objekt/io:interessent" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element parentNode = ( Element ) item ; boolean bevorzugtPassed = false ; boolean wunschPassed = false ; List childNodes = XmlUtils . newXPath ( "io:bevorzugt" , doc ) . selectNodes ( parentNode ) ; for ( Object childItem : childNodes ) { Element node = ( Element ) childItem ; if ( ! bevorzugtPassed ) bevorzugtPassed = true ; else parentNode . removeChild ( node ) ; } childNodes = XmlUtils . newXPath ( "io:wunsch" , doc ) . selectNodes ( parentNode ) ; for ( Object childItem : childNodes ) { Element node = ( Element ) childItem ; if ( ! wunschPassed ) wunschPassed = true ; else parentNode . removeChild ( node ) ; } }


signature:
public class OpenImmo_1_2_4 { /** * Upgrade & lt ; anhang & gt ; elements to OpenImmo 1.2.4.
 * The option " REMOTE " for the " location " attribute of & lt ; anhang & gt ; elements
 * is introduced with OpenImmo 1.2.4.
 * If the & lt ; pfad & gt ; element of an & lt ; anhang & gt ; element contains an URL
 * ( beginning with " http : / / " / " https : / / " / " ftp : / / " / " ftps : / / " ) , the value
 * of the " location " attribute is changed to " REMOTE " .
 * @ param doc OpenImmo document in version 1.2.3
 * @ throws JaxenException if xpath evaluation failed */
protected void upgradeAnhangElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:anhang/io:daten/io:pfad | " + "/io:openimmo/io:anbieter/io:immobilie/io:anhaenge/io:anhang/io:daten/io:pfad" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) . getParentNode ( ) ; String value = StringUtils . trimToEmpty ( node . getTextContent ( ) ) . toLowerCase ( ) ; if ( value . startsWith ( "http://" ) ) parentNode . setAttribute ( "location" , "REMOTE" ) ; else if ( value . startsWith ( "https://" ) ) parentNode . setAttribute ( "location" , "REMOTE" ) ; else if ( value . startsWith ( "ftp://" ) ) parentNode . setAttribute ( "location" , "REMOTE" ) ; else if ( value . startsWith ( "ftps://" ) ) parentNode . setAttribute ( "location" , "REMOTE" ) ; }


signature:
public class OpenImmo_1_2_4 { /** * Upgrade & lt ; anzahl _ balkon _ terrassen & gt ; elements to OpenImmo 1.2.4.
 * The & lt ; anzahl _ balkon _ terrassen & gt ; is not supported anymore in version
 * 1.2.4 . The element is replaced by & lt ; anzahl _ balkone & gt ; and
 * & lt ; anzahl _ terrassen & gt ; .
 * Any & lt ; anzahl _ balkon _ terrassen & gt ; element is removed . Its content is
 * copied into & lt ; anzahl _ balkone & gt ; , if this element is not already present .
 * @ param doc OpenImmo document in version 1.2.3
 * @ throws JaxenException if xpath evaluation failed */
protected void upgradeAnzahlBalkonTerrassenElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:flaechen/io:anzahl_balkon_terrassen" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; String value = StringUtils . trimToNull ( node . getTextContent ( ) ) ; if ( value != null ) { Element newNode = ( Element ) XmlUtils . newXPath ( "io:anzahl_balkone" , doc ) . selectSingleNode ( parentNode ) ; if ( newNode == null ) { newNode = doc . createElementNS ( StringUtils . EMPTY , "anzahl_balkone" ) ; newNode . setTextContent ( value ) ; parentNode . appendChild ( newNode ) ; } else if ( StringUtils . isBlank ( newNode . getTextContent ( ) ) ) { newNode . setTextContent ( value ) ; } } parentNode . removeChild ( node ) ; }


signature:
public class OpenImmo_1_2_4 { /** * Upgrade & lt ; sonstige & gt ; elements to OpenImmo 1.2.4.
 * The options " GARAGEN " , " PARKFLACHE " for the " sonstige _ typ " attribute of
 * & lt ; sonstige & gt ; elements were removed with OpenImmo 1.2.4.
 * For any occurence of these values the corresponding & lt ; sonstige & gt ;
 * element is replaced with a & lt ; parken & gt ; element .
 * @ param doc OpenImmo document in version 1.2.3
 * @ throws JaxenException if xpath evaluation failed */
protected void upgradeSonstigeElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:sonstige[@sonstige_typ]" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; String value = StringUtils . trimToNull ( node . getAttribute ( "sonstige_typ" ) ) ; if ( "GARAGEN" . equalsIgnoreCase ( value ) || "PARKFLACHE" . equalsIgnoreCase ( value ) ) { Element parentNode = ( Element ) node . getParentNode ( ) ; parentNode . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "parken" ) ; newNode . setAttribute ( "parken_typ" , "STELLPLATZ" ) ; parentNode . appendChild ( newNode ) ; } }


signature:
public class Parken { /** * Sets the value of the parkenTyp property .
 * @ param value
 * allowed object is
 * { @ link Parken . ParkenTyp } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setParkenTyp ( Parken . ParkenTyp value ) { } }

implementation: this . parkenTyp = value ;


signature:
public class Foto { /** * Sets the value of the location property .
 * @ param value
 * allowed object is
 * { @ link Foto . Location } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setLocation ( Foto . Location value ) { } }

implementation: this . location = value ;


signature:
public class OpenImmoFeedbackDocument { /** * Creates a { @ link OpenImmoFeedbackDocument } from a
 * { @ link OpenimmoFeedback } object .
 * @ param feedback Java object , that represents the & lt ; openimmo _ feedback & gt ; root element
 * @ return created document
 * @ throws ParserConfigurationException if the parser is not properly configured
 * @ throws JAXBException if a problem with JAXB occurred */
public static OpenImmoFeedbackDocument newDocument ( OpenimmoFeedback feedback ) throws ParserConfigurationException , JAXBException { } }

implementation: if ( StringUtils . isBlank ( feedback . getVersion ( ) ) ) feedback . setVersion ( OpenImmoUtils . VERSION . toReadableVersion ( ) ) ; Document document = XmlUtils . newDocument ( ) ; OpenImmoUtils . createMarshaller ( "UTF-8" , true ) . marshal ( feedback , document ) ; return new OpenImmoFeedbackDocument ( document ) ;


signature:
public class OpenImmoFeedbackDocument { /** * Creates a { @ link OpenimmoFeedback } object from the contained
 * { @ link Document } .
 * @ return created object , that represents the & lt ; openimmo _ feedback & gt ; root element
 * @ throws JAXBException if a problem with JAXB occurred */
@ Override public OpenimmoFeedback toObject ( ) throws JAXBException { } }

implementation: this . upgradeToLatestVersion ( ) ; return ( OpenimmoFeedback ) OpenImmoUtils . createUnmarshaller ( ) . unmarshal ( this . getDocument ( ) ) ;


signature:
public class KyeroDocument { /** * Creates a { @ link KyeroDocument } from a { @ link Root } object .
 * @ param root Java object , that represents the & lt ; root & gt ; root element
 * @ return created document
 * @ throws ParserConfigurationException if the parser is not properly configured
 * @ throws JAXBException if a problem with JAXB occurred */
public static KyeroDocument newDocument ( Root root ) throws ParserConfigurationException , JAXBException { } }

implementation: if ( root . getKyero ( ) == null ) root . setKyero ( KyeroUtils . getFactory ( ) . createKyeroType ( ) ) ; if ( StringUtils . isBlank ( root . getKyero ( ) . getFeedVersion ( ) ) ) root . getKyero ( ) . setFeedVersion ( KyeroUtils . VERSION . toXmlVersion ( ) ) ; Document document = XmlUtils . newDocument ( ) ; KyeroUtils . createMarshaller ( "UTF-8" , true ) . marshal ( root , document ) ; return new KyeroDocument ( document ) ;


signature:
public class KyeroDocument { /** * Creates a { @ link Root } object from the contained { @ link Document } .
 * @ return created object , that represents the & lt ; root & gt ; root element
 * @ throws JAXBException if a problem with JAXB occurred */
@ Override public Root toObject ( ) throws JAXBException { } }

implementation: this . upgradeToLatestVersion ( ) ; return ( Root ) KyeroUtils . createUnmarshaller ( ) . unmarshal ( this . getDocument ( ) ) ;


signature:
public class Alter { /** * Sets the value of the alterAttr property .
 * @ param value
 * allowed object is
 * { @ link Alter . AlterAttr } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setAlterAttr ( Alter . AlterAttr value ) { } }

implementation: this . alterAttr = value ;


signature:
public class KyeroUtils { /** * Creates a { @ link KyeroDocument } from a { @ link Document } .
 * @ param doc XML document
 * @ return created document or null , of the document is not supported by this format */
public static KyeroDocument createDocument ( Document doc ) { } }

implementation: if ( KyeroDocument . isReadable ( doc ) ) return new KyeroDocument ( doc ) ; else return null ;


signature:
public class FreizeitimmobilieGewerblich { /** * Sets the value of the freizeitTyp property .
 * @ param value
 * allowed object is
 * { @ link FreizeitimmobilieGewerblich . FreizeitTyp } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setFreizeitTyp ( FreizeitimmobilieGewerblich . FreizeitTyp value ) { } }

implementation: this . freizeitTyp = value ;


signature:
public class TelSonstige { /** * Sets the value of the telefonart property .
 * @ param value
 * allowed object is
 * { @ link TelSonstige . Telefonart } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setTelefonart ( TelSonstige . Telefonart value ) { } }

implementation: this . telefonart = value ;


signature:
public class ImmoXmlReadingExample { /** * Read a { @ link InputStream } into an { @ link ImmoXmlDocument } and print some
 * of its content to console .
 * @ param xmlInputStream the input stream to read
 * @ throws SAXException if the file is not readable by the XML parser
 * @ throws IOException if the file is not readable
 * @ throws ParserConfigurationException if the XML parser is improperly configured
 * @ throws JAXBException if XML conversion into Java objects failed */
protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { } }

implementation: LOGGER . info ( "process example file" ) ; ImmoXmlDocument doc = ImmoXmlUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; }


signature:
public class ImmoXmlReadingExample { /** * Print some content of an { @ link ImmoXmlDocument } to console .
 * @ param doc the document to process
 * @ throws JAXBException if XML conversion into Java objects failed */
@ SuppressWarnings ( "Duplicates" ) protected static void printToConsole ( ImmoXmlDocument doc ) throws JAXBException { } }

implementation:
LOGGER . info ( "> process document in version " + doc . getDocumentVersion ( ) ) ; Immoxml immoxml = doc . toObject ( ) ; // process agencies in the document
for ( Anbieter anbieter : immoxml . getAnbieter ( ) ) { LOGGER . info ( ">> found agency '" + anbieter . getAnbieternr ( ) + "'" ) ; // process real estates of the agency
for ( Immobilie immobilie : anbieter . getImmobilie ( ) ) { // get object nr
String objectNr = ( immobilie . getVerwaltungTechn ( ) != null ) ? immobilie . getVerwaltungTechn ( ) . getObjektnrIntern ( ) : "???" ; // get object title
String objectTitle = ( immobilie . getFreitexte ( ) != null ) ? immobilie . getFreitexte ( ) . getObjekttitel ( ) : "???" ; // print object information to console
LOGGER . info ( ">>> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; } }


signature:
public class EmailSonstige { /** * Sets the value of the emailart property .
 * @ param value
 * allowed object is
 * { @ link EmailSonstige . Emailart } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setEmailart ( EmailSonstige . Emailart value ) { } }

implementation: this . emailart = value ;


signature:
public class Is24CsvParser { /** * Creates a record , according to the object category , that is provided in
 * a { @ link CSVRecord } .
 * @ param record the record to process
 * @ return created record or null , if no matching record was found */
public static Is24CsvRecord createRecord ( CSVRecord record ) { } }

implementation:
Immobilienart art = Is24CsvRecord . getImmobilienart ( record ) ; if ( Immobilienart . ANLAGE . equals ( art ) ) return Anlageobjekt . newRecord ( record ) ; else if ( Immobilienart . GEWERBE_BUERO_PRAXEN . equals ( art ) ) return GewerbeBueroPraxis . newRecord ( record ) ; else if ( Immobilienart . GEWERBE_EINZELHANDEL . equals ( art ) ) return GewerbeEinzelhandel . newRecord ( record ) ; else if ( Immobilienart . GEWERBE_GASTRONOMIE_HOTEL . equals ( art ) ) return GewerbeGastronomieHotel . newRecord ( record ) ; else if ( Immobilienart . GEWERBE_HALLE_PRODUKTION . equals ( art ) ) return GewerbeHalleProduktion . newRecord ( record ) ; else if ( Immobilienart . GEWERBE_SONSTIGES . equals ( art ) ) return GewerbeSonstiges . newRecord ( record ) ; else if ( Immobilienart . HAUS_KAUF . equals ( art ) ) return HausKauf . newRecord ( record ) ; else if ( Immobilienart . HAUS_MIETE . equals ( art ) ) return HausMiete . newRecord ( record ) ; else if ( Immobilienart . STELLPLATZ_KAUF . equals ( art ) ) return StellplatzKauf . newRecord ( record ) ; else if ( Immobilienart . STELLPLATZ_MIETE . equals ( art ) ) return StellplatzMiete . newRecord ( record ) ; else if ( Immobilienart . WOHNEN_AUF_ZEIT . equals ( art ) ) return WohnenAufZeit . newRecord ( record ) ; else if ( Immobilienart . WOHNUNG_KAUF . equals ( art ) ) return WohnungKauf . newRecord ( record ) ; else if ( Immobilienart . WOHNUNG_MIETE . equals ( art ) ) return WohnungMiete . newRecord ( record ) ; // Immobilienart für Grundstücke wird abhängig zur Objektkategorie erzeugt
else if ( Immobilienart . GRUNDSTUECKE . equals ( art ) ) { ObjektkategorieGrundstueck cat = Grundstueck . getObjektkategorie ( record ) ; if ( ObjektkategorieGrundstueck . WOHNEN . equals ( cat ) ) return GrundstueckWohnen . newRecord ( record ) ; else return GrundstueckGewerbe . newRecord ( record ) ; } LOGGER . warn ( "Unsupported 'Immobilienart' value: " + record . get ( Is24CsvRecord . FIELD_IMMOBILIENART ) ) ; return null ;


signature:
public class Daft { /** * Sets the value of the overseasSales property .
 * @ param value
 * allowed object is
 * { @ link Daft . OverseasSales } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setOverseasSales ( Daft . OverseasSales value ) { } }

implementation: this . overseasSales = value ;


signature:
public class Daft { /** * Sets the value of the overseasRental property .
 * @ param value
 * allowed object is
 * { @ link Daft . OverseasRental } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setOverseasRental ( Daft . OverseasRental value ) { } }

implementation: this . overseasRental = value ;


signature:
public class OpenImmoUtils { /** * Creates a { @ link OpenImmoDocument } from an { @ link InputStream } .
 * @ param input XML input
 * @ return created document or null , of the document is not supported by this format
 * @ throws SAXException if XML is invalid
 * @ throws IOException if reading failed
 * @ throws ParserConfigurationException if the parser is not properly configured */
public static OpenImmoDocument createDocument ( InputStream input ) throws SAXException , IOException , ParserConfigurationException { } }

implementation: return createDocument ( XmlUtils . newDocument ( input , true ) ) ;


signature:
public class OpenImmoUtils { /** * Creates a { @ link OpenImmoDocument } from a { @ link File } .
 * @ param xmlFile XML file
 * @ return created document or null , of the document is not supported by this format
 * @ throws SAXException if XML is invalid
 * @ throws IOException if reading failed
 * @ throws ParserConfigurationException if the parser is not properly configured */
public static OpenImmoDocument createDocument ( File xmlFile ) throws SAXException , IOException , ParserConfigurationException { } }

implementation: return createDocument ( XmlUtils . newDocument ( xmlFile , true ) ) ;


signature:
public class OpenImmoUtils { /** * Creates a { @ link OpenImmoDocument } from a { @ link String } .
 * @ param xmlString XML string
 * @ return created document or null , of the document is not supported by this format
 * @ throws SAXException if XML is invalid
 * @ throws IOException if reading failed
 * @ throws ParserConfigurationException if the parser is not properly configured */
public static OpenImmoDocument createDocument ( String xmlString ) throws SAXException , IOException , ParserConfigurationException { } }

implementation: return createDocument ( XmlUtils . newDocument ( xmlString , true ) ) ;


signature:
public class OpenImmoUtils { /** * Creates a { @ link OpenImmoDocument } from a { @ link Document } .
 * @ param doc XML document
 * @ return created document or null , of the document is not supported by this format */
public static OpenImmoDocument createDocument ( Document doc ) { } }

implementation: if ( OpenImmoTransferDocument . isReadable ( doc ) ) return new OpenImmoTransferDocument ( doc ) ; else if ( OpenImmoFeedbackDocument . isReadable ( doc ) ) return new OpenImmoFeedbackDocument ( doc ) ; else return null ;


signature:
public class OpenImmoUtils { /** * Helper method to create a & lt ; user _ defined _ simplefield & gt ; element with a
 * " feldname " attribute and a string value .
 * @ param doc document , for which the element is created
 * @ param name value of the " feldname " attribute in the created element
 * @ param value text value of the created element
 * @ return created element */
@ SuppressWarnings ( "Duplicates" ) public static Element createUserDefinedSimplefield ( Document doc , String name , String value ) { } }

implementation: Element root = XmlUtils . getRootElement ( doc ) ; Element node = doc . createElementNS ( root . getNamespaceURI ( ) , "user_defined_simplefield" ) ; node . setAttribute ( "feldname" , name ) ; node . setTextContent ( value ) ; return node ;


signature:
public class Fehlerliste { /** * Gets the value of the fehler property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the fehler property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getFehler ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link Fehlerliste . Fehler } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < Fehlerliste . Fehler > getFehler ( ) { } }

implementation: if ( fehler == null ) { fehler = new ArrayList < Fehlerliste . Fehler > ( ) ; } return this . fehler ;


signature:
public class VermarktungGrundstueckGewerbeTyp { /** * Sets the value of the erbpacht property .
 * @ param value
 * allowed object is
 * { @ link JAXBElement } { @ code < } { @ link VermarktungGrundstueckGewerbeTyp . Erbpacht } { @ code > } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public void setErbpacht ( JAXBElement < VermarktungGrundstueckGewerbeTyp . Erbpacht > value ) { } }

implementation: this . erbpacht = value ;


signature:
public class VermarktungGrundstueckGewerbeTyp { /** * Sets the value of the miete property .
 * @ param value
 * allowed object is
 * { @ link JAXBElement } { @ code < } { @ link VermarktungGrundstueckGewerbeTyp . Miete } { @ code > } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public void setMiete ( JAXBElement < VermarktungGrundstueckGewerbeTyp . Miete > value ) { } }

implementation: this . miete = value ;


signature:
public class FilemakerReadingExample { /** * Read a { @ link File } into a { @ link FilemakerResultDocument } or
 * { @ link FilemakerLayoutDocument } and print some of their content to
 * console .
 * @ param xmlFile the file to read
 * @ throws SAXException if the file is not readable by the XML parser
 * @ throws IOException if the file is not readable
 * @ throws ParserConfigurationException if the XML parser is improperly configured
 * @ throws JAXBException if XML conversion into Java objects failed */
@ SuppressWarnings ( "Duplicates" ) protected static void read ( File xmlFile ) throws SAXException , IOException , ParserConfigurationException , JAXBException { } }

implementation: LOGGER . info ( "process file: " + xmlFile . getAbsolutePath ( ) ) ; if ( ! xmlFile . isFile ( ) ) { LOGGER . warn ( "> provided file is invalid" ) ; return ; } FilemakerDocument doc = FilemakerUtils . createDocument ( xmlFile ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else if ( doc . isResult ( ) ) { printToConsole ( ( FilemakerResultDocument ) doc ) ; } else if ( doc . isLayout ( ) ) { printToConsole ( ( FilemakerLayoutDocument ) doc ) ; } else { LOGGER . warn ( "> unsupported type of document: " + doc . getClass ( ) . getName ( ) ) ; }


signature:
public class FilemakerReadingExample { /** * Read a { @ link InputStream } into a { @ link FilemakerResultDocument } or
 * { @ link FilemakerLayoutDocument } and print some of their content to
 * console .
 * @ param xmlInputStream the input stream to read
 * @ throws SAXException if the file is not readable by the XML parser
 * @ throws IOException if the file is not readable
 * @ throws ParserConfigurationException if the XML parser is improperly configured
 * @ throws JAXBException if XML conversion into Java objects failed */
@ SuppressWarnings ( "Duplicates" ) protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { } }

implementation: LOGGER . info ( "process example file" ) ; FilemakerDocument doc = FilemakerUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else if ( doc . isResult ( ) ) { printToConsole ( ( FilemakerResultDocument ) doc ) ; } else if ( doc . isLayout ( ) ) { printToConsole ( ( FilemakerLayoutDocument ) doc ) ; } else { LOGGER . warn ( "> unsupported type of document: " + doc . getClass ( ) . getName ( ) ) ; }


signature:
public class FilemakerReadingExample { /** * Print some content of a { @ link FilemakerLayoutDocument } to console .
 * @ param doc the document to process
 * @ throws JAXBException if XML conversion into Java objects failed */
protected static void printToConsole ( FilemakerLayoutDocument doc ) throws JAXBException { } }

implementation: LOGGER . info ( "> process layout document" ) ; FMPXMLLAYOUT layout = doc . toObject ( ) ; LOGGER . info ( "> error code      : " + layout . getERRORCODE ( ) ) ; if ( layout . getPRODUCT ( ) != null ) { LOGGER . info ( "> product name    : " + layout . getPRODUCT ( ) . getNAME ( ) ) ; LOGGER . info ( "> product version : " + layout . getPRODUCT ( ) . getVERSION ( ) ) ; LOGGER . info ( "> product build   : " + layout . getPRODUCT ( ) . getBUILD ( ) ) ; } if ( layout . getLAYOUT ( ) != null ) { LOGGER . info ( "> database name   : " + layout . getLAYOUT ( ) . getDATABASE ( ) ) ; LOGGER . info ( "> database layout : " + layout . getLAYOUT ( ) . getNAME ( ) ) ; for ( LayoutType . FIELD field : layout . getLAYOUT ( ) . getFIELD ( ) ) { LOGGER . info ( "> database field  : " + field . getNAME ( ) + " / " + field . getSTYLE ( ) . getTYPE ( ) + " / " + field . getSTYLE ( ) . getVALUELIST ( ) ) ; } } if ( layout . getVALUELISTS ( ) != null ) { for ( ValueListsType . VALUELIST valueList : layout . getVALUELISTS ( ) . getVALUELIST ( ) ) { LOGGER . info ( "> database values : " + valueList . getNAME ( ) ) ; for ( String value : valueList . getVALUE ( ) ) { LOGGER . info ( ">> " + value ) ; } } }


signature:
public class FilemakerReadingExample { /** * Print some content of a { @ link FilemakerResultDocument } to console .
 * @ param doc the document to process
 * @ throws JAXBException if XML conversion into Java objects failed */
protected static void printToConsole ( FilemakerResultDocument doc ) throws JAXBException { } }

implementation: LOGGER . info ( "> process result document" ) ; FMPXMLRESULT result = doc . toObject ( ) ; LOGGER . info ( "> error code       : " + result . getERRORCODE ( ) ) ; if ( result . getPRODUCT ( ) != null ) { LOGGER . info ( "> product name     : " + result . getPRODUCT ( ) . getNAME ( ) ) ; LOGGER . info ( "> product version  : " + result . getPRODUCT ( ) . getVERSION ( ) ) ; LOGGER . info ( "> product build    : " + result . getPRODUCT ( ) . getBUILD ( ) ) ; } if ( result . getDATABASE ( ) != null ) { LOGGER . info ( "> database name    : " + result . getDATABASE ( ) . getNAME ( ) ) ; LOGGER . info ( "> database layout  : " + result . getDATABASE ( ) . getLAYOUT ( ) ) ; LOGGER . info ( "> database date    : " + result . getDATABASE ( ) . getDATEFORMAT ( ) ) ; LOGGER . info ( "> database time    : " + result . getDATABASE ( ) . getTIMEFORMAT ( ) ) ; LOGGER . info ( "> database records : " + result . getDATABASE ( ) . getRECORDS ( ) ) ; } if ( result . getMETADATA ( ) != null ) { for ( MetaDataType . FIELD field : result . getMETADATA ( ) . getFIELD ( ) ) { LOGGER . info ( "> database field   : " + field . getNAME ( ) ) ; LOGGER . info ( ">> type : " + field . getTYPE ( ) ) ; LOGGER . info ( ">> max repeat : " + field . getMAXREPEAT ( ) ) ; } } if ( result . getRESULTSET ( ) != null ) { LOGGER . info ( "> result set found  : " + result . getRESULTSET ( ) . getFOUND ( ) ) ; for ( ResultSetType . ROW row : result . getRESULTSET ( ) . getROW ( ) ) { LOGGER . info ( "> result set row    : " + row . getRECORDID ( ) + " / " + row . getMODID ( ) ) ; for ( ResultSetType . ROW . COL col : row . getCOL ( ) ) { for ( String data : col . getDATA ( ) ) { LOGGER . info ( ">> " + data ) ; } } } }


signature:
public class Preise { /** * Gets the value of the stpSonstige property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the stpSonstige property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getStpSonstige ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link StpSonstige } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < StpSonstige > getStpSonstige ( ) { } }

implementation: if ( stpSonstige == null ) { stpSonstige = new ArrayList < StpSonstige > ( ) ; } return this . stpSonstige ;


signature:
public class ValueListsType { /** * Gets the value of the valuelist property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the valuelist property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getVALUELIST ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link ValueListsType . VALUELIST } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:42:33+02:00" , comments = "JAXB RI v2.2.11" ) public List < ValueListsType . VALUELIST > getVALUELIST ( ) { } }

implementation: if ( valuelist == null ) { valuelist = new ArrayList < ValueListsType . VALUELIST > ( ) ; } return this . valuelist ;


signature:
public class MinMietdauer { /** * Sets the value of the minDauer property .
 * @ param value
 * allowed object is
 * { @ link MinMietdauer . MinDauer } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setMinDauer ( MinMietdauer . MinDauer value ) { } }

implementation: this . minDauer = value ;


signature:
public class ZinshausRenditeobjekt { /** * Sets the value of the zinsTyp property .
 * @ param value
 * allowed object is
 * { @ link ZinshausRenditeobjekt . ZinsTyp } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setZinsTyp ( ZinshausRenditeobjekt . ZinsTyp value ) { } }

implementation: this . zinsTyp = value ;


signature:
public class PhotosType { /** * Gets the value of the photo property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the photo property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getPhoto ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link String } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public List < URI > getPhoto ( ) { } }

implementation: if ( photo == null ) { photo = new ArrayList < URI > ( ) ; } return this . photo ;


signature:
public class WisItReadingExample { /** * Read a { @ link InputStream } into a { @ link WisItDocument } and print some of
 * its content to console .
 * @ param xmlInputStream the input stream to read
 * @ throws SAXException if the file is not readable by the XML parser
 * @ throws IOException if the file is not readable
 * @ throws ParserConfigurationException if the XML parser is improperly configured
 * @ throws JAXBException if XML conversion into Java objects failed */
protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { } }

implementation: LOGGER . info ( "process example file" ) ; WisItDocument doc = WisItUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; }


signature:
public class WisItReadingExample { /** * Print some content of a { @ link WisItDocument } to console .
 * @ param doc the document to process
 * @ throws JAXBException if XML conversion into Java objects failed */
protected static void printToConsole ( WisItDocument doc ) throws JAXBException { } }

implementation:
WIS wis = doc . toObject ( ) ; // process objects
if ( wis . getOBJEKTE ( ) != null ) { for ( ObjectType obj : wis . getOBJEKTE ( ) . getOBJEKT ( ) ) { // get object nr
String objectNr = StringUtils . trimToNull ( obj . getID ( ) ) ; if ( objectNr == null ) objectNr = "???" ; // get object description
String objectInfo = StringUtils . trimToNull ( obj . getINFODE ( ) ) ; if ( objectInfo == null ) objectInfo = obj . getINFOIT ( ) ; if ( objectInfo == null ) objectInfo = "???" ; // print object information to console
LOGGER . info ( "> found object '" + objectNr + "' " + "with title '" + objectInfo + "'" ) ; } }


signature:
public class Feed { /** * Sets the value of the metadata property .
 * @ param value
 * allowed object is
 * { @ link Feed . Metadata } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public void setMetadata ( Feed . Metadata value ) { } }

implementation: this . metadata = value ;


signature:
public class Feed { /** * Sets the value of the projects property .
 * @ param value
 * allowed object is
 * { @ link Feed . Projects } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public void setProjects ( Feed . Projects value ) { } }

implementation: this . projects = value ;


signature:
public class Feed { /** * Sets the value of the properties property .
 * @ param value
 * allowed object is
 * { @ link Feed . Properties } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public void setProperties ( Feed . Properties value ) { } }

implementation: this . properties = value ;


signature:
public class DaftIeWritingExample { /** * Start the example application .
 * @ param args command line arguments */
@ SuppressWarnings ( "Duplicates" ) public static void main ( String [ ] args ) { } }

implementation:
// init logging
PropertyConfigurator . configure ( DaftIeWritingExample . class . getResource ( PACKAGE + "/log4j.properties" ) ) ; // create a Daft object with some example data
// this object corresponds to the < daft > root element in XML
Daft daft = FACTORY . createDaft ( ) ; // append some example objects for rent to the Daft object
daft . setOverseasRental ( FACTORY . createDaftOverseasRental ( ) ) ; daft . getOverseasRental ( ) . getOverseasRentalAd ( ) . add ( createAdForRent ( ) ) ; daft . getOverseasRental ( ) . getOverseasRentalAd ( ) . add ( createAdForRent ( ) ) ; // append some example objects for sale to the Daft object
daft . setOverseasSales ( FACTORY . createDaftOverseasSales ( ) ) ; daft . getOverseasSales ( ) . getOverseasSaleAd ( ) . add ( createAdForSale ( ) ) ; daft . getOverseasSales ( ) . getOverseasSaleAd ( ) . add ( createAdForSale ( ) ) ; daft . getOverseasSales ( ) . getOverseasSaleAd ( ) . add ( createAdForSale ( ) ) ; // convert the Daft object into a XML document
DaftIeDocument doc = null ; try { doc = DaftIeDocument . newDocument ( daft ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't create XML document!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } // write XML document into a java . io . File
try { write ( doc , File . createTempFile ( "output-" , ".xml" ) ) ; } catch ( IOException ex ) { LOGGER . error ( "Can't create temporary file!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } // write XML document into a java . io . OutputStream
write ( doc , new NullOutputStream ( ) ) ; // write XML document into a java . io . Writer
write ( doc , new NullWriter ( ) ) ; // write XML document into a string and send it to the console
writeToConsole ( doc ) ;


signature:
public class DaftIeWritingExample { /** * Create an { @ link OverseasRentalAdType } with some example data .
 * @ return created example object */
@ SuppressWarnings ( "CatchMayIgnoreException" ) protected static OverseasRentalAdType createAdForRent ( ) { } }

implementation:
// create an example real estate for rent
OverseasRentalAdType ad = FACTORY . createOverseasRentalAdType ( ) ; ad . setAddress ( "Beispielstraße 123" ) ; ad . setAgentId ( "123" ) ; ad . setArea ( "Berlin" ) ; ad . setAvailableFrom ( Calendar . getInstance ( ) ) ; ad . setBathroomNumber ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setBedroomNumber ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setCableTelevision ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; ad . setCcEmail ( "test@openestate.org" ) ; ad . setCommercialType ( CommercialType . LAND ) ; ad . setContactName ( "Max Mustermann" ) ; ad . setCountry ( "DE" ) ; ad . setDescription ( "A description about the property." ) ; ad . setDishwasher ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; ad . setDoubleBeds ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setDryer ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; ad . setExternalId ( String . valueOf ( RandomUtils . nextInt ( 1 , 1000 ) ) ) ; ad . setFurnished ( OverseasRentalAdType . Furnished . FURNISHED ) ; ad . setHouseType ( HouseType . TOWNHOUSE ) ; ad . setLease ( BigInteger . valueOf ( RandomUtils . nextInt ( 100 , 1000 ) ) ) ; ad . setMainEmail ( "test@openstate.org" ) ; ad . setMicrowave ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; ad . setNumberPeople ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setPhone1 ( "030/123456" ) ; ad . setPhone2 ( "030/123457" ) ; ad . setPhoneInfo ( "Some information about contacts via phone." ) ; ad . setPropertyType ( PropertyType . HOUSE ) ; ad . setRegion ( "Berlin" ) ; ad . setRent ( BigInteger . valueOf ( RandomUtils . nextInt ( 100 , 1000 ) ) ) ; ad . setRentCollectionPeriod ( OverseasRentalAdType . RentPeriod . MONTHLY ) ; ad . setSingleBeds ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setTwinBeds ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setWashingMachine ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; // add some features
ad . setFeatures ( FACTORY . createFeaturesType ( ) ) ; ad . getFeatures ( ) . getFeature ( ) . add ( "another feature" ) ; ad . getFeatures ( ) . getFeature ( ) . add ( "some more feature" ) ; // add some photos
ad . setPhotos ( FACTORY . createPhotosType ( ) ) ; try { ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image1.jpg" ) ) ; ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image2.jpg" ) ) ; ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image3.jpg" ) ) ; } catch ( URISyntaxException ex ) { } return ad ;


signature:
public class DaftIeWritingExample { /** * Create an { @ link OverseasRentalAdType } with some example data .
 * @ return created example object */
@ SuppressWarnings ( "CatchMayIgnoreException" ) protected static OverseasSaleAdType createAdForSale ( ) { } }

implementation:
// create an example real estate for sale
OverseasSaleAdType ad = FACTORY . createOverseasSaleAdType ( ) ; ad . setAcres ( BigDecimal . valueOf ( RandomUtils . nextDouble ( 10 , 1000 ) ) ) ; ad . setAddress ( "Beispielstraße 123" ) ; ad . setAgentId ( "123" ) ; ad . setArea ( "Berlin" ) ; ad . setBathroomNumber ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setBedroomNumber ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setCcEmail ( "test@openestate.org" ) ; ad . setCo2Rating ( "some notes about CO2 rating" ) ; ad . setCommercialType ( CommercialType . SHOP ) ; ad . setContactName ( "Max Mustermann" ) ; ad . setCountry ( "DE" ) ; ad . setDescription ( "A description about the property." ) ; ad . setDirections ( "some notes about directions" ) ; ad . setEnergyRating ( "some notes about energy rating" ) ; ad . setExternalId ( String . valueOf ( RandomUtils . nextInt ( 1 , 1000 ) ) ) ; ad . setHouseType ( HouseType . DETACHED ) ; ad . setIsNewDevelopment ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; ad . setMainEmail ( "test@openstate.org" ) ; ad . setNewDevelopmentAvailability ( "some notes about development" ) ; ad . setPhone1 ( "030/123456" ) ; ad . setPhone2 ( "030/123457" ) ; ad . setPhoneInfo ( "Some information about contacts via phone." ) ; ad . setPrice ( BigInteger . valueOf ( RandomUtils . nextInt ( 100 , 1000000 ) ) ) ; ad . setPriceType ( OverseasSaleAdType . PriceType . REGION ) ; ad . setPropertyStatus ( OverseasSaleAdType . PropertyStatus . FOR_SALE ) ; ad . setPropertyType ( PropertyType . HOUSE ) ; ad . setRegion ( "Berlin" ) ; ad . setSquareMetres ( BigDecimal . valueOf ( RandomUtils . nextDouble ( 10 , 1000 ) ) ) ; ad . setUnitsAvailable ( BigInteger . valueOf ( RandomUtils . nextInt ( 1 , 50 ) ) ) ; ad . setViewingDetails ( "some notes about viewing details" ) ; // add some features
ad . setFeatures ( FACTORY . createFeaturesType ( ) ) ; ad . getFeatures ( ) . getFeature ( ) . add ( "another feature" ) ; ad . getFeatures ( ) . getFeature ( ) . add ( "some more feature" ) ; // add some pdf documents
ad . setPdfs ( FACTORY . createPdfsType ( ) ) ; try { ad . getPdfs ( ) . getPdf ( ) . add ( new URI ( "http://www.mywebsite.org/document1.pdf" ) ) ; ad . getPdfs ( ) . getPdf ( ) . add ( new URI ( "http://www.mywebsite.org/document2.pdf" ) ) ; } catch ( URISyntaxException ex ) { } // add some photos
ad . setPhotos ( FACTORY . createPhotosType ( ) ) ; try { ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image1.jpg" ) ) ; ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image2.jpg" ) ) ; ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image3.jpg" ) ) ; } catch ( URISyntaxException ex ) { } return ad ;


signature:
public class DaftIeWritingExample { /** * Write a { @ link DaftIeDocument } into a { @ link File } .
 * @ param doc the document to write
 * @ param file the file , where the document is written to */
@ SuppressWarnings ( "Duplicates" ) protected static void write ( DaftIeDocument doc , File file ) { } }

implementation: LOGGER . info ( "writing document with version " + doc . getDocumentVersion ( ) ) ; try { doc . toXml ( file , PRETTY_PRINT ) ; LOGGER . info ( "> written to: " + file . getAbsolutePath ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't write document into a file!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; }


signature:
public class TrovitDocument { /** * Creates a { @ link TrovitDocument } from a { @ link Trovit } object .
 * @ param trovit Java object , that represents the & lt ; trovit & gt ; root element
 * @ return created document
 * @ throws ParserConfigurationException if the parser is not properly configured
 * @ throws JAXBException if a problem with JAXB occurred */
public static TrovitDocument newDocument ( Trovit trovit ) throws ParserConfigurationException , JAXBException { } }

implementation: Document document = XmlUtils . newDocument ( ) ; TrovitUtils . createMarshaller ( "UTF-8" , true ) . marshal ( trovit , document ) ; return new TrovitDocument ( document ) ;


signature:
public class Kyero_3 { /** * Downgrade a Kyero document from version 3.
 * @ param doc Kyero document in version 3 */
@ Override public void downgradeToPreviousVersion ( KyeroDocument doc ) { } }

implementation: doc . setDocumentVersion ( KyeroVersion . V2_1 ) ; try { this . downgradeNewBuildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <new_build> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeTypeElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <type> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeUrlElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <url> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeLocationElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove <location> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeEnergyRatingElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove <energy_rating> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeNotesElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove <notes> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeUnsupportedLanguageElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported translation elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; }


signature:
public class Kyero_3 { /** * Upgrade a Kyero document to version 3.
 * @ param doc Kyero document in version 2.1 */
@ Override public void upgradeFromPreviousVersion ( KyeroDocument doc ) { } }

implementation: doc . setDocumentVersion ( KyeroVersion . V3 ) ; try { this . removeCustomElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove <custom> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeNewBuildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <new_build> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeTypeElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <type> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeCurrencyElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <currency> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeUrlElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <url> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; }


signature:
public class Kyero_3 { /** * Downgrade & lt ; new _ build & gt ; elements to Kyero 2.1.
 * The & lt ; new _ build & gt ; elements are not available in version 2.1 . Instead
 * the value " new _ build " is used in the & lt ; price _ freq & gt ; element .
 * Any & lt ; new _ build & gt ; elements are removed . If its value is set to " 1 " ,
 * then & lt ; price _ freq & gt ; sale & lt ; / price _ freq & gt ; is converted to
 * & lt ; price _ freq & gt ; new _ build & lt ; / price _ freq & gt ; ,
 * @ param doc Kyero document in version 3
 * @ throws JaxenException if xpath evaluation failed */
protected void downgradeNewBuildElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:root/io:property/io:new_build" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; String value = StringUtils . trimToNull ( node . getTextContent ( ) ) ; if ( "1" . equals ( value ) ) { Element priceFreqNode = ( Element ) XmlUtils . newXPath ( "io:price_freq" , doc ) . selectSingleNode ( parentNode ) ; if ( priceFreqNode == null ) { priceFreqNode = doc . createElementNS ( KyeroUtils . NAMESPACE , "price_freq" ) ; priceFreqNode . setTextContent ( "new_build" ) ; parentNode . appendChild ( priceFreqNode ) ; } else if ( "sale" . equalsIgnoreCase ( priceFreqNode . getTextContent ( ) ) ) { priceFreqNode . setTextContent ( "new_build" ) ; } } parentNode . removeChild ( node ) ; }


signature:
public class Kyero_3 { /** * Downgrade & lt ; type & gt ; elements to Kyero 2.1.
 * The & lt ; type & gt ; elements require a & lt ; en & gt ; child element in version
 * 2.1.
 * An & lt ; en & gt ; child element is created for any & lt ; type & gt ; element .
 * @ param doc Kyero document in version 3
 * @ throws JaxenException if xpath evaluation failed */
protected void downgradeTypeElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:root/io:property/io:type" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; String value = StringUtils . trimToNull ( node . getTextContent ( ) ) ; node . setTextContent ( null ) ; Element childNode = doc . createElementNS ( KyeroUtils . NAMESPACE , "en" ) ; childNode . setTextContent ( value ) ; node . appendChild ( childNode ) ; }


signature:
public class Kyero_3 { /** * Downgrade & lt ; url & gt ; elements to Kyero 2.1.
 * The & lt ; url & gt ; elements only support a simple text value in version
 * 2.1 . Version 3 allows different URL ' s for different languages .
 * Any children of & lt ; url & gt ; elements are removed . The english URL or the
 * first found URL is copied as simple value into the & lt ; url & gt ; element .
 * @ param doc Kyero document in version 3
 * @ throws JaxenException if xpath evaluation failed */
@ SuppressWarnings ( "Duplicates" ) protected void downgradeUrlElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:root/io:property/io:url" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; String enUrlValue = null ; String fallbackUrlValue = null ; List childNodes = XmlUtils . newXPath ( "*" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Element langNode = ( Element ) childItem ; if ( "en" . equalsIgnoreCase ( langNode . getLocalName ( ) ) ) enUrlValue = StringUtils . trimToNull ( langNode . getTextContent ( ) ) ; else if ( fallbackUrlValue == null ) fallbackUrlValue = StringUtils . trimToNull ( langNode . getTextContent ( ) ) ; node . removeChild ( langNode ) ; } node . setTextContent ( ( enUrlValue != null ) ? enUrlValue : fallbackUrlValue ) ; }


signature:
public class Kyero_3 { /** * Remove elements with translations in unsupported languages .
 * Kyero 2.1 does only support translation in & lt ; title & gt ; ( for images ) ,
 * & lt ; desc & gt ; ( for properties ) elements for " en " , " es " , " de " , " nl " , " fr " .
 * @ param doc OpenImmo document in version 3
 * @ throws JaxenException if xpath evaluation failed */
protected void removeUnsupportedLanguageElements ( Document doc ) throws JaxenException { } }

implementation: String [ ] unsupportedLanguages = new String [ ] { "ar" , "bg" , "ca" , "cs" , "da" , "el" , "et" , "fa" , "fi" , "he" , "hi" , "hu" , "id" , "it" , "ja" , "ko" , "lt" , "lv" , "no" , "pl" , "pt" , "ro" , "ru" , "sk" , "sl" , "sv" , "th" , "tr" , "uk" , "vi" , "zh" , } ; List nodes = XmlUtils . newXPath ( "/io:root/io:property/io:desc | " + "/io:root/io:property/io:images/io:image/io:title" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; List childNodes = XmlUtils . newXPath ( "*" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Element langNode = ( Element ) childItem ; String lang = langNode . getLocalName ( ) . toLowerCase ( ) ; if ( ArrayUtils . contains ( unsupportedLanguages , lang ) ) { node . removeChild ( langNode ) ; } } }


signature:
public class Kyero_3 { /** * Upgrade & lt ; new _ build & gt ; elements for Kyero 3.
 * The & lt ; new _ build & gt ; elements are not available in version 2.1 . Instead
 * the value " new _ build " is used in the & lt ; price _ freq & gt ; element .
 * Any occurrences of & lt ; price _ freq & gt ; new _ build & lt ; / price _ freq & gt ; is
 * replaced by & lt ; price _ freq & gt ; sale & lt ; / price _ freq & gt ; and
 * & lt ; new _ build & gt ; 1 & lt ; / new _ build & gt ; is added to the property .
 * @ param doc Kyero document in version 2.1
 * @ throws JaxenException if xpath evaluation failed */
protected void upgradeNewBuildElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:root/io:property/io:price_freq" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; if ( ! "new_build" . equalsIgnoreCase ( node . getTextContent ( ) ) ) continue ; node . setTextContent ( "sale" ) ; Element newBuildNode = doc . createElementNS ( KyeroUtils . NAMESPACE , "new_build" ) ; newBuildNode . setTextContent ( "1" ) ; parentNode . appendChild ( newBuildNode ) ; }


signature:
public class WisItDocument { /** * Creates a { @ link WisItDocument } from a { @ link WIS } object .
 * @ param wis Java object , that represents the & lt ; WIS & gt ; root element
 * @ return created document
 * @ throws ParserConfigurationException if the parser is not properly configured
 * @ throws JAXBException if a problem with JAXB occurred */
public static WisItDocument newDocument ( WIS wis ) throws ParserConfigurationException , JAXBException { } }

implementation: if ( wis . getOBJEKTE ( ) == null ) wis . setOBJEKTE ( WisItUtils . getFactory ( ) . createWISOBJEKTE ( ) ) ; wis . getOBJEKTE ( ) . setANZAHL ( BigInteger . valueOf ( wis . getOBJEKTE ( ) . getOBJEKT ( ) . size ( ) ) ) ; Document document = XmlUtils . newDocument ( ) ; WisItUtils . createMarshaller ( "UTF-8" , true ) . marshal ( wis , document ) ; return new WisItDocument ( document ) ;


signature:
public class Is24CsvReadingExample { /** * Print some content of an { @ link Is24CsvParser } to console .
 * @ param parser parser instance */
protected static void printToConsole ( Is24CsvParser parser ) { } }

implementation:
// process records
while ( parser . hasNext ( ) ) { Is24CsvRecord record = parser . next ( ) ; // get object nr
String objectNr = record . getAnbieterObjektId ( ) ; if ( objectNr == null ) objectNr = "???" ; // get object title
String objectTitle = record . getUeberschrift ( ) ; if ( objectTitle == null ) objectTitle = "???" ; // print object information to console
LOGGER . info ( "> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; }


signature:
public class ImmobiliareItDocument { /** * Creates a { @ link ImmobiliareItDocument } from a { @ link Feed } object .
 * @ param feed Java object , that represents the & lt ; feed & gt ; root element
 * @ return created document
 * @ throws ParserConfigurationException if the parser is not properly configured
 * @ throws JAXBException if a problem with JAXB occurred */
public static ImmobiliareItDocument newDocument ( Feed feed ) throws ParserConfigurationException , JAXBException { } }

implementation: if ( feed . getVersion ( ) == null ) feed . setVersion ( Version . V2_5 ) ; Document document = XmlUtils . newDocument ( ) ; ImmobiliareItUtils . createMarshaller ( "UTF-8" , true ) . marshal ( feed , document ) ; return new ImmobiliareItDocument ( document ) ;


signature:
public class ImmobiliareItDocument { /** * Creates a { @ link Feed } object from the contained { @ link Document } .
 * @ return created object , that represents the & lt ; feed & gt ; root element
 * @ throws JAXBException if a problem with JAXB occurred */
@ Override public Feed toObject ( ) throws JAXBException { } }

implementation: this . upgradeToLatestVersion ( ) ; return ( Feed ) ImmobiliareItUtils . createUnmarshaller ( ) . unmarshal ( this . getDocument ( ) ) ;


signature:
public class OpenImmo_1_2_2 { /** * Downgrade an OpenImmo document from version 1.2.2 to 1.2.1.
 * @ param doc OpenImmo document in version 1.2.2 */
@ Override public void downgradeToPreviousVersion ( OpenImmoDocument doc ) { } }

implementation: doc . setDocumentVersion ( OpenImmoVersion . V1_2_1 ) ; if ( doc instanceof OpenImmoTransferDocument ) { try { this . downgradeUebertragungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <uebertragung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeVersteigerungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove <versteigerung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeProvisionspflichtigElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove <provisionspflichtig> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeAusstattungChildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported children of <ausstattung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeObjektartElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <objektart> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeEnergiepassElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <energiepass> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBodenElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <boden> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBefeuerungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <befeuerung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeWohnungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <wohnung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeHausElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <haus> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeGrundstueckElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <grundstueck> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBueroPraxenElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <buero_praxen> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeEinzelhandelElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <einzelhandel> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeGastgewerbeElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <gastgewerbe> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeHallenLagerProdElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <hallen_lager_prod> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeLandUndForstwirtschaftElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <land_und_forstwirtschaft> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeFreizeitimmobilieGewerblichElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <freizeitimmobilie_gewerblich> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } }


signature:
public class OpenImmo_1_2_2 { /** * Downgrade & lt ; objektart & gt ; elements to OpenImmo 1.2.1.
 * The & lt ; objektart & gt ; element does only allow the same type of child
 * element in version 1.2.1.
 * Any child type , that differs from the first child type , is removed .
 * @ param doc OpenImmo document in version 1.2.2
 * @ throws JaxenException if xpath evaluation failed */
protected void downgradeObjektartElements ( Document doc ) throws JaxenException { } }

implementation:
List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element parentNode = ( Element ) item ; String type = null ; List childNodes = XmlUtils . newXPath ( "*" , doc ) . selectNodes ( parentNode ) ; for ( Object childItem : childNodes ) { Element node = ( Element ) childItem ; if ( type == null ) { // LOGGER . debug ( " PRIMARY TYPE : " + node . getLocalName ( ) ) ;
type = node . getLocalName ( ) ; } else if ( ! type . equalsIgnoreCase ( node . getLocalName ( ) ) ) { // LOGGER . debug ( " REMOVE SECONDARY TYPE : " + node . getLocalName ( ) ) ;
parentNode . removeChild ( node ) ; } } }


signature:
public class OpenImmo_1_2_2 { /** * Upgrade & lt ; energiepass & gt ; elements to OpenImmo 1.2.2.
 * The & lt ; art & gt ; child element of the & lt ; energiepass & gt ; element is
 * renamed to & lt ; epart & gt ; in version 1.2.2.
 * @ param doc OpenImmo document in version 1.2.1
 * @ throws JaxenException if xpath evaluation failed */
protected void upgradeEnergiepassElements ( Document doc ) throws JaxenException { } }

implementation: List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:energiepass/io:art" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "epart" ) ; newNode . setTextContent ( node . getTextContent ( ) ) ; parentNode . replaceChild ( newNode , node ) ; }


signature:
public class Anbieter { /** * Gets the value of the immobilie property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the immobilie property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getImmobilie ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link Immobilie } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < Immobilie > getImmobilie ( ) { } }

implementation: if ( immobilie == null ) { immobilie = new ArrayList < Immobilie > ( ) ; } return this . immobilie ;


signature:
public class ImmoXmlUtils { /** * Creates a { @ link ImmoXmlDocument } from a { @ link Document } .
 * @ param doc XML document
 * @ return created document or null , of the document is not supported by this format */
public static ImmoXmlDocument createDocument ( Document doc ) { } }

implementation: if ( ImmoXmlDocument . isReadable ( doc ) ) return new ImmoXmlDocument ( doc ) ; else return null ;


signature:
public class OpenimmoFeedback { /** * Gets the value of the objekt property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the objekt property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getObjekt ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link Objekt } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < Objekt > getObjekt ( ) { } }

implementation: if ( objekt == null ) { objekt = new ArrayList < Objekt > ( ) ; } return this . objekt ;


signature:
public class OpenimmoFeedback { /** * Gets the value of the fehlerliste property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the fehlerliste property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getFehlerliste ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link Fehlerliste } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < Fehlerliste > getFehlerliste ( ) { } }

implementation: if ( fehlerliste == null ) { fehlerliste = new ArrayList < Fehlerliste > ( ) ; } return this . fehlerliste ;


signature:
public class OpenimmoFeedback { /** * Gets the value of the status property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the status property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getStatus ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link Status } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < Status > getStatus ( ) { } }

implementation: if ( status == null ) { status = new ArrayList < Status > ( ) ; } return this . status ;


signature:
public class Sonstige { /** * Sets the value of the sonstigeTyp property .
 * @ param value
 * allowed object is
 * { @ link Sonstige . SonstigeTyp } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setSonstigeTyp ( Sonstige . SonstigeTyp value ) { } }

implementation: this . sonstigeTyp = value ;


signature:
public class Distanzen { /** * Sets the value of the distanzZu property .
 * @ param value
 * allowed object is
 * { @ link Distanzen . DistanzZu } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setDistanzZu ( Distanzen . DistanzZu value ) { } }

implementation: this . distanzZu = value ;


signature:
public class Infrastruktur { /** * Gets the value of the distanzen property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the distanzen property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getDistanzen ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link Distanzen } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < Distanzen > getDistanzen ( ) { } }

implementation: if ( distanzen == null ) { distanzen = new ArrayList < Distanzen > ( ) ; } return this . distanzen ;


signature:
public class Infrastruktur { /** * Gets the value of the distanzenSport property .
 * This accessor method returns a reference to the live list ,
 * not a snapshot . Therefore any modification you make to the
 * returned list will be present inside the JAXB object .
 * This is why there is not a < CODE > set < / CODE > method for the distanzenSport property .
 * For example , to add a new item , do as follows :
 * < pre >
 * getDistanzenSport ( ) . add ( newItem ) ;
 * < / pre >
 * Objects of the following type ( s ) are allowed in the list
 * { @ link DistanzenSport } */
@ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < DistanzenSport > getDistanzenSport ( ) { } }

implementation: if ( distanzenSport == null ) { distanzenSport = new ArrayList < DistanzenSport > ( ) ; } return this . distanzenSport ;


signature: public class SimpleClient { public Response setnx ( Object key , Object val ) { } }

implementation: return req ( Cmd . setnx , bytes ( key ) , bytes ( val ) ) ;


signature:
public class SSDBs { /** * 指定配置生成一个单连接的客户端
 * @ param host 主机名
 * @ param port 端口
 * @ param timeout 超时设置 */
public static final SSDB simple ( String host , int port , int timeout ) { } }

implementation: return new SimpleClient ( host , port , timeout ) ;


signature:
public class SSDBs { /** * 指定配置生成一个使用连接池的客户端
 * @ param host 主机名
 * @ param port 端口
 * @ param timeout 超时设置
 * @ param config 连接池配置信息 , 如果为空 , 则使用默认值 */
public static final SSDB pool ( String host , int port , int timeout , Object config ) { } }

implementation: return pool ( host , port , timeout , config , null ) ;


signature:
public class SSDBs { /** * 指定配置生成一个使用连接池的客户端
 * @ param host 主机名
 * @ param port 端口
 * @ param timeout 超时设置
 * @ param config 连接池配置信息 , 如果为空 , 则使用默认值
 * @ param auth 鉴权信息 */
public static final SSDB pool ( String host , int port , int timeout , Object config , byte [ ] auth ) { } }

implementation: return new SimpleClient ( _pool ( host , port , timeout , config , auth ) ) ;


signature:
public class SSDBs { /** * 按指定配置生成master / slave且使用连接池的客户端
 * @ param masterHost 主服务器的主机名
 * @ param masterPort 主服务器的端口
 * @ param slaveHost 从服务器的主机名
 * @ param slavePort 从服务器的端口
 * @ param timeout 超时设置
 * @ param config 连接池配置信息 , 如果为空 , 则使用默认值 */
public static final SSDB replication ( String masterHost , int masterPort , String slaveHost , int slavePort , int timeout , Object config ) { } }

implementation: return replication ( masterHost , masterPort , slaveHost , slavePort , timeout , config , null , null ) ;


signature:
public class SSDBs { /** * 按指定配置生成master / slave且使用连接池的客户端
 * @ param masterHost 主服务器的主机名
 * @ param masterPort 主服务器的端口
 * @ param slaveHost 从服务器的主机名
 * @ param slavePort 从服务器的端口
 * @ param timeout 超时设置
 * @ param config 连接池配置信息 , 如果为空 , 则使用默认值
 * @ param masterAuth 主服务器的鉴权信息
 * @ param slaveAuth 副服务器的鉴权信息 */
public static final SSDB replication ( String masterHost , int masterPort , String slaveHost , int slavePort , int timeout , Object config , byte [ ] masterAuth , byte [ ] slaveAuth ) { } }

implementation: PoolSSDBStream master = _pool ( masterHost , masterPort , timeout , config , masterAuth ) ; PoolSSDBStream slave = _pool ( slaveHost , slavePort , timeout , config , slaveAuth ) ; return new SimpleClient ( new ReplicationSSDMStream ( master , slave ) ) ;


signature:
public class SSDBs { /** * 按ssdb的通信协议写入一个Block
 * < p > < / p > < b > 如果本方法抛异常 , 应立即关闭输出流 < / b >
 * @ param out 输出流
 * @ param data 需要写入数据块 , 如果为null , 则转为长度为0的byte [ ]
 * @ throws IOException 常规IO异常 */
public static void writeBlock ( OutputStream out , byte [ ] data ) throws IOException { } }

implementation: if ( data == null ) data = EMPTY_ARG ; out . write ( Integer . toString ( data . length ) . getBytes ( ) ) ; out . write ( '\n' ) ; out . write ( data ) ; out . write ( '\n' ) ;


signature:
public class SSDBs { /** * 向输出流发送一个命令及其参数
 * < p > < / p > < b > 如果本方法抛异常 , 应立即关闭输出流 < / b >
 * @ param out 输出流
 * @ param cmd 命令类型
 * @ param vals 命令的参数
 * @ throws IOException 常规IO异常 */
public static void sendCmd ( OutputStream out , Cmd cmd , byte [ ] ... vals ) throws IOException { } }

implementation: SSDBs . writeBlock ( out , cmd . bytes ( ) ) ; for ( byte [ ] bs : vals ) { SSDBs . writeBlock ( out , bs ) ; } out . write ( '\n' ) ; out . flush ( ) ;


signature:
public class SSDBs { /** * 从输入流读取一个响应
 * < p > < / p > < b > 如果本方法抛异常 , 应立即关闭输入流 < / b >
 * @ param in 输入流
 * @ return ssdb标准响应
 * @ throws IOException 常规IO异常
 * @ throws SSDBException 读取到非预期值的时候抛错协议错误 */
public static Response readResp ( InputStream in ) throws IOException { } }

implementation: Response resp = respFactory . make ( ) ; byte [ ] data = SSDBs . readBlock ( in ) ; if ( data == null ) throw new SSDBException ( "protocol error. unexpect \\n" ) ; resp . stat = new String ( data ) ; while ( true ) { data = SSDBs . readBlock ( in ) ; if ( data == null ) break ; resp . datas . add ( data ) ; } return resp ;


signature:
public class ReflectHelper { /** * 判断class是否实现了接口类
 * @ param clazz 要判断的类
 * @ param interfaceClass 接口类
 * @ return boolean */
public static boolean isContainsInterface ( Class < ? > clazz , Class < ? > interfaceClass ) { } }

implementation: Class < ? > [ ] interfaces = clazz . getInterfaces ( ) ; for ( int i = 0 ; i < interfaces . length ; i ++ ) { Class < ? > class1 = interfaces [ i ] ; if ( class1 == interfaceClass ) { return true ; } } return false ;


signature:
public class EntityHelper { /** * 获取该class所表示的父类的泛型数组 < br >
 * 例如如下定义中 :
 * < pre >
 * class GenericSuperClass & lt ; T & gt ; {
 * class GenericSubClass & lt ; String & gt ; {
 * public void doGetSuperGenericTypes ( ) {
 * EntityHelper . getGenericTypes ( getClass ( ) ) ;
 * < / pre >
 * 只用GenericSubClass中的方法调用才有效果
 * 2014年2月25日 下午5:45:49
 * @ param clazz
 * @ return */
public static Type [ ] getGenericTypes ( Class < ? > clazz ) { } }

implementation: Type mySuperClass = clazz . getGenericSuperclass ( ) ; System . out . println ( mySuperClass ) ; System . out . println ( mySuperClass . getClass ( ) ) ; Type [ ] types = ( ( ParameterizedType ) mySuperClass ) . getActualTypeArguments ( ) ; for ( int i = 0 ; i < types . length ; i ++ ) { Type type = types [ i ] ; System . out . println ( type ) ; } return types ;


signature:
public class EntityHelper { /** * 获取Class类的所有字段名 < br >
 * 2013-10-21 下午5:19:48
 * @ param clazz
 * @ return */
public static String [ ] getClassFields ( Class < ? > clazz ) { } }

implementation: Field [ ] fields = clazz . getDeclaredFields ( ) ; int length = fields . length ; String [ ] fieldNames = new String [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { Field field = fields [ i ] ; fieldNames [ i ] = field . getName ( ) ; } return fieldNames ;


signature:
public class EntityHelper { /** * 获取Class类的所有非静态字段名 < br >
 * 2013-10-21 下午5:19:48
 * @ param clazz
 * @ return */
public static Collection < String > getUnstaticClassFieldNameCollection ( Class < ? > clazz ) { } }

implementation: if ( clazz == null ) { throw new NullPointerException ( "传入的clazz为空对象！" ) ; } Field [ ] fields = clazz . getDeclaredFields ( ) ; int length = fields . length ; Collection < String > fieldNames = new ArrayList < String > ( ) ; for ( int i = 0 ; i < length ; i ++ ) { Field field = fields [ i ] ; if ( ! Modifier . isStatic ( field . getModifiers ( ) ) ) { fieldNames . add ( field . getName ( ) ) ; } } return fieldNames ;


signature:
public class EntityHelper { /** * 获取Class类的所有字段名 < br >
 * 2013-10-21 下午5:19:48
 * @ param clazz
 * @ return */
public static String [ ] getClassSimpleFields ( Class < ? > clazz ) { } }

implementation: Field [ ] fields = clazz . getDeclaredFields ( ) ; int length = fields . length ; Collection < Field > fieldCollection = new ArrayList < Field > ( ) ; for ( int i = 0 ; i < length ; i ++ ) { Field field = fields [ i ] ; if ( isSimpleType ( field ) ) { fieldCollection . add ( field ) ; } } String [ ] fieldNames = new String [ fieldCollection . size ( ) ] ; int i = 0 ; for ( Iterator iterator = fieldCollection . iterator ( ) ; iterator . hasNext ( ) ; ) { Field field = ( Field ) iterator . next ( ) ; fieldNames [ i ] = field . getName ( ) ; i ++ ; } return fieldNames ;


signature:
public class EntityHelper { /** * 根据get方法获取字段名
 * @ param method
 * @ return */
public static String getFieldNameByGetMethod ( Method method ) { } }

implementation: Assert . notNull ( method ) ; String methodName = method . getName ( ) ; EntityHelper . print ( methodName ) ; if ( methodName . startsWith ( "get" ) ) { String name = methodName . substring ( 3 , 4 ) . toLowerCase ( ) + methodName . substring ( 4 ) ; return name ; } return null ;


signature:
public class EntityHelper { /** * 获取Class类的单例 , 如果其他类不是使用的该方法 , 那么必定造成对象引用不一致 ! 因此一定要检查每个对象的构造方式是否一致都是使用本方法来构造 < br >
 * 2013-10-21 上午11:22:55
 * @ param clazz 类型
 * @ param args 构造函数的参数列表
 * @ return 单例对象
 * @ throws Exception 异常 */
public static final < T > T getSingleton ( Class < T > clazz , Object ... args ) throws Exception { } }

implementation: T instance = null ; synchronized ( LOCK ) { instance = ( T ) singletonMap . get ( clazz ) ; if ( instance == null ) { Constructor < ? > constructor = null ; try { constructor = getConstructor ( clazz , args ) ; } catch ( SecurityException e1 ) { } catch ( NoSuchMethodException e1 ) { } if ( constructor != null ) { try { instance = ( T ) constructor . newInstance ( args ) ; } catch ( IllegalArgumentException e ) { } catch ( InstantiationException e ) { } catch ( IllegalAccessException e ) { } catch ( InvocationTargetException e ) { e . printStackTrace ( ) ; } } if ( instance == null ) { Constructor < ? > [ ] constructors = clazz . getConstructors ( ) ; for ( int i = 0 ; i < constructors . length ; i ++ ) { Constructor < ? > constructorVar = constructors [ i ] ; try { instance = ( T ) constructorVar . newInstance ( args ) ; } catch ( IllegalArgumentException e ) { } catch ( InstantiationException e ) { } catch ( IllegalAccessException e ) { } catch ( InvocationTargetException e ) { } } } if ( instance == null ) { throw new NoSuchMethodException ( "无法初始化对象: " + clazz + "; 请检查传入的参数是否吻合" ) ; } } singletonMap . put ( clazz , instance ) ; } return instance ;


signature:
public class EntityHelper { /** * 根据传入的给予构造参数的传入值获取构造方法 < br >
 * 2013-10-21 上午11:03:13
 * @ param clazz 调用的类对象
 * @ param args 传入的参数
 * @ return 如果存在 , 则返回构造方法 , 如果不存在 , 则返回空
 * @ throws NoSuchMethodException
 * @ throws SecurityException */
public static Constructor < ? > getConstructor ( Class < ? > clazz , Object ... args ) throws SecurityException , NoSuchMethodException { } }

implementation: Constructor < ? > constructor = null ; int length = args . length ; Class < ? > [ ] classes = new Class < ? > [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { Object object = args [ i ] ; classes [ i ] = object . getClass ( ) ; } constructor = clazz . getConstructor ( classes ) ; return constructor ;


signature:
public class EntityHelper { /** * 根据Class类 、 方法名和传入的参数 , 获取对应的方法对象 < br >
 * 2013-10-21 下午4:49:19
 * @ param clazz Class类
 * @ param methodName 方法名
 * @ param args 参数
 * @ return Method */
public static Method getMethod ( Class < ? extends Object > clazz , String methodName , Object ... args ) throws SecurityException , NoSuchMethodException { } }

implementation: Method method = null ; int length = args . length ; Class < ? > [ ] classes = new Class < ? > [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { Object object = args [ i ] ; classes [ i ] = object . getClass ( ) ; } try { method = clazz . getDeclaredMethod ( methodName , classes ) ; } catch ( Exception e ) { } if ( method == null && args . length > 0 ) { Method [ ] methods = clazz . getDeclaredMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { Method methodVar = methods [ i ] ; Class < ? > [ ] types = methodVar . getParameterTypes ( ) ; boolean isThisMethod = false ; if ( types . length == args . length ) { isThisMethod = true ; for ( int j = 0 ; j < types . length && isThisMethod ; j ++ ) { Class < ? > type = types [ j ] ; Object parameter = args [ j ] ; if ( ! typeEquals ( type , parameter ) ) { isThisMethod = false ; } } } if ( isThisMethod ) { method = methodVar ; break ; } } } return method ;


signature:
public class EntityHelper { /** * 根据字段获取Class类的get方法 < br >
 * 2013-10-21 下午12:05:53
 * @ param clazz
 * @ param field
 * @ return */
public static Method getMethodOfBeanByField ( Class < ? > clazz , Field field ) { } }

implementation: Method method = prefixMethodOfBeanByField ( "get" , clazz , field ) ; if ( method == null && ( field . getType ( ) . equals ( Boolean . class ) || field . getType ( ) . equals ( boolean . class ) ) ) { method = prefixMethodOfBeanByField ( "is" , clazz , field ) ; } return method ;


signature:
public class EntityHelper { /** * 根据字段获取Class类的set方法 < br >
 * 2013-10-21 下午12:05:53
 * @ param clazz
 * @ param field
 * @ return */
public static Method setMethodOfBeanByField ( Class < ? > clazz , Field field ) { } }

implementation: return prefixMethodOfBeanByField ( "set" , clazz , field , field . getType ( ) ) ;


signature:
public class EntityHelper { /** * 根据字段获取Class类的set方法 < br >
 * 2013-10-21 下午12:05:53
 * @ param clazz
 * @ param field
 * @ return */
public static Method prefixMethodOfBeanByField ( String prefix , Class < ? > clazz , Field field , Class < ? > ... argTypes ) { } }

implementation: Method method = null ; String fieldName = field . getName ( ) ; StringBuilder builder = new StringBuilder ( prefix ) ; builder . append ( fieldName . substring ( 0 , 1 ) . toUpperCase ( ) ) ; builder . append ( fieldName . substring ( 1 , fieldName . length ( ) ) ) ; String methodName = builder . toString ( ) ; try { method = clazz . getDeclaredMethod ( methodName , argTypes ) ; } catch ( SecurityException e ) { } catch ( NoSuchMethodException e ) { } return method ;


signature:
public class EntityHelper { /** * 获取类的所有超类 < br >
 * 2013-9-15 下午8:16:21
 * @ return */
public static Collection < Class > getAllSuperClassesOfClass ( Class clazz ) { } }

implementation: Collection < Class > classes = new LinkedHashSet < Class > ( ) ; classes . add ( clazz ) ; Class superClass = clazz . getSuperclass ( ) ; while ( superClass != null ) { classes . add ( superClass ) ; superClass = superClass . getSuperclass ( ) ; } return classes ;


signature:
public class EntityHelper { /** * 简单的ToString方法 , 只会查找简单类型的数据 < br >
 * 2013-8-14 下午3:42:01
 * @ param object
 * @ return */
public static String simpleReflectToString ( Object object ) { } }

implementation: if ( object == null ) { return null ; } Class clazz = object . getClass ( ) ; Class superClazz = clazz . getSuperclass ( ) ; StringBuilder builder = new StringBuilder ( clazz . getName ( ) ) ; builder . append ( "@" ) ; builder . append ( Integer . toHexString ( object . hashCode ( ) ) ) ; builder . append ( "[" ) ; Method [ ] methods = clazz . getDeclaredMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { Method method = methods [ i ] ; if ( ! isSimpleType ( method . getReturnType ( ) ) ) { continue ; } String methodName = method . getName ( ) ; if ( methodName . startsWith ( "get" ) && ! Modifier . isStatic ( method . getModifiers ( ) ) && Modifier . isPublic ( method . getModifiers ( ) ) ) { try { Object value = method . invoke ( object ) ; String propertyName = methodName . substring ( 3 , 4 ) . toLowerCase ( ) + methodName . substring ( 4 ) ; builder . append ( propertyName ) ; builder . append ( "=" ) ; if ( value == null ) { builder . append ( "<null>" ) ; } else { if ( value . getClass ( ) . isArray ( ) ) { int arraysuperLength = Array . getLength ( value ) ; builder . append ( "{" ) ; for ( int j = 0 ; j < arraysuperLength ; j ++ ) { Object object2 = Array . get ( value , j ) ; builder . append ( object2 . toString ( ) ) ; if ( j < arraysuperLength - 1 ) { builder . append ( ", " ) ; } } builder . append ( "}" ) ; } else { builder . append ( value . toString ( ) ) ; } } builder . append ( ", " ) ; } catch ( IllegalArgumentException e ) { } catch ( IllegalAccessException e ) { } catch ( InvocationTargetException e ) { } } } if ( builder . toString ( ) . contains ( ", " ) ) { builder . replace ( builder . length ( ) - 2 , builder . length ( ) , "" ) ; } builder . append ( "]" ) ; return builder . toString ( ) ;


signature:
public class EntityHelper { /** * 比较两个数组
 * @ param one
 * @ param anotherOne
 * @ return */
public static boolean arrayEquals ( Object one , Object anotherOne ) { } }

implementation: if ( one == null || anotherOne == null ) { return false ; } else if ( ! one . getClass ( ) . equals ( anotherOne . getClass ( ) ) || ! one . getClass ( ) . isArray ( ) ) { return false ; } else if ( Array . getLength ( one ) != Array . getLength ( anotherOne ) ) { return false ; } return arrayHashCode ( one ) == arrayHashCode ( anotherOne ) ;


signature:
public class EntityHelper { /** * 根据类名获取首字母消息的名称 < br >
 * 2014年2月25日 下午3:25:46
 * @ param clazz
 * @ return */
public static String getClassToBeanName ( Class < ? > clazz ) { } }

implementation: String simpleName = clazz . getSimpleName ( ) ; String firstWord = simpleName . substring ( 0 , 1 ) . toLowerCase ( ) ; String otherWords = simpleName . substring ( 1 ) ; return firstWord + otherWords ;


signature:
public class ByteOrderMarkDetector { /** * Delegates to { @ link # detectCodepage ( java . io . InputStream , int ) } with a buffered input stream of size 10
 * ( 8 needed as maximum ) .
 * @ see ICodepageDetector # detectCodepage ( java . net . URL ) */
public Charset detectCodepage ( URL url ) throws IOException { } }

implementation: Charset result ; BufferedInputStream in = new BufferedInputStream ( url . openStream ( ) ) ; result = this . detectCodepage ( in , Integer . MAX_VALUE ) ; in . close ( ) ; return result ;


signature:
public class PropertiesHelper { /** * 读取属性文件
 * @ param propertiesFile */
public static Map < String , String > readProperties ( File propertiesFile ) { } }

implementation: if ( ! propertiesFile . exists ( ) ) { return null ; } InputStream inputStream = null ; try { inputStream = new FileInputStream ( propertiesFile ) ; return readProperties ( inputStream ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { if ( inputStream != null ) { try { inputStream . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } } return null ;


signature:
public class StaxUtils { /** * Return the { @ link javax . xml . stream . XMLStreamReader } for the given StAX Source .
 * @ param source a JAXP 1.4 { @ link javax . xml . transform . stax . StAXSource }
 * @ return the { @ link javax . xml . stream . XMLStreamReader }
 * @ throws IllegalArgumentException if { @ code source } isn ' t a JAXP 1.4 { @ link javax . xml . transform . stax . StAXSource }
 * or custom StAX Source */
public static XMLStreamReader getXMLStreamReader ( Source source ) { } }

implementation: if ( source instanceof StAXSource ) { return ( ( StAXSource ) source ) . getXMLStreamReader ( ) ; } else if ( source instanceof StaxSource ) { return ( ( StaxSource ) source ) . getXMLStreamReader ( ) ; } else { throw new IllegalArgumentException ( "Source '" + source + "' is neither StaxSource nor StAXSource" ) ; }


signature:
public class StaxUtils { /** * Return the { @ link javax . xml . stream . XMLEventReader } for the given StAX Source .
 * @ param source a JAXP 1.4 { @ link javax . xml . transform . stax . StAXSource }
 * @ return the { @ link javax . xml . stream . XMLEventReader }
 * @ throws IllegalArgumentException if { @ code source } isn ' t a JAXP 1.4 { @ link javax . xml . transform . stax . StAXSource }
 * or custom StAX Source */
public static XMLEventReader getXMLEventReader ( Source source ) { } }

implementation: if ( source instanceof StAXSource ) { return ( ( StAXSource ) source ) . getXMLEventReader ( ) ; } else if ( source instanceof StaxSource ) { return ( ( StaxSource ) source ) . getXMLEventReader ( ) ; } else { throw new IllegalArgumentException ( "Source '" + source + "' is neither StaxSource nor StAXSource" ) ; }


signature:
public class StaxUtils { /** * Return the { @ link javax . xml . stream . XMLStreamWriter } for the given StAX Result .
 * @ param result a JAXP 1.4 { @ link javax . xml . transform . stax . StAXResult }
 * @ return the { @ link javax . xml . stream . XMLStreamReader }
 * @ throws IllegalArgumentException if { @ code source } isn ' t a JAXP 1.4 { @ link javax . xml . transform . stax . StAXResult }
 * or custom StAX Result */
public static XMLStreamWriter getXMLStreamWriter ( Result result ) { } }

implementation: if ( result instanceof StAXResult ) { return ( ( StAXResult ) result ) . getXMLStreamWriter ( ) ; } else if ( result instanceof StaxResult ) { return ( ( StaxResult ) result ) . getXMLStreamWriter ( ) ; } else { throw new IllegalArgumentException ( "Result '" + result + "' is neither StaxResult nor StAXResult" ) ; }


signature:
public class StaxUtils { /** * Return the { @ link javax . xml . stream . XMLEventWriter } for the given StAX Result .
 * @ param result a JAXP 1.4 { @ link javax . xml . transform . stax . StAXResult }
 * @ return the { @ link javax . xml . stream . XMLStreamReader }
 * @ throws IllegalArgumentException if { @ code source } isn ' t a JAXP 1.4 { @ link javax . xml . transform . stax . StAXResult }
 * or custom StAX Result */
public static XMLEventWriter getXMLEventWriter ( Result result ) { } }

implementation: if ( result instanceof StAXResult ) { return ( ( StAXResult ) result ) . getXMLEventWriter ( ) ; } else if ( result instanceof StaxResult ) { return ( ( StaxResult ) result ) . getXMLEventWriter ( ) ; } else { throw new IllegalArgumentException ( "Result '" + result + "' is neither StaxResult nor StAXResult" ) ; }


signature:
public class RsaUtils { /** * 解密算法
 * @ param cryptograph 密文
 * @ return
 * @ throws Exception */
public String decrypt ( String cryptograph , KeyPair keyPair ) throws Exception { } }

implementation: return decrypt ( cryptograph , keyPair . getPrivate ( ) ) ;


signature:
public class ObjectUtils { /** * Check whether the given exception is compatible with the exceptions
 * declared in a throws clause .
 * @ param ex the exception to checked
 * @ param declaredExceptions the exceptions declared in the throws clause
 * @ return whether the given exception is compatible */
public static boolean isCompatibleWithThrowsClause ( Throwable ex , Class < ? > [ ] declaredExceptions ) { } }

implementation: if ( ! isCheckedException ( ex ) ) { return true ; } if ( declaredExceptions != null ) { int i = 0 ; while ( i < declaredExceptions . length ) { if ( declaredExceptions [ i ] . isAssignableFrom ( ex . getClass ( ) ) ) { return true ; } i ++ ; } } return false ;