1 package org.collectionspace.hello.entity;
3 import javax.xml.bind.annotation.XmlAccessType;
4 import javax.xml.bind.annotation.XmlAccessorType;
5 import javax.xml.bind.annotation.XmlAttribute;
6 import javax.xml.bind.annotation.XmlRootElement;
7 import javax.xml.bind.annotation.XmlType;
8 import javax.xml.bind.Unmarshaller;
9 import javax.xml.bind.Unmarshaller.Listener;
10 import javax.xml.bind.annotation.XmlElement;
13 @XmlAccessorType(XmlAccessType.FIELD)
14 @XmlType(name = "person", propOrder = {
23 public class Person extends Listener {
28 private int version = 1;
29 private String firstName;
30 private String lastName;
31 private String street;
35 private String country;
41 public void setId(int id) {
48 public int getVersion() {
53 * @param version the version to set
55 public void setVersion(int version) {
56 this.version = version;
59 public String getFirstName() {
63 public void setFirstName(String firstName) {
64 this.firstName = firstName;
67 public String getLastName() {
71 public void setLastName(String lastName) {
72 this.lastName = lastName;
75 public String getStreet() {
79 public void setStreet(String street) {
83 public String getCity() {
87 public void setCity(String city) {
91 public String getState() {
95 public void setState(String state) {
99 public String getZip() {
103 public void setZip(String zip) {
107 public String getCountry() {
111 public void setCountry(String country) {
112 this.country = country;
116 * JAXB Callback method used to reassociate the item with the owning contact.
117 * JAXB doesn't seem to read this method from a super class and it must
118 * therefore be placed on any subclass.
120 * @param unmarshaller the JAXB {@link Unmarshaller}.
121 * @param parent the owning {@link Contact} instance.
123 public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
124 super.afterUnmarshal(unmarshaller, parent);