feat: implement control functions
This commit is contained in:
parent
69ae083224
commit
0843ac7205
2 changed files with 21 additions and 20 deletions
|
@ -1,25 +1,26 @@
|
|||
package semantic.controler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import semantic.model.IConvenienceInterface;
|
||||
import semantic.model.IModelFunctions;
|
||||
import semantic.model.ObservationEntity;
|
||||
|
||||
public class DoItYourselfControl implements IControlFunctions
|
||||
{
|
||||
private IConvenienceInterface model;
|
||||
private IModelFunctions cusotmModel;
|
||||
|
||||
public DoItYourselfControl(IConvenienceInterface model, IModelFunctions customModel)
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class DoItYourselfControl implements IControlFunctions {
|
||||
private final IConvenienceInterface model;
|
||||
private final IModelFunctions customModel;
|
||||
|
||||
public DoItYourselfControl(IConvenienceInterface model, IModelFunctions customModel) {
|
||||
this.model = model;
|
||||
this.cusotmModel = customModel;
|
||||
this.customModel = customModel;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void instantiateObservations(List<ObservationEntity> obsList,
|
||||
String paramURI) {
|
||||
// TODO Auto-generated method stub
|
||||
String paramURI) {
|
||||
obsList.forEach(observationEntity -> customModel.createObs(
|
||||
observationEntity.getValue().toString(),
|
||||
paramURI,
|
||||
customModel.createInstant(observationEntity.getTimestamp())));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package semantic.controler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import semantic.model.ObservationEntity;
|
||||
|
||||
public interface IControlFunctions
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public interface IControlFunctions {
|
||||
/**
|
||||
* This function parses the list of observations extracted from the dataset,
|
||||
* and instanciates them in the knowledge base.
|
||||
* This function parses the list of observations extracted from the dataset,
|
||||
* and instantiates them in the knowledge base.
|
||||
*
|
||||
* @param obsList
|
||||
* @param phenomenonURI
|
||||
*/
|
||||
public void instantiateObservations(List<ObservationEntity> obsList, String phenomenonURI);
|
||||
void instantiateObservations(List<ObservationEntity> obsList, String phenomenonURI);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue