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;
|
package semantic.controler;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import semantic.model.IConvenienceInterface;
|
import semantic.model.IConvenienceInterface;
|
||||||
import semantic.model.IModelFunctions;
|
import semantic.model.IModelFunctions;
|
||||||
import semantic.model.ObservationEntity;
|
import semantic.model.ObservationEntity;
|
||||||
|
|
||||||
public class DoItYourselfControl implements IControlFunctions
|
import java.util.List;
|
||||||
{
|
|
||||||
private IConvenienceInterface model;
|
public class DoItYourselfControl implements IControlFunctions {
|
||||||
private IModelFunctions cusotmModel;
|
private final IConvenienceInterface model;
|
||||||
|
private final IModelFunctions customModel;
|
||||||
public DoItYourselfControl(IConvenienceInterface model, IModelFunctions customModel)
|
|
||||||
{
|
public DoItYourselfControl(IConvenienceInterface model, IModelFunctions customModel) {
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.cusotmModel = customModel;
|
this.customModel = customModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void instantiateObservations(List<ObservationEntity> obsList,
|
public void instantiateObservations(List<ObservationEntity> obsList,
|
||||||
String paramURI) {
|
String paramURI) {
|
||||||
// TODO Auto-generated method stub
|
obsList.forEach(observationEntity -> customModel.createObs(
|
||||||
|
observationEntity.getValue().toString(),
|
||||||
|
paramURI,
|
||||||
|
customModel.createInstant(observationEntity.getTimestamp())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package semantic.controler;
|
package semantic.controler;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import semantic.model.ObservationEntity;
|
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,
|
* This function parses the list of observations extracted from the dataset,
|
||||||
* and instanciates them in the knowledge base.
|
* and instantiates them in the knowledge base.
|
||||||
|
*
|
||||||
* @param obsList
|
* @param obsList
|
||||||
* @param phenomenonURI
|
* @param phenomenonURI
|
||||||
*/
|
*/
|
||||||
public void instantiateObservations(List<ObservationEntity> obsList, String phenomenonURI);
|
void instantiateObservations(List<ObservationEntity> obsList, String phenomenonURI);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue