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 prism.
014 */
015public class Prism extends Solid {
016
017    private Surface base;
018    private Measure height;
019
020    public Prism() {
021    }
022
023    public Prism(String gid, URI srsName, int srsDimension, Surface base, Measure height) {
024        super(gid, srsName, srsDimension);
025        this.setBase(base);
026        this.setHeight(height);
027    }
028
029    /**
030     * The prism's {@code <gs:base>}.
031     */
032    public Surface getBase() {
033        return this.base;
034    }
035    public void setBase(Surface base) {
036        this.base = base;
037    }
038
039    /**
040     * The prism's {@code <gs:height>}.
041     */
042    public Measure getHeight() {
043        return this.height;
044    }
045    public void setHeight(Measure height) {
046        this.height = height;
047    }
048
049    @Override
050    public void visit(GMLObjectSwitch gmlObjectSwitch) {
051        gmlObjectSwitch.casePrism(this);
052    }
053
054// Cloneable
055
056    @Override
057    public Prism clone() {
058        final Prism clone = (Prism)super.clone();
059        clone.base = this.base != null ? this.base.clone() : null;
060        clone.height = this.height != null ? this.height.clone() : null;
061        return clone;
062    }
063}
064