Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>jd</groupId>
- <artifactId>jd</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>JD Example XSD to Java</name>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <build>
- <plugins>
- <!-- Plugin required to build java classes from XSD using XJC -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jaxb2-maven-plugin</artifactId>
- <version>1.5</version>
- <executions>
- <execution>
- <id>xjc</id>
- <goals>
- <goal>xjc</goal>
- </goals>
- <configuration>
- <extension>true</extension>
- <arguments>-Xannotate</arguments>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.jvnet.jaxb2_commons</groupId>
- <artifactId>jaxb2-basics-annotate</artifactId>
- <version>0.6.4</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- </project>
- <xs:schema attributeFormDefault="unqualified"
- elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1"
- xmlns:annox="http://annox.dev.java.net" jaxb:extensionBindingPrefixes="annox">
- <xs:element name="MyClass">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
- <annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})
- </annox:annotate>
- <annox:annotate target="package">@javax.annotation.Generated({"XJC","JAXB2
- Annotate Plugin"})</annox:annotate>
- </xs:appinfo>
- </xs:annotation>
- <xs:sequence>
- <xs:element type="xs:integer" name="id" />
- <xs:element type="xs:string" name="name">
- <xs:annotation>
- <xs:appinfo>
- <annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})
- </annox:annotate>
- <annox:annotate target="setter">@java.lang.Deprecated
- </annox:annotate>
- <annox:annotate target="setter-parameter">@java.lang.Deprecated
- </annox:annotate>
- <annox:annotate target="getter">@java.lang.Deprecated
- </annox:annotate>
- <annox:annotate target="field">@java.lang.Deprecated
- </annox:annotate>
- <annox:annotate target="class">@java.lang.Deprecated
- </annox:annotate>
- </xs:appinfo>
- </xs:annotation>
- </xs:element>
- <xs:element type="xs:string" name="description" />
- <xs:element type="xs:string" name="address" />
- <xs:element type="xs:dateTime" name="birthdate" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:schema>
- //
- // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
- // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
- // Any modifications to this file will be lost upon recompilation of the source schema.
- // Generated on: 2015.12.17 at 03:45:33 PM MEZ
- //
- package generated;
- import java.math.BigInteger;
- import javax.xml.bind.annotation.XmlAccessType;
- import javax.xml.bind.annotation.XmlAccessorType;
- import javax.xml.bind.annotation.XmlElement;
- import javax.xml.bind.annotation.XmlRootElement;
- import javax.xml.bind.annotation.XmlSchemaType;
- import javax.xml.bind.annotation.XmlType;
- import javax.xml.datatype.XMLGregorianCalendar;
- /**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="id" type="{http://www.w3.org/2001/XMLSchema}integer"/>
- * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="address" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="birthdate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "id",
- "name",
- "description",
- "address",
- "birthdate"
- })
- @XmlRootElement(name = "MyClass")
- public class MyClass {
- @XmlElement(required = true)
- protected BigInteger id;
- @XmlElement(required = true)
- protected String name;
- @XmlElement(required = true)
- protected String description;
- @XmlElement(required = true)
- protected String address;
- @XmlElement(required = true)
- @XmlSchemaType(name = "dateTime")
- protected XMLGregorianCalendar birthdate;
- /**
- * Gets the value of the id property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getId() {
- return id;
- }
- /**
- * Sets the value of the id property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setId(BigInteger value) {
- this.id = value;
- }
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
- /**
- * Gets the value of the description property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDescription() {
- return description;
- }
- /**
- * Sets the value of the description property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDescription(String value) {
- this.description = value;
- }
- /**
- * Gets the value of the address property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getAddress() {
- return address;
- }
- /**
- * Sets the value of the address property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setAddress(String value) {
- this.address = value;
- }
- /**
- * Gets the value of the birthdate property.
- *
- * @return
- * possible object is
- * {@link XMLGregorianCalendar }
- *
- */
- public XMLGregorianCalendar getBirthdate() {
- return birthdate;
- }
- /**
- * Sets the value of the birthdate property.
- *
- * @param value
- * allowed object is
- * {@link XMLGregorianCalendar }
- *
- */
- public void setBirthdate(XMLGregorianCalendar value) {
- this.birthdate = value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement