deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

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:
Iterable<Solid>, Collection<Solid>, List<Solid>, 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, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultCompositeSolid(String id, CRS crs, PrecisionModel pm, 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(Collection<? extends Solid> c)
           
 boolean addAll(int index, Collection<? extends Solid> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(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.
 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(Object o)
           
 boolean isEmpty()
           
 Iterator<Solid> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<Solid> listIterator()
           
 ListIterator<Solid> listIterator(int index)
           
 Solid remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 Solid set(int index, Solid element)
           
 int size()
           
 List<Solid> subList(int fromIndex, int toIndex)
           
 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(String id,
                             CRS crs,
                             PrecisionModel pm,
                             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 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 List<Solid>

add

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

addAll

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

addAll

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

clear

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

contains

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

containsAll

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

get

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

indexOf

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

isEmpty

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

iterator

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

lastIndexOf

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

listIterator

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

listIterator

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

remove

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

remove

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

removeAll

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

retainAll

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

set

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

size

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

subList

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

toArray

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

toArray

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

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>