org.deegree.geometry.standard.composite
Class DefaultCompositeSolid

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.composite.DefaultCompositeSolid
All Implemented Interfaces:
java.lang.Iterable<Solid>, java.util.Collection<Solid>, java.util.List<Solid>, TypedObjectNode, CompositeSolid, Geometry, GeometricPrimitive, Solid, GMLObject

public class DefaultCompositeSolid
extends AbstractDefaultGeometry
implements CompositeSolid

Default implementation of CompositeSolid.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.Solid
Solid.SolidType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.GeometricPrimitive
GeometricPrimitive.PrimitiveType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.Geometry
Geometry.GeometryType
 
Field Summary
 
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
crs, env, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultCompositeSolid(java.lang.String id, CRS crs, PrecisionModel pm, java.util.List<Solid> memberSolids)
          Creates a new DefaultCompositeSolid from the given parameters.
 
Method Summary
 void add(int index, Solid element)
           
 boolean add(Solid e)
           
 boolean addAll(java.util.Collection<? extends Solid> c)
           
 boolean addAll(int index, java.util.Collection<? extends Solid> c)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> c)
           
 Solid get(int index)
           
 Measure getArea(Unit requestedBaseUnit)
           
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.
 Surface getExteriorSurface()
          Returns the exterior surface (shell) of the solid.
 Geometry.GeometryType getGeometryType()
          Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY.
 java.util.List<Surface> getInteriorSurfaces()
          Returns the interior surfaces of the solid.
 GeometricPrimitive.PrimitiveType getPrimitiveType()
          Must always return GeometricPrimitive.PrimitiveType.Solid.
 Solid.SolidType getSolidType()
          Must always return Solid.SolidType#CompositeSolid.
 Measure getVolume(Unit requestedBaseUnit)
           
 int indexOf(java.lang.Object o)
           
 boolean isEmpty()
           
 java.util.Iterator<Solid> iterator()
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator<Solid> listIterator()
           
 java.util.ListIterator<Solid> listIterator(int index)
           
 Solid remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 Solid set(int index, Solid element)
           
 int size()
           
 java.util.List<Solid> subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
buildJTSGeometry, contains, createFromJTS, crosses, equals, getAsDefaultGeometry, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getGMLProperties, getId, getIntersection, getJTSGeometry, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, toString, touches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.geometry.Geometry
contains, crosses, equals, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

DefaultCompositeSolid

public DefaultCompositeSolid(java.lang.String id,
                             CRS crs,
                             PrecisionModel pm,
                             java.util.List<Solid> memberSolids)
Creates a new DefaultCompositeSolid from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
memberSolids -
Method Detail

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: Geometry
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.

Specified by:
getCoordinateDimension in interface Geometry
Returns:
the coordinate dimension

getGeometryType

public Geometry.GeometryType getGeometryType()
Description copied from interface: GeometricPrimitive
Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY.

Specified by:
getGeometryType in interface Geometry
Specified by:
getGeometryType in interface GeometricPrimitive
Returns:
must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY

getPrimitiveType

public GeometricPrimitive.PrimitiveType getPrimitiveType()
Description copied from interface: Solid
Must always return GeometricPrimitive.PrimitiveType.Solid.

Specified by:
getPrimitiveType in interface GeometricPrimitive
Specified by:
getPrimitiveType in interface Solid
Returns:
GeometricPrimitive.PrimitiveType.Solid

getSolidType

public Solid.SolidType getSolidType()
Description copied from interface: CompositeSolid
Must always return Solid.SolidType#CompositeSolid.

Specified by:
getSolidType in interface CompositeSolid
Specified by:
getSolidType in interface Solid
Returns:
Solid.SolidType#CompositeSolid

getExteriorSurface

public Surface getExteriorSurface()
Description copied from interface: Solid
Returns the exterior surface (shell) of the solid.

Please note that this method may return null. The following explanation is from the GML 3.1.1 schema (geometryPrimitives.xsd): In normal 3-dimensional Euclidean space, one (composite) surface is distinguished as the exterior. In the more general case, this is not always possible.

Specified by:
getExteriorSurface in interface Solid
Returns:
the exterior surface, or null if no surface is distinguished as being the exterior boundary

getInteriorSurfaces

public java.util.List<Surface> getInteriorSurfaces()
Description copied from interface: Solid
Returns the interior surfaces of the solid.

Specified by:
getInteriorSurfaces in interface Solid
Returns:
the interior surfaces, list may be empty (but not null)

getArea

public Measure getArea(Unit requestedBaseUnit)
Specified by:
getArea in interface Solid
Returns:
area of the solid's boundary

getVolume

public Measure getVolume(Unit requestedBaseUnit)
Specified by:
getVolume in interface Solid
Returns:
volume of the solid

add

public void add(int index,
                Solid element)
Specified by:
add in interface java.util.List<Solid>

add

public boolean add(Solid e)
Specified by:
add in interface java.util.Collection<Solid>
Specified by:
add in interface java.util.List<Solid>

addAll

public boolean addAll(java.util.Collection<? extends Solid> c)
Specified by:
addAll in interface java.util.Collection<Solid>
Specified by:
addAll in interface java.util.List<Solid>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends Solid> c)
Specified by:
addAll in interface java.util.List<Solid>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<Solid>
Specified by:
clear in interface java.util.List<Solid>

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<Solid>
Specified by:
contains in interface java.util.List<Solid>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<Solid>
Specified by:
containsAll in interface java.util.List<Solid>

get

public Solid get(int index)
Specified by:
get in interface java.util.List<Solid>

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List<Solid>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<Solid>
Specified by:
isEmpty in interface java.util.List<Solid>

iterator

public java.util.Iterator<Solid> iterator()
Specified by:
iterator in interface java.lang.Iterable<Solid>
Specified by:
iterator in interface java.util.Collection<Solid>
Specified by:
iterator in interface java.util.List<Solid>

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List<Solid>

listIterator

public java.util.ListIterator<Solid> listIterator()
Specified by:
listIterator in interface java.util.List<Solid>

listIterator

public java.util.ListIterator<Solid> listIterator(int index)
Specified by:
listIterator in interface java.util.List<Solid>

remove

public Solid remove(int index)
Specified by:
remove in interface java.util.List<Solid>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<Solid>
Specified by:
remove in interface java.util.List<Solid>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<Solid>
Specified by:
removeAll in interface java.util.List<Solid>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<Solid>
Specified by:
retainAll in interface java.util.List<Solid>

set

public Solid set(int index,
                 Solid element)
Specified by:
set in interface java.util.List<Solid>

size

public int size()
Specified by:
size in interface java.util.Collection<Solid>
Specified by:
size in interface java.util.List<Solid>

subList

public java.util.List<Solid> subList(int fromIndex,
                                     int toIndex)
Specified by:
subList in interface java.util.List<Solid>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<Solid>
Specified by:
toArray in interface java.util.List<Solid>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<Solid>
Specified by:
toArray in interface java.util.List<Solid>


Copyright © 2011. All Rights Reserved.