001 002/* 003 * Copyright (C) 2010 Archie L. Cobbs. All rights reserved. 004 * 005 * $Id$ 006 */ 007 008package org.dellroad.jibxbindings.pidf; 009 010import java.util.Date; 011 012import org.dellroad.jibxbindings.pidf.lo.GeoPriv; 013 014/** 015 * The {@code <dm:person>} element as defined in RFC 4479. 016 * 017 * @see <a href="http://tools.ietf.org/html/rfc4479">RFC 4479</a> 018 */ 019public class Person implements Component { 020 021 private String id; 022 private GeoPriv geoPriv; 023 private LangContent note; 024 private Date timestamp; 025 026 public String getId() { 027 return this.id; 028 } 029 public void setId(String id) { 030 this.id = id; 031 } 032 033 @Override 034 public GeoPriv getGeoPriv() { 035 return this.geoPriv; 036 } 037 public void setGeoPriv(GeoPriv geoPriv) { 038 this.geoPriv = geoPriv; 039 } 040 041 public LangContent getNote() { 042 return this.note; 043 } 044 public void setNote(LangContent note) { 045 this.note = note; 046 } 047 048 public Date getTimestamp() { 049 return this.timestamp; 050 } 051 public void setTimestamp(Date timestamp) { 052 this.timestamp = timestamp; 053 } 054 055 @Override 056 public void visit(ComponentSwitch componentSwitch) { 057 componentSwitch.casePerson(this); 058 } 059 060// Cloneable 061 062 @Override 063 public Person clone() { 064 final Person clone; 065 try { 066 clone = (Person)super.clone(); 067 } catch (CloneNotSupportedException e) { 068 throw new RuntimeException(e); 069 } 070 clone.geoPriv = this.geoPriv != null ? this.geoPriv.clone() : null; 071 clone.note = this.note != null ? this.note.clone() : null; 072 return clone; 073 } 074} 075