[Index]

JHPropertiesTyped - XMLAdapters for JAXB

XMLAdapter implementations for JAXB using the different PropertyTypes in the JHPropertiesTyped framework.

Java types XMLAdapters (dk.heick.properties.types.xml.adapters.java)

Name PropertyType Validates to @XmAdapter Javadoc
BigDecimalXmlAdapter BigDecimalPropertyType BigDecimal @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.BigDecimalXmlAdapter.class) Link
BigIntegerXmlAdapter BigIntegerPropertyType BigInteger @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.BigIntegerXmlAdapter.class) Link
CharsetXmlAdapter CharsetPropertyType Charset @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.CharsetXmlAdapter.class) Link
ClassnameXmlAdapter ClassnamePropertyType Class<?> @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.ClassnameXmlAdapter.class) Link
ColorXmlAdapter ColorPropertyType Color @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.ColorXmlAdapter.class) Link
ConnectionUrlXmlAdapter ConnectionUrlPropertyType String @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.ConnectionUrlXmlAdapter.class) Link
CountryXmlAdapter CountryPropertyType Locale @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.CountryXmlAdapter.class) Link
DateFormatXmlAdapter DateFormatPropertyType SimpleDateFormat @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.DateFormatXmlAdapter.class) Link
DecimalFormatXmlAdapter DecimalFormatPropertyType DecimalFormat @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.DecimalFormatXmlAdapter.class) Link
DirectoryXmlAdapter DirectoryPropertyType File @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.DirectoryXmlAdapter.class) Link
EmailXmlAdapter EmailPropertyType String @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.EmailXmlAdapter.class) Link
FileXmlAdapter FilePropertyType File @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.FileXmlAdapter.class) Link
FontXmlAdapter FontPropertyType Font @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.FontXmlAdapter.class) Link
InetAddressXmlAdapter InetAddressPropertyType InetAddress @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.InetAddressXmlAdapter.class) Link
LdapNameXmlAdapter LdapNamePropertyType LdapName @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.LdapNameXmlAdapter.class) Link
LocaleXmlAdapter LocalePropertyType Locale @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.LocaleXmlAdapter.class) Link
MimeTypeXmlAdapter MimeTypePropertyType MimeType @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.MimeTypeXmlAdapter.class) Link
ProxyXmlAdapter ProxyPropertyType Proxy @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.ProxyXmlAdapter.class) Link
TimeUnitXmlAdapter TimeUnitPropertyType TimeUnit @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.TimeUnitXmlAdapter.class) Link
TimeZoneXmlAdapter TimeZonePropertyType TimeZone @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.TimeZoneXmlAdapter.class) Link
URIXmlAdapter URIPropertyType URI @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.URIXmlAdapter.class) Link
URLXmlAdapter URLPropertyType URL @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.URLXmlAdapter.class) Link
IP4AddressXmlAdapter IP4AddressPropertyType String @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.IP4AddressXmlAdapter.class) Link
StringPropertiesXmlAdapter StringPropertiesPropertyType Properties @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.java.StringPropertiesXmlAdapter.class) Link
Name PropertyType Validates to @XmAdapter Javadoc


JHPropertyTypes - Custom types XMLAdapters (dk.heick.properties.types.xml.adapters.custom)

Name PropertyType Validates to @XmAdapter Javadoc
ByteSizeXmlAdapter ByteSizePropertyType ByteSizeVO @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.ByteSizeXmlAdapter.class) Link
EnvironmentXmlAdapter EnvironmentPropertyType Environment @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.EnvironmentXmlAdapter.class) Link
HourIntervalsXmlAdapter HourIntervalsPropertyType HourIntervalsVO @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.HourIntervalsXmlAdapter.class) Link
IPRangeXmlAdapter IPRangePropertyType IPRange @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.IPRangeXmlAdapter.class) Link
MonthXmlAdapter MonthPropertyType Month @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.MonthXmlAdapter.class) Link
LatLngXmlAdapter LatLngPropertyType LatLng @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.LatLngXmlAdapter.class) Link
Point2DXmlAdapter Point2DPropertyType Point2D @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.Point2DXmlAdapter.class) Link
Point3DXmlAdapter Point3DPropertyType Point3D @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.Point3DXmlAdapter.class) Link
TimeSpanXmlAdapter TimeSpanPropertyType TimeSpan @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.TimeSpanXmlAdapter.class) Link
VersionXmlAdapter VersionPropertyType VersionVO @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.VersionXmlAdapter.class) Link
WeekdayXmlAdapter WeekdayPropertyType Weekday @XmlJavaTypeAdapter(dk.heick.properties.types.xml.adapters.custom.WeekdayXmlAdapter.class) Link
Name PropertyType Validates to @XmAdapter Javadoc


JAXB Example.

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class XMLAdaptersData {

	@XmlJavaTypeAdapter(BigDecimalXmlAdapter.class)
	private BigDecimal bigdecimal;

	@XmlJavaTypeAdapter(BigIntegerXmlAdapter.class)
	private BigInteger biginteger;

	@XmlJavaTypeAdapter(CharsetXmlAdapter.class)
	private Charset charset;

	@XmlJavaTypeAdapter(ClassnameXmlAdapter.class)
	private Class<?> classname;

	@XmlJavaTypeAdapter(ColorXmlAdapter.class)
	private Color color;

	@XmlJavaTypeAdapter(ConnectionUrlXmlAdapter.class)
	private String connectionurl;

	@XmlJavaTypeAdapter(CountryXmlAdapter.class)
	private Locale country;

	@XmlJavaTypeAdapter(DateFormatXmlAdapter.class)
	private SimpleDateFormat dateformat;

	@XmlJavaTypeAdapter(DecimalFormatXmlAdapter.class)
	private DecimalFormat decimalformat;

	@XmlJavaTypeAdapter(DirectoryXmlAdapter.class)
	private File directory;

	@XmlJavaTypeAdapter(EmailXmlAdapter.class)
	private String email;

	@XmlJavaTypeAdapter(FileXmlAdapter.class)
	private File file;

	@XmlJavaTypeAdapter(FontXmlAdapter.class)
	private Font font;

	@XmlJavaTypeAdapter(InetAddressXmlAdapter.class)
	private InetAddress inetaddress;

	@XmlJavaTypeAdapter(LdapNameXmlAdapter.class)
	private LdapName ldapname;

	@XmlJavaTypeAdapter(LocaleXmlAdapter.class)
	private Locale locale;

	@XmlJavaTypeAdapter(MimeTypeXmlAdapter.class)
	private MimeType mimetype;

	@XmlJavaTypeAdapter(ProxyXmlAdapter.class)
	private Proxy proxy;

	@XmlJavaTypeAdapter(TimeUnitXmlAdapter.class)
	private TimeUnit timeunit;

	@XmlJavaTypeAdapter(TimeZoneXmlAdapter.class)
	private TimeZone timezone;

	@XmlJavaTypeAdapter(URIXmlAdapter.class)
	private URI uri;

	@XmlJavaTypeAdapter(URLXmlAdapter.class)
	private URL url;

	@XmlJavaTypeAdapter(IP4AddressXmlAdapter.class)
	private String ip4address;

	@XmlJavaTypeAdapter(StringPropertiesXmlAdapter.class)
	private Properties stringproperties;

	@XmlJavaTypeAdapter(ByteSizeXmlAdapter.class)
	private ByteSizeVO bytesize;

	@XmlJavaTypeAdapter(EnvironmentXmlAdapter.class)
	private Environment environment;

	@XmlJavaTypeAdapter(HourIntervalsXmlAdapter.class)
	private HourIntervalsVO hourintervals;

	@XmlJavaTypeAdapter(IPRangeXmlAdapter.class)
	private IPRange iprange;

	@XmlJavaTypeAdapter(MonthXmlAdapter.class)
	private Month month;

	@XmlJavaTypeAdapter(LatLngXmlAdapter.class)
	private LatLng latlng;

	@XmlJavaTypeAdapter(Point2DXmlAdapter.class)
	private Point2D point2d;

	@XmlJavaTypeAdapter(Point3DXmlAdapter.class)
	private Point3D point3d;

	@XmlJavaTypeAdapter(TimeSpanXmlAdapter.class)
	private TimeSpan timespan;

	@XmlJavaTypeAdapter(VersionXmlAdapter.class)
	private VersionVO version;

	@XmlJavaTypeAdapter(WeekdayXmlAdapter.class)
	private Weekday weekday;

}

XML Example.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xmlAdaptersData>
    <bigdecimal>238029384290384209382.12390820394829034</bigdecimal>
    <biginteger>23098234098239048203948209384239</biginteger>
    <charset>windows-1252</charset>
    <classname>java.lang.Exception</classname>
    <color>#0000ff</color>
    <connectionurl>jdbc:oracle:thin:Herong/TopSecret@localhost:1521:XE</connectionurl>
    <country>CA</country>
    <dateformat>yyyy-MM-dd HH:mm:ss</dateformat>
    <decimalformat>$#,##0.###</decimalformat>
    <directory>C:\Users\Frederik\AppData\Local\Temp</directory>
    <email>test@gmail.com</email>
    <file>C:\Users\Frederik\AppData\Local\Temp\hest8904072480837100770.txt</file>
    <font>Verdana-bold-16</font>
    <inetaddress>Frederik-PC/192.168.2.5</inetaddress>
    <ldapname>cn=Mango,ou=Fruits,o=Food</ldapname>
    <locale>en_CA</locale>
    <mimetype>text/html</mimetype>
    <proxy>HTTP;10.0.0.1;8080</proxy>
    <timeunit>HOURS</timeunit>
    <timezone>Europe/Berlin</timezone>
    <uri>http://localhost:8080</uri>
    <url>http://www.jp.dk</url>
    <bytesize>141.2 MB</bytesize>
    <environment>PRE_PRODUCTION_1</environment>
    <iprange>192.168.*.*</iprange>
    <month>NOVEMBER</month>
    <latlng>25.205,36.119</latlng>
    <point2d>8.0 , 9.0</point2d>
    <point3d>1.0 , 2.0 , 3.0</point3d>
    <timespan>6d</timespan>
    <version>1.2.3_BETA9-Hest</version>
    <weekday>SUNDAY</weekday>
    <ip4Address>127.0.0.1</ip4Address>
    <stringProperties>A=1;C=3;B=2</stringProperties>
    <hourIntervals>2-9;19-23</hourIntervals>
</xmlAdaptersData>