Class AlgorithmBuilderService
java.lang.Object
es.urjc.etsii.grafo.autoconfig.builder.AlgorithmBuilderService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAlgorithm<?, ?> buildAlgorithm(ComponentSpec spec) Build an algorithm from a component specification.Build any algorithm component from a component specification.buildAlgorithmComponentByName(String name, Map<String, Object> params) Build any algorithm component given its name and a map of parametersParse a JSON component description and build it.Algorithm<?, ?> buildAlgorithmFromJson(String json) Parse a JSON algorithm description and build it.toJson(ComponentSpec spec) tools.jackson.databind.JsonNodetoJsonTree(ComponentSpec spec)
-
Constructor Details
-
AlgorithmBuilderService
-
-
Method Details
-
buildAlgorithmComponentByName
Build any algorithm component given its name and a map of parameters- Parameters:
name- component name, can be either an alias, a factory reference or a classnameparams- parameter map used to create this component, provides the necessary args to call the constructor- Returns:
- built component
-
buildAlgorithm
Build an algorithm from a component specification.- Parameters:
spec- algorithm component specification- Returns:
- built algorithm
- Throws:
AlgorithmParsingException- if the built component is not a valid algorithm
-
buildAlgorithmFromJson
-
buildAlgorithmComponent
Build any algorithm component from a component specification.- Parameters:
spec- component specification- Returns:
- built component
-
buildAlgorithmComponentFromJson
-
toJson
-
toJsonTree
-