001
002/*
003 * Copyright (C) 2010 Archie L. Cobbs. All rights reserved.
004 *
005 * $Id$
006 */
007
008package org.dellroad.jibxbindings.pidf.lo.gml;
009
010import java.net.URI;
011
012/**
013 * GML {@code <point>} objects.
014 */
015public class Point extends GeometricPrimitive {
016
017    private double[] pos;
018
019    public Point() {
020    }
021
022    public Point(String gid, URI srsName, int srsDimension, double[] pos) {
023        super(gid, srsName, srsDimension);
024        this.setPos(pos);
025    }
026
027    /**
028     * The {@code pos} element.
029     */
030    public double[] getPos() {
031        return this.pos;
032    }
033    public void setPos(double[] pos) {
034        this.pos = pos;
035    }
036
037    @Override
038    public void visit(GMLObjectSwitch gmlObjectSwitch) {
039        gmlObjectSwitch.casePoint(this);
040    }
041
042// Cloneable
043
044    @Override
045    public Point clone() {
046        final Point clone = (Point)super.clone();
047        clone.pos = this.pos != null ? this.pos.clone() : null;
048        return clone;
049    }
050}
051