protected LinearRing canBuildExteriorPolygon(Polygon polygon) throws ParserException { AbstractRingProperty ringProperty = polygon.getExteriorValue(); AbstractRing ring = ringProperty.getAbstractRing(); return ((ring != null) && (ring instanceof org.geosdi.geoplatform.gml.api.LinearRing)) ? linearRingParser.parseGeometry((org.geosdi.geoplatform.gml.api.LinearRing) ring) : null; }
protected LinearRing[] canBuildInteriorPolygon(Polygon polygon) throws ParserException { List<LinearRing> interiorElements = new ArrayList<LinearRing>(polygon.getInteriorValues().size()); for (AbstractRingProperty ringProperty : polygon.getInteriorValues()) { AbstractRing ring = ringProperty.getAbstractRing(); if ((ring != null) && (ring instanceof LinearRing)) { interiorElements.add( this.linearRingParser.parseGeometry((org.geosdi.geoplatform.gml.api.LinearRing) ring)); } } return interiorElements.toArray(new LinearRing[interiorElements.size()]); }