EMlab-generation Documentation  1.0
Documentation of the EMLab-Generation model.
CommoditySupplier.java
1 /*******************************************************************************
2  * Copyright 2012 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************/
16 package emlab.gen.domain.agent;
17 
18 import org.neo4j.graphdb.Direction;
19 import org.springframework.data.neo4j.annotation.NodeEntity;
20 import org.springframework.data.neo4j.annotation.RelatedTo;
21 
22 import agentspring.agent.Agent;
25 
26 @NodeEntity
27 public class CommoditySupplier extends DecarbonizationAgent implements Agent {
28 
29  @RelatedTo(type = "SUBSTANCE", elementClass = Substance.class, direction = Direction.OUTGOING)
30  private Substance substance;
31 
32  @RelatedTo(type = "TREND", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
33  private TimeSeriesImpl priceOfCommodity;
34 
35  public Substance getSubstance() {
36  return substance;
37  }
38 
39  public void setSubstance(Substance substance) {
40  this.substance = substance;
41  }
42 
43  public TimeSeriesImpl getPriceOfCommodity() {
44  return priceOfCommodity;
45  }
46 
47  public void setPriceOfCommodity(TimeSeriesImpl priceOfCommodity) {
48  this.priceOfCommodity = priceOfCommodity;
49  }
50 
51  public double getAmountOfCommodity() {
52  return Double.MAX_VALUE;
53  }
54 }