Class StyleVisitorCoverageProcessingNodeAdapter
Object
StyleVisitorAdapter
StyleVisitorCoverageProcessingNodeAdapter
- All Implemented Interfaces:
StyleVisitor
,CoverageProcessingNode
- Direct Known Subclasses:
SubchainStyleVisitorCoverageProcessingAdapter
public abstract class StyleVisitorCoverageProcessingNodeAdapter
extends StyleVisitorAdapter
implements StyleVisitor, CoverageProcessingNode
This class implements an adapter to allow a
CoverageProcessingNode
to feed itself by visiting an SLD
Style
.
This class can be used to tie together CoverageProcessingNode
s built from a chains as specified by the
RasterSymbolizer
SLd element.
- Author:
- Simone Giannecchini, GeoSolutions
-
Constructor Summary
ConstructorsConstructorDescriptionStyleVisitorCoverageProcessingNodeAdapter
(int maxSources, InternationalString name, InternationalString description) Default constructor that gives users the possibilityStyleVisitorCoverageProcessingNodeAdapter
(int maxSources, Hints hints, InternationalString name, InternationalString description) Default constructor that gives users the possibilityStyleVisitorCoverageProcessingNodeAdapter
(InternationalString name, InternationalString description) Default constructor forStyleVisitorCoverageProcessingNodeAdapter
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a sinkCoverageProcessingNode
to the list of sinks for thisCoverageProcessingNode
.boolean
addSource
(CoverageProcessingNode source) Adds a sourceCoverageProcessingNode
to the list of sources for thisCoverageProcessingNode
.void
dispose
(boolean force) Disposes all the resources used by thisCoverageProcessingNode
.protected abstract GridCoverage
execute()
protected CoverageProcessingNode
Allows subclasses to access theCoverageProcessingNode
we are adapting.TheGridCoverageFactory
we will internally use for build intermediate and outputGridCoverage2D
.Retrieves the description for thisCoverageProcessingNode
getHints()
Getter forHints
.getName()
Retrieves the name for thisCoverageProcessingNode
int
Returns the number of sinks for thisCoverageProcessingNode
.int
Returns the number of sources for thisCoverageProcessingNode
.Forces this node to create the output coverage for the operation represented by this node.getSink
(int index) getSinks()
Retrieves theList
of sinks for thisCoverageProcessingNode
.getSource
(int index) Retrieves theList
of source for thisCoverageProcessingNode
.removeSink
(int index) Removes a sinkCoverageProcessingNode
from the list of sinks for thisCoverageProcessingNode
.boolean
Removes a sinkCoverageProcessingNode
from the list of sinks for thisCoverageProcessingNode
.removeSource
(int index) Removes a sourceCoverageProcessingNode
to the list of sources for thisCoverageProcessingNode
.boolean
removeSource
(CoverageProcessingNode source) Removes a sourceCoverageProcessingNode
to the list of sources for thisCoverageProcessingNode
.toString()
Provides a descriptive description for thisCoverageProcessingNode
.Methods inherited from class StyleVisitorAdapter
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Constructor Details
-
StyleVisitorCoverageProcessingNodeAdapter
- Parameters:
adaptee
-
-
StyleVisitorCoverageProcessingNodeAdapter
public StyleVisitorCoverageProcessingNodeAdapter(InternationalString name, InternationalString description) Default constructor forStyleVisitorCoverageProcessingNodeAdapter
-
StyleVisitorCoverageProcessingNodeAdapter
public StyleVisitorCoverageProcessingNodeAdapter(int maxSources, InternationalString name, InternationalString description) Default constructor that gives users the possibility- Parameters:
maxSources
- maximum number of sources allowed for this node.
-
StyleVisitorCoverageProcessingNodeAdapter
public StyleVisitorCoverageProcessingNodeAdapter(int maxSources, Hints hints, InternationalString name, InternationalString description) Default constructor that gives users the possibility- Parameters:
maxSources
- maximum number of sources allowed for this node.hints
- instance ofHints
class to control creation of internal factories. It can benull
.
-
-
Method Details
-
getAdaptee
Allows subclasses to access theCoverageProcessingNode
we are adapting.- Returns:
- the adaptee
- UML property:
- name="adaptee"
-
execute
- See Also:
-
addSink
Description copied from interface:CoverageProcessingNode
Adds a sinkCoverageProcessingNode
to the list of sinks for thisCoverageProcessingNode
.- Specified by:
addSink
in interfaceCoverageProcessingNode
- Parameters:
sink
- theCoverageProcessingNode
to add to theList
of sinks for thisCoverageProcessingNode
.
-
addSource
Description copied from interface:CoverageProcessingNode
Adds a sourceCoverageProcessingNode
to the list of sources for thisCoverageProcessingNode
.- Specified by:
addSource
in interfaceCoverageProcessingNode
- Parameters:
source
- theCoverageProcessingNode
to add to theList
of sources for thisCoverageProcessingNode
.- Returns:
true
if everything goes fine,false
otherwise.
-
getOutput
Description copied from interface:CoverageProcessingNode
Forces this node to create the output coverage for the operation represented by this node.- Specified by:
getOutput
in interfaceCoverageProcessingNode
- Returns:
- the
Coverage
which represents the output for thisCoverageProcessingNode
.
-
getSink
Description copied from interface:CoverageProcessingNode
- Specified by:
getSink
in interfaceCoverageProcessingNode
- Parameters:
index
- is the zero-based index for the source we want to access.- Returns:
- the
CoverageProcessingNode
which represents the source at indexindex
for thisCoverageProcessingNode
.
-
getSinks
Description copied from interface:CoverageProcessingNode
Retrieves theList
of sinks for thisCoverageProcessingNode
. Each sink MUST be aCoverageProcessingNode
.- Specified by:
getSinks
in interfaceCoverageProcessingNode
- Returns:
- a
List
ofCoverageProcessingNode
which represents the sinks for thisCoverageProcessingNode
.
-
getSource
Description copied from interface:CoverageProcessingNode
- Specified by:
getSource
in interfaceCoverageProcessingNode
- Parameters:
index
- is the zero-based index for the sink we want to get.- Returns:
- the
CoverageProcessingNode
which represents the sink at indexindex
for thisCoverageProcessingNode
.
-
getSources
Description copied from interface:CoverageProcessingNode
Retrieves theList
of source for thisCoverageProcessingNode
. Each source MUST be aCoverageProcessingNode
.- Specified by:
getSources
in interfaceCoverageProcessingNode
- Returns:
- a
List
ofCoverageProcessingNode
which represents the sources for thisCoverageProcessingNode
.
-
removeSink
Description copied from interface:CoverageProcessingNode
Removes a sinkCoverageProcessingNode
from the list of sinks for thisCoverageProcessingNode
.- Specified by:
removeSink
in interfaceCoverageProcessingNode
- Parameters:
sink
- theCoverageProcessingNode
to remove from theList
of sinks for thisCoverageProcessingNode
.- Returns:
true
in case we remove something,false
otherwise.
-
removeSink
Description copied from interface:CoverageProcessingNode
Removes a sinkCoverageProcessingNode
from the list of sinks for thisCoverageProcessingNode
.- Specified by:
removeSink
in interfaceCoverageProcessingNode
- Parameters:
index
- the index at which we want to remove a sink from theList
of sinks for thisCoverageProcessingNode
.- Returns:
- the
CoverageProcessingNode
we actually remove from the sinks list.
-
removeSource
Description copied from interface:CoverageProcessingNode
Removes a sourceCoverageProcessingNode
to the list of sources for thisCoverageProcessingNode
.- Specified by:
removeSource
in interfaceCoverageProcessingNode
- Parameters:
source
- theCoverageProcessingNode
to remove from theList
of sources for thisCoverageProcessingNode
.- Returns:
true
in case we remove something,false
otherwise.
-
removeSource
Description copied from interface:CoverageProcessingNode
Removes a sourceCoverageProcessingNode
to the list of sources for thisCoverageProcessingNode
.- Specified by:
removeSource
in interfaceCoverageProcessingNode
- Parameters:
index
- the index at which we want to remove a source from theList
of sources for thisCoverageProcessingNode
.- Returns:
- the
CoverageProcessingNode
we actually remove from the sources list.
-
dispose
public void dispose(boolean force) Description copied from interface:CoverageProcessingNode
Disposes all the resources used by thisCoverageProcessingNode
.- Specified by:
dispose
in interfaceCoverageProcessingNode
- Parameters:
force
-true
to force disposal,false
to suggest disposal.
-
getHints
Description copied from interface:CoverageProcessingNode
Getter forHints
.- Specified by:
getHints
in interfaceCoverageProcessingNode
- Returns:
Hints
provided at construction time to controlGridCoverageFactory
creation.
-
getNumberOfSinks
public int getNumberOfSinks()Description copied from interface:CoverageProcessingNode
Returns the number of sinks for thisCoverageProcessingNode
.- Specified by:
getNumberOfSinks
in interfaceCoverageProcessingNode
- Returns:
- the number of sinks for this
CoverageProcessingNode
.
-
getNumberOfSources
public int getNumberOfSources()Description copied from interface:CoverageProcessingNode
Returns the number of sources for thisCoverageProcessingNode
.- Specified by:
getNumberOfSources
in interfaceCoverageProcessingNode
- Returns:
- the number of sources for this
CoverageProcessingNode
.
-
getDescription
Description copied from interface:CoverageProcessingNode
Retrieves the description for thisCoverageProcessingNode
- Specified by:
getDescription
in interfaceCoverageProcessingNode
- Returns:
- the description for this
CoverageProcessingNode
-
getName
Description copied from interface:CoverageProcessingNode
Retrieves the name for thisCoverageProcessingNode
- Specified by:
getName
in interfaceCoverageProcessingNode
- Returns:
- the name for this
CoverageProcessingNode
-
toString
Description copied from interface:CoverageProcessingNode
Provides a descriptive description for thisCoverageProcessingNode
.- Specified by:
toString
in interfaceCoverageProcessingNode
- Overrides:
toString
in classObject
- Returns:
- a descriptive description for this
CoverageProcessingNode
-
getCoverageFactory
Description copied from interface:CoverageProcessingNode
TheGridCoverageFactory
we will internally use for build intermediate and outputGridCoverage2D
.- Specified by:
getCoverageFactory
in interfaceCoverageProcessingNode
- Returns:
- a
GridCoverageFactory
we will internally use for build intermediate and outputGridCoverage2D
.
-