Class PipelineSpecificationBasic
- java.lang.Object
-
- org.apache.manifoldcf.crawler.system.PipelineSpecificationBasic
-
- All Implemented Interfaces:
IPipelineSpecificationBasic
public class PipelineSpecificationBasic extends java.lang.Object implements IPipelineSpecificationBasic
Basic pipeline specification implementation. Constructed from a job description.
-
-
Field Summary
Fields Modifier and Type Field Description protected IJobDescription
job
protected int[]
outputs
protected int[][]
pipelineStageChildren
-
Fields inherited from interface org.apache.manifoldcf.agents.interfaces.IPipelineSpecificationBasic
_rcsid
-
-
Constructor Summary
Constructors Constructor Description PipelineSpecificationBasic(IJobDescription job)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkStageOutputConnection(int stage)
Check if a stage is an output stage.int
getOutputCount()
Return the number of output connections.int
getOutputStage(int index)
Given an output index, return the stage number for that output.int[]
getStageChildren(int stage)
Find children of a given pipeline stage.java.lang.String
getStageConnectionName(int stage)
Get the connection name for a pipeline stage.int
getStageCount()
Get a count of all stages.int
getStageParent(int stage)
Find parent of a given pipeline stage.
-
-
-
Field Detail
-
job
protected final IJobDescription job
-
pipelineStageChildren
protected final int[][] pipelineStageChildren
-
outputs
protected final int[] outputs
-
-
Constructor Detail
-
PipelineSpecificationBasic
public PipelineSpecificationBasic(IJobDescription job)
-
-
Method Detail
-
getStageCount
public int getStageCount()
Get a count of all stages.- Specified by:
getStageCount
in interfaceIPipelineSpecificationBasic
- Returns:
- the total count of all stages.
-
getStageChildren
public int[] getStageChildren(int stage)
Find children of a given pipeline stage. Pass -1 to find the children of the root stage.- Specified by:
getStageChildren
in interfaceIPipelineSpecificationBasic
- Parameters:
stage
- is the stage index to get the children of.- Returns:
- the pipeline stages that represent those children.
-
getStageParent
public int getStageParent(int stage)
Find parent of a given pipeline stage. Returns -1 if there's no parent (it's the root).- Specified by:
getStageParent
in interfaceIPipelineSpecificationBasic
- Parameters:
stage
- is the stage index to get the parent of.- Returns:
- the pipeline stage that is the parent, or -1.
-
getStageConnectionName
public java.lang.String getStageConnectionName(int stage)
Get the connection name for a pipeline stage.- Specified by:
getStageConnectionName
in interfaceIPipelineSpecificationBasic
- Parameters:
stage
- is the stage to get the connection name for.- Returns:
- the connection name for that stage.
-
checkStageOutputConnection
public boolean checkStageOutputConnection(int stage)
Check if a stage is an output stage.- Specified by:
checkStageOutputConnection
in interfaceIPipelineSpecificationBasic
- Parameters:
stage
- is the stage to check.- Returns:
- true if the stage represents an output connection.
-
getOutputCount
public int getOutputCount()
Return the number of output connections.- Specified by:
getOutputCount
in interfaceIPipelineSpecificationBasic
- Returns:
- the total number of output connections in this specification.
-
getOutputStage
public int getOutputStage(int index)
Given an output index, return the stage number for that output.- Specified by:
getOutputStage
in interfaceIPipelineSpecificationBasic
- Parameters:
index
- is the output connection index.- Returns:
- the stage number.
-
-