public class Test4 extends Object implements StandardCBRApplication
Case | +- Description | | | +- caseId | +- HollidayType | +- Price | +- NumberOfPersons | +- Region | | | | | +- regionId | | +- regionName | | +- NearestCity | | +- Airport | | +- Currency | +- Transportation | +- Duration | +- Season | +- Accomodation | +- Hotel | +- Solution | +- id +- price +- hotelSolution is stored in the TravelSolution bean (CaseComponent). This bean could be saved into a separate table, but here were are going to show how to use the same table than the description. This way, the mapping is:
To configure these mapping we must modify or create the following files:
<SolutionMappingFile>es/ucm/fdi/gaia/jcolibri/test/test4/TravelSolution.hbm.xml</SolutionMappingFile> <SolutionClassName>es.ucm.fdi.gaia.jcolibri.test.test4.TravelSolution</SolutionClassName>
<hibernate-mapping default-lazy="false"> <class name="es.ucm.fdi.gaia.jcolibri.test.test4.TravelSolution" table="travel"> <id name="id" column="caseId"></id> <property name="price" column="Price"/> <property name="hotel" column="Hotel"/> </class> </hibernate-mapping>
This method also shows how to perform a simple adaptation based in the DirectProportion method that modifies the value of an attribute of the solution depending on the value in the query and retrieved case of other attribute of the description.
TravelDescription
,
Region
,
TravelSolution
,
jcolibri.method.reuse.NumericDirectProportionMethod
Constructor and Description |
---|
Test4() |
Modifier and Type | Method and Description |
---|---|
void |
configure() |
void |
cycle(CBRQuery query) |
static void |
main(String[] args) |
void |
postCycle() |
CBRCaseBase |
preCycle() |
public Test4()
public void configure() throws ExecutionException
configure
in interface StandardCBRApplication
ExecutionException
public CBRCaseBase preCycle() throws ExecutionException
preCycle
in interface StandardCBRApplication
ExecutionException
public void cycle(CBRQuery query) throws ExecutionException
cycle
in interface StandardCBRApplication
ExecutionException
public void postCycle() throws ExecutionException
postCycle
in interface StandardCBRApplication
ExecutionException
Copyright © 2018 Group of Artificial Intelligence Applications (GAIA). All rights reserved.