001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.camel.example.etl; 018 019 import javax.xml.bind.annotation.XmlAccessType; 020 import javax.xml.bind.annotation.XmlAccessorType; 021 import javax.xml.bind.annotation.XmlAttribute; 022 import javax.xml.bind.annotation.XmlElement; 023 import javax.xml.bind.annotation.XmlRootElement; 024 025 /** 026 * @version $Revision: 1.1 $ 027 */ 028 @XmlRootElement(name = "person") 029 @XmlAccessorType(XmlAccessType.FIELD) 030 public class PersonDocument { 031 @XmlAttribute 032 private String user; 033 @XmlElement 034 private String firstName; 035 @XmlElement 036 private String lastName; 037 @XmlElement 038 private String city; 039 040 @Override 041 public String toString() { 042 return "Person[user: " + user + "]"; 043 } 044 045 public String getCity() { 046 return city; 047 } 048 049 public void setCity(String city) { 050 this.city = city; 051 } 052 053 public String getFirstName() { 054 return firstName; 055 } 056 057 public void setFirstName(String firstName) { 058 this.firstName = firstName; 059 } 060 061 public String getLastName() { 062 return lastName; 063 } 064 065 public void setLastName(String lastName) { 066 this.lastName = lastName; 067 } 068 069 public String getUser() { 070 return user; 071 } 072 073 public void setUser(String user) { 074 this.user = user; 075 } 076 }