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; 011import java.util.ArrayList; 012import java.util.List; 013 014/** 015 * Superclass for GML geometry objects. 016 */ 017public abstract class Geometry extends GMLObject { 018 019 private String gid; 020 private URI srsName; 021 private int srsDimension; 022 private List<String> axisLabels = new ArrayList<String>(); 023 private List<String> uomLabels = new ArrayList<String>(); 024 025 protected Geometry() { 026 } 027 028 protected Geometry(String gid, URI srsName, int srsDimension) { 029 this.setGid(gid); 030 this.setSrsName(srsName); 031 this.setSrsDimension(srsDimension); 032 } 033 034 /** 035 * The {@code gid} attribute. 036 */ 037 public String getGid() { 038 return this.gid; 039 } 040 public void setGid(String gid) { 041 this.gid = gid; 042 } 043 044 /** 045 * The {@code srsName} attribute. 046 */ 047 public URI getSrsName() { 048 return this.srsName; 049 } 050 public void setSrsName(URI srsName) { 051 this.srsName = srsName; 052 } 053 054 /** 055 * The {@code srsDimension} attribute. 056 */ 057 public int getSrsDimension() { 058 return this.srsDimension; 059 } 060 public void setSrsDimension(int srsDimension) { 061 this.srsDimension = srsDimension; 062 } 063 064 /** 065 * The {@code axisLabels} attribute. 066 */ 067 public List<String> getAxisLabels() { 068 return this.axisLabels; 069 } 070 public void setAxisLabels(List<String> axisLabels) { 071 this.axisLabels = axisLabels; 072 } 073 074 /** 075 * The {@code uomLabels} attribute. 076 */ 077 public List<String> getUomLabels() { 078 return this.uomLabels; 079 } 080 public void setUomLabels(List<String> uomLabels) { 081 this.uomLabels = uomLabels; 082 } 083 084// Cloneable 085 086 @Override 087 public Geometry clone() { 088 final Geometry clone = (Geometry)super.clone(); 089 clone.axisLabels = this.axisLabels != null ? new ArrayList<>(this.axisLabels) : null; 090 clone.uomLabels = this.uomLabels != null ? new ArrayList<>(this.uomLabels) : null; 091 return clone; 092 } 093} 094