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 arc band.
014 */
015public class ArcBand extends Surface {
016
017    private double[] center;
018    private Measure innerRadius;
019    private Measure outerRadius;
020    private Measure startAngle;
021    private Measure openingAngle;
022
023    public ArcBand() {
024    }
025
026    public ArcBand(String gid, URI srsName, int srsDimension,
027      double[] center, Measure innerRadius, Measure outerRadius, Measure startAngle, Measure openingAngle) {
028        super(gid, srsName, srsDimension);
029        this.setCenter(center);
030        this.setInnerRadius(innerRadius);
031        this.setOuterRadius(outerRadius);
032        this.setStartAngle(startAngle);
033        this.setOpeningAngle(openingAngle);
034    }
035
036    /**
037     * The center of the arc band.
038     */
039    public double[] getCenter() {
040        return this.center;
041    }
042    public void setCenter(double[] center) {
043        this.center = center;
044    }
045
046    /**
047     * The {@code <gs:innerRadius>}.
048     */
049    public Measure getInnerRadius() {
050        return this.innerRadius;
051    }
052    public void setInnerRadius(Measure innerRadius) {
053        this.innerRadius = innerRadius;
054    }
055
056    /**
057     * The {@code <gs:outerRadius>}.
058     */
059    public Measure getOuterRadius() {
060        return this.outerRadius;
061    }
062    public void setOuterRadius(Measure outerRadius) {
063        this.outerRadius = outerRadius;
064    }
065
066    /**
067     * The {@code <gs:startAngle>}.
068     */
069    public Measure getStartAngle() {
070        return this.startAngle;
071    }
072    public void setStartAngle(Measure startAngle) {
073        this.startAngle = startAngle;
074    }
075
076    /**
077     * The {@code <gs:openingAngle>}.
078     */
079    public Measure getOpeningAngle() {
080        return this.openingAngle;
081    }
082    public void setOpeningAngle(Measure openingAngle) {
083        this.openingAngle = openingAngle;
084    }
085
086    @Override
087    public void visit(GMLObjectSwitch gmlObjectSwitch) {
088        gmlObjectSwitch.caseArcBand(this);
089    }
090
091// Cloneable
092
093    @Override
094    public ArcBand clone() {
095        final ArcBand clone = (ArcBand)super.clone();
096        clone.center = this.center != null ? this.center.clone() : null;
097        clone.innerRadius = this.innerRadius != null ? this.innerRadius.clone() : null;
098        clone.outerRadius = this.outerRadius != null ? this.outerRadius.clone() : null;
099        clone.startAngle = this.startAngle != null ? this.startAngle.clone() : null;
100        clone.openingAngle = this.openingAngle != null ? this.openingAngle.clone() : null;
101        return clone;
102    }
103}
104