Skip to content

Commit

Permalink
regenerate JAXB classes against the latest XML schemas
Browse files Browse the repository at this point in the history
This fixed #4 and fixed #5.
  • Loading branch information
pinhead84 committed Apr 15, 2016
1 parent ebc26f7 commit 3a6116e
Show file tree
Hide file tree
Showing 23 changed files with 598 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -963,17 +963,17 @@ public static String parseText1800( String value )

/**
* Read a {@link String} value from XML
* with maximal 2000 characters.
* with maximal 3999 characters.
*
* @param value
* XML string
*
* @return
* parsed value or null, if the value is invalid
*/
public static String parseText2000( String value )
public static String parseText3999( String value )
{
return parseText( value, null, 2000 );
return parseText( value, null, 3999 );
}

/**
Expand Down Expand Up @@ -1931,7 +1931,7 @@ public static String printText1800( String value )

/**
* Write a {@link String} value into XML output
* with maximal 2000 characters.
* with maximal 3999 characters.
*
* @param value
* value to write
Expand All @@ -1942,9 +1942,9 @@ public static String printText1800( String value )
* @throws IllegalArgumentException
* if a validation error occured
*/
public static String printText2000( String value )
public static String printText3999( String value )
{
return printText( value, null, 2000 );
return printText( value, null, 3999 );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,28 @@
* <element name="descriptionNote" minOccurs="0">
* <simpleType>
* <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
* <maxLength value="2000"/>
* <maxLength value="3999"/>
* </restriction>
* </simpleType>
* </element>
* <element name="furnishingNote" minOccurs="0">
* <simpleType>
* <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
* <maxLength value="2000"/>
* <maxLength value="3999"/>
* </restriction>
* </simpleType>
* </element>
* <element name="locationNote" minOccurs="0">
* <simpleType>
* <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
* <maxLength value="2000"/>
* <maxLength value="3999"/>
* </restriction>
* </simpleType>
* </element>
* <element name="otherNote" minOccurs="0">
* <simpleType>
* <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
* <maxLength value="2000"/>
* <maxLength value="3999"/>
* </restriction>
* </simpleType>
* </element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public class Adapter17


public String unmarshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.parseText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.parseText3999(value));
}

public String marshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.printText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.printText3999(value));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public class Adapter18


public String unmarshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.parseText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.parseText3999(value));
}

public String marshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.printText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.printText3999(value));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public class Adapter19


public String unmarshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.parseText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.parseText3999(value));
}

public String marshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.printText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.printText3999(value));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public class Adapter20


public String unmarshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.parseText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.parseText3999(value));
}

public String marshal(String value) {
return (org.openestate.is24.restapi.utils.XmlUtils.printText2000(value));
return (org.openestate.is24.restapi.utils.XmlUtils.printText3999(value));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
* <enumeration value="ZAF"/>
* <enumeration value="ZMB"/>
* <enumeration value="ZWE"/>
* <enumeration value="XKO"/>
* </restriction>
* </simpleType>
* </pre>
Expand Down Expand Up @@ -1668,7 +1669,13 @@ public enum CountryCode {
* Zimbabwe
*
*/
ZWE;
ZWE,

/**
* Kosovo
*
*/
XKO;

public String value() {
return name();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* &lt;element name="pageSize" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
* &lt;element name="numberOfPages" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
* &lt;element name="numberOfHits" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;element name="numberOfListings" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
Expand All @@ -55,7 +56,8 @@
"pageNumber",
"pageSize",
"numberOfPages",
"numberOfHits"
"numberOfHits",
"numberOfListings"
})
public class Paging implements Cloneable, CopyTo2, Equals2, ToString2
{
Expand All @@ -78,6 +80,10 @@ public class Paging implements Cloneable, CopyTo2, Equals2, ToString2
@XmlJavaTypeAdapter(Adapter5 .class)
@XmlSchemaType(name = "int")
protected Long numberOfHits;
@XmlElement(required = true, type = String.class, defaultValue = "0")
@XmlJavaTypeAdapter(Adapter5 .class)
@XmlSchemaType(name = "int")
protected Long numberOfListings;

/**
* Gets the value of the next property.
Expand Down Expand Up @@ -223,6 +229,30 @@ public void setNumberOfHits(Long value) {
this.numberOfHits = value;
}

/**
* Gets the value of the numberOfListings property.
*
* @return
* possible object is
* {@link String }
*
*/
public Long getNumberOfListings() {
return numberOfListings;
}

/**
* Sets the value of the numberOfListings property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNumberOfListings(Long value) {
this.numberOfListings = value;
}

public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
Expand Down Expand Up @@ -268,6 +298,11 @@ public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, T
theNumberOfHits = this.getNumberOfHits();
strategy.appendField(locator, this, "numberOfHits", buffer, theNumberOfHits, (this.numberOfHits!= null));
}
{
Long theNumberOfListings;
theNumberOfListings = this.getNumberOfListings();
strategy.appendField(locator, this, "numberOfListings", buffer, theNumberOfListings, (this.numberOfListings!= null));
}
return buffer;
}

Expand Down Expand Up @@ -362,6 +397,19 @@ public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strateg
}
}
}
{
Boolean numberOfListingsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.numberOfListings!= null));
if (numberOfListingsShouldBeCopiedAndSet == Boolean.TRUE) {
Long sourceNumberOfListings;
sourceNumberOfListings = this.getNumberOfListings();
Long copyNumberOfListings = ((Long) strategy.copy(LocatorUtils.property(locator, "numberOfListings", sourceNumberOfListings), sourceNumberOfListings, (this.numberOfListings!= null)));
copy.setNumberOfListings(copyNumberOfListings);
} else {
if (numberOfListingsShouldBeCopiedAndSet == Boolean.FALSE) {
copy.numberOfListings = null;
}
}
}
}
return draftCopy;
}
Expand Down Expand Up @@ -432,6 +480,15 @@ public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Obje
return false;
}
}
{
Long lhsNumberOfListings;
lhsNumberOfListings = this.getNumberOfListings();
Long rhsNumberOfListings;
rhsNumberOfListings = that.getNumberOfListings();
if (!strategy.equals(LocatorUtils.property(thisLocator, "numberOfListings", lhsNumberOfListings), LocatorUtils.property(thatLocator, "numberOfListings", rhsNumberOfListings), lhsNumberOfListings, rhsNumberOfListings, (this.numberOfListings!= null), (that.numberOfListings!= null))) {
return false;
}
}
return true;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

package org.openestate.is24.restapi.xml.common;

import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
Expand All @@ -22,7 +19,6 @@
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.openestate.is24.restapi.xml.Adapter4;


/**
Expand All @@ -49,7 +45,7 @@
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;attribute name="scale" type="{http://rest.immobilienscout24.de/schema/common/1.0}PictureScaleType" /&gt;
* &lt;attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;attribute name="href" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
Expand Down Expand Up @@ -295,7 +291,7 @@ public boolean equals(Object object) {
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;attribute name="scale" type="{http://rest.immobilienscout24.de/schema/common/1.0}PictureScaleType" /&gt;
* &lt;attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;attribute name="href" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
Expand Down Expand Up @@ -445,7 +441,7 @@ public boolean equals(Object object) {
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;attribute name="scale" type="{http://rest.immobilienscout24.de/schema/common/1.0}PictureScaleType" /&gt;
* &lt;attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;attribute name="href" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
Expand All @@ -461,9 +457,7 @@ public static class Url implements Cloneable, CopyTo2, Equals2, ToString2
@XmlAttribute(name = "scale")
protected PictureScaleType scale;
@XmlAttribute(name = "href")
@XmlJavaTypeAdapter(Adapter4 .class)
@XmlSchemaType(name = "anyURI")
protected URL href;
protected String href;

/**
* Gets the value of the scale property.
Expand Down Expand Up @@ -497,7 +491,7 @@ public void setScale(PictureScaleType value) {
* {@link String }
*
*/
public URL getHref() {
public String getHref() {
return href;
}

Expand All @@ -509,7 +503,7 @@ public URL getHref() {
* {@link String }
*
*/
public void setHref(URL value) {
public void setHref(String value) {
this.href = value;
}

Expand All @@ -534,7 +528,7 @@ public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, T
strategy.appendField(locator, this, "scale", buffer, theScale, (this.scale!= null));
}
{
URL theHref;
String theHref;
theHref = this.getHref();
strategy.appendField(locator, this, "href", buffer, theHref, (this.href!= null));
}
Expand Down Expand Up @@ -570,9 +564,9 @@ public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strateg
{
Boolean hrefShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.href!= null));
if (hrefShouldBeCopiedAndSet == Boolean.TRUE) {
URL sourceHref;
String sourceHref;
sourceHref = this.getHref();
URL copyHref = ((URL) strategy.copy(LocatorUtils.property(locator, "href", sourceHref), sourceHref, (this.href!= null)));
String copyHref = ((String) strategy.copy(LocatorUtils.property(locator, "href", sourceHref), sourceHref, (this.href!= null)));
copy.setHref(copyHref);
} else {
if (hrefShouldBeCopiedAndSet == Boolean.FALSE) {
Expand Down Expand Up @@ -606,9 +600,9 @@ public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Obje
}
}
{
URL lhsHref;
String lhsHref;
lhsHref = this.getHref();
URL rhsHref;
String rhsHref;
rhsHref = that.getHref();
if (!strategy.equals(LocatorUtils.property(thisLocator, "href", lhsHref), LocatorUtils.property(thatLocator, "href", rhsHref), lhsHref, rhsHref, (this.href!= null), (that.href!= null))) {
return false;
Expand Down
Loading

0 comments on commit 3a6116e

Please sign in to comment.