Class PLP2ProjectConverter
- java.lang.Object
-
- net.ssehub.easy.producer.core.persistence.standard.PLP2ProjectConverter
-
- All Implemented Interfaces:
PersistenceConstants
public class PLP2ProjectConverter extends java.lang.Object implements PersistenceConstants
Stores the information of aPLPInfoin aPersistentProjectto simplify the save process.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private IPersistencerpersistencerprivate PLPInfoplp-
Fields inherited from interface net.ssehub.easy.producer.core.persistence.standard.PersistenceConstants
CONFIG_FILE, EASY_FILES_DEFAULT, INSTANTIATOR_ENGINE, INSTANTIATOR_FILE, INSTANTIATOR_INHERITED, INSTANTIATOR_PATH_REGEX, INSTANTIATOR_PATHS, INSTANTIATOR_UUID, PLP_LOCATION, PLP_VERSION, PRESUCCESSOR_LOCATION, PRESUCCESSOR_MEMEBERNAME, PRESUCCESSOR_UUID, PRESUCCESSOR_VERSION, PTN_PROJECTNAME, PTN_UUID, REASONER_ATTRIBUTE, REASONER_TIMEOUT, REASONER_VALUE_SEPARATOR, REASONER_VALUES, SETTINGS_DEBUG
-
-
Constructor Summary
Constructors Constructor Description PLP2ProjectConverter(PLPInfo plp, IPersistencer persistencer)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PersistentProjectplp2PersistentProject()Converts the givenPLPInfointo aPersistentProject.private voidreasoner2Model(Model reasonerModel, net.ssehub.easy.reasoning.core.reasoner.ReasonerConfiguration reasonerConfig)Converts a ReasonerConfiguration to a persistent model.private Entityrelative2Entity(PLPInfo info)This method converts a predecessor or and successor to an entity.
-
-
-
Field Detail
-
plp
private PLPInfo plp
-
persistencer
private IPersistencer persistencer
-
-
Constructor Detail
-
PLP2ProjectConverter
public PLP2ProjectConverter(PLPInfo plp, IPersistencer persistencer)
Sole constructor for this class.- Parameters:
plp- ThePLPInfowhich shall be saved.persistencer- TheIPersistencerwhich shall save thePLPInfo.
-
-
Method Detail
-
plp2PersistentProject
public PersistentProject plp2PersistentProject() throws PersistenceException
Converts the givenPLPInfointo aPersistentProject.- Returns:
- The converted
PLPInfo. - Throws:
PersistenceException- In case of any configuration errors
-
reasoner2Model
private void reasoner2Model(Model reasonerModel, net.ssehub.easy.reasoning.core.reasoner.ReasonerConfiguration reasonerConfig)
Converts a ReasonerConfiguration to a persistent model.- Parameters:
reasonerModel- The persistent model, where the configuration should be stored to.reasonerConfig- The origin data which should be saved persistently.
-
-