001
002/*
003 * Copyright (C) 2010 Archie L. Cobbs. All rights reserved.
004 *
005 * $Id$
006 */
007
008package org.dellroad.jibxbindings.pidf.lo;
009
010import org.dellroad.jibxbindings.pidf.lo.gml.GMLObject;
011
012/**
013 * The {@code <gp:location-info>} element as defined in RFC 4119.
014 */
015public class LocationInfo implements Cloneable {
016
017    private CivicAddress civicAddress;
018    private GMLObject gmlObject;
019    private Confidence confidence;
020
021    public CivicAddress getCivicAddress() {
022        return this.civicAddress;
023    }
024    public void setCivicAddress(CivicAddress civicAddress) {
025        this.civicAddress = civicAddress;
026    }
027
028    public GMLObject getGMLObject() {
029        return this.gmlObject;
030    }
031    public void setGMLObject(GMLObject gmlObject) {
032        this.gmlObject = gmlObject;
033    }
034
035    public Confidence getConfidence() {
036        return this.confidence;
037    }
038    public void setConfidence(Confidence confidence) {
039        this.confidence = confidence;
040    }
041
042// Cloneable
043
044    @Override
045    public LocationInfo clone() {
046        final LocationInfo clone;
047        try {
048            clone = (LocationInfo)super.clone();
049        } catch (CloneNotSupportedException e) {
050            throw new RuntimeException(e);
051        }
052        clone.civicAddress = this.civicAddress != null ? this.civicAddress.clone() : null;
053        clone.gmlObject = this.gmlObject != null ? this.gmlObject.clone() : null;
054        clone.confidence = this.confidence != null ? this.confidence.clone() : null;
055        return clone;
056    }
057}
058