T - PD entity class (translatable to PI)E - PI entity class@Beta
public interface PiTranslator<T extends PiTranslatable,E extends PiEntity>
| Modifier and Type | Method and Description |
|---|---|
void |
forget(PiHandle<E> handle)
Removes any mapping for the given PI entity handle.
|
void |
learn(PiHandle<E> handle,
PiTranslatedEntity<T,E> entity)
Stores a mapping between the given translated entity and handle.
|
java.util.Optional<PiTranslatedEntity<T,E>> |
lookup(PiHandle<E> handle)
Returns a PI translated entity that was previously associated with the
given handle, if present.
|
E |
translate(T original,
PiPipeconf pipeconf)
Translate the given PD entity (original) and returns a PI entity that is
equivalent to he PD one for the given pipeconf.
|
E translate(T original, PiPipeconf pipeconf) throws PiTranslationException
original - PD entitypipeconf - pipeconfPiTranslationException - if a translation is not possible (see
message for an explanation)void learn(PiHandle<E> handle, PiTranslatedEntity<T,E> entity)
handle - PI entity handleentity - PI translated entityjava.util.Optional<PiTranslatedEntity<T,E>> lookup(PiHandle<E> handle)
learn(PiHandle,
PiTranslatedEntity)) or that it has been removed (via forget(PiHandle)). thehandle - PI entity handle