Package org.jesterj.ingest.model.impl
Class PlanImpl
- java.lang.Object
-
- org.jesterj.ingest.model.impl.PlanImpl
-
- All Implemented Interfaces:
Active,Configurable,Plan
public class PlanImpl extends java.lang.Object implements Plan
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlanImpl.Builder
-
Field Summary
-
Fields inherited from interface org.jesterj.ingest.model.Configurable
VALID_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPlanImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Begin processing.voiddeactivate()Stop processing.StepfindStep(java.lang.String stepName)Locate the step in the plan that has the given name.java.lang.StringgetDocIdField()This is the field that is to be used as a docIdStep[]getExecutableSteps()Get the subset of steps that will execute when the plan is activated.java.lang.StringgetName()A name for this object to distinguish it from other objects.Step[]getSteps()Return everyStepin the plan regardless of whether it will be executing when the plan is activatedintgetVersion()A (usually serially incremented) version identifier for a plan.booleanisActive()Test to see if the object is activeguru.nidi.graphviz.engine.Renderervisualize(guru.nidi.graphviz.engine.Format format)Produce an image visualization of this plan-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jesterj.ingest.model.Configurable
isValidName
-
-
-
-
Method Detail
-
getSteps
public Step[] getSteps()
Description copied from interface:PlanReturn everyStepin the plan regardless of whether it will be executing when the plan is activated
-
getExecutableSteps
public Step[] getExecutableSteps()
Description copied from interface:PlanGet the subset of steps that will execute when the plan is activated. This should be a continuous set of steps that can be traversed in total viaStep.getNextSteps(Document).- Specified by:
getExecutableStepsin interfacePlan- Returns:
- an Array of steps in the plan that will be executed
-
getDocIdField
public java.lang.String getDocIdField()
Description copied from interface:PlanThis is the field that is to be used as a docId- Specified by:
getDocIdFieldin interfacePlan- Returns:
- usually "id" but some legacy indexes may need to use something else
-
findStep
public Step findStep(java.lang.String stepName)
Description copied from interface:PlanLocate the step in the plan that has the given name. All steps in the plan must have a unique name.
-
visualize
public guru.nidi.graphviz.engine.Renderer visualize(guru.nidi.graphviz.engine.Format format)
Description copied from interface:PlanProduce an image visualization of this plan
-
getVersion
public int getVersion()
Description copied from interface:PlanA (usually serially incremented) version identifier for a plan. Changing the version of the plan indicates that the processing has changed substantially, and that prior indexing no longer is considered to have produced the desired output. The practical implication of changing the plan version is that all documents will become eligible for re-indexing.- Specified by:
getVersionin interfacePlan- Returns:
- a numeric identifier which changes when prior indexing is invalidated and there is a need for re-indexing. Monotonically increasing positive numbers are recommended but not absolutely required.
-
activate
public void activate()
Description copied from interface:ActiveBegin processing. This is the on switch.
-
deactivate
public void deactivate()
Description copied from interface:ActiveStop processing. This is the stop switch.- Specified by:
deactivatein interfaceActive
-
isActive
public boolean isActive()
Description copied from interface:ActiveTest to see if the object is active
-
getName
public java.lang.String getName()
Description copied from interface:ConfigurableA name for this object to distinguish it from other objects. This value is generally supplied by the plan author. Every object in a plan must have a unique name, begin with a letter and only contain letters, digits, underscores and periods.- Specified by:
getNamein interfaceConfigurable- Returns:
- The user supplied name for this step
-
-