public class AlgorithmServiceImpl extends Object implements AlgorithmService
| Constructor and Description |
|---|
AlgorithmServiceImpl(SemanticSearchService semanticSearchService,
AlgorithmGeneratorService algorithmGeneratorService,
EntityManager entityManager,
JsMagmaScriptEvaluator jsMagmaScriptEvaluator) |
| Modifier and Type | Method and Description |
|---|---|
Object |
apply(AttributeMapping attributeMapping,
Entity sourceEntity,
EntityType sourceEntityType,
int depth)
Applies an
AttributeMapping to a source Entity |
Iterable<AlgorithmEvaluation> |
applyAlgorithm(Attribute targetAttribute,
String algorithm,
Iterable<Entity> sourceEntities,
int depth)
Applies an algorithm to the given attribute of given source entities.
|
void |
autoGenerateAlgorithm(EntityType sourceEntityType,
EntityType targetEntityType,
EntityMapping mapping)
Creates an attribute mapping after the semantic search service finds one
|
String |
generateAlgorithm(Attribute targetAttribute,
EntityType targetEntityType,
List<Attribute> sourceAttributes,
EntityType sourceEntityType)
Generates the algorithm based on the given targetAttribute and sourceAttribute
|
Collection<String> |
getSourceAttributeNames(String algorithmScript)
Retrieves the names of the source attributes in an algorithm
|
public AlgorithmServiceImpl(SemanticSearchService semanticSearchService, AlgorithmGeneratorService algorithmGeneratorService, EntityManager entityManager, JsMagmaScriptEvaluator jsMagmaScriptEvaluator)
public String generateAlgorithm(Attribute targetAttribute, EntityType targetEntityType, List<Attribute> sourceAttributes, EntityType sourceEntityType)
AlgorithmServicegenerateAlgorithm in interface AlgorithmServicepublic void autoGenerateAlgorithm(EntityType sourceEntityType, EntityType targetEntityType, EntityMapping mapping)
AlgorithmServiceautoGenerateAlgorithm in interface AlgorithmServicepublic Iterable<AlgorithmEvaluation> applyAlgorithm(Attribute targetAttribute, String algorithm, Iterable<Entity> sourceEntities, int depth)
AlgorithmServiceapplyAlgorithm in interface AlgorithmServicepublic Object apply(AttributeMapping attributeMapping, Entity sourceEntity, EntityType sourceEntityType, int depth)
AlgorithmServiceAttributeMapping to a source Entityapply in interface AlgorithmServiceattributeMapping - AttributeMapping to applysourceEntity - Entity to apply the mapping topublic Collection<String> getSourceAttributeNames(String algorithmScript)
AlgorithmServicegetSourceAttributeNames in interface AlgorithmServicealgorithmScript - String with the algorithm scriptCopyright © 2018 Pivotal Software, Inc.. All rights reserved.