Commit ae9dfaf9 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Added PointInformation to enable abstraction

parent 6874bc2d
...@@ -27,5 +27,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.HostComponent; ...@@ -27,5 +27,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.HostComponent;
public interface CachingComponent extends HostComponent { public interface CachingComponent extends HostComponent {
<T extends Object> List<T> getCacheEntries(Class<T> pCacheEntryClass); <T extends Object> List<T> getCacheEntries(Class<T> pCacheEntryClass);
<T extends Object> boolean containsEntry(T pCacheEntry);
<T extends Object> void storeCacheEntry(T pCacheEntry); <T extends Object> void storeCacheEntry(T pCacheEntry);
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
package de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.invalidation; package de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.invalidation;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance.VehicularPointInformation; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.VehicularPointInformation;
public interface CacheInvalidationStrategy { public interface CacheInvalidationStrategy {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
package de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.replacement; package de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.replacement;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance.VehicularPointInformation; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.VehicularPointInformation;
public interface CacheReplacementStrategy { public interface CacheReplacementStrategy {
......
/*
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of Simonstrator.KOM.
*
* Simonstrator.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
*/
package de.tudarmstadt.maki.simonstrator.api.component.vehicular.information;
import java.util.List;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
/**
* An information in a vehicular scenario is always associated with a location
* and a creation time. Those properties are crucial to evaluate the existence
* of an object.
*
* @author Tobias Meuser
* @version 1.0.0
*
*/
public interface PointInformation {
/**
* This method provides the location of the detected event.
*
* @return The location of the event.
*/
Location getLocation();
/**
* This method provides the detection date of the event. This is required to
* decide on the freshness of a detected event.
*
* @return The detection timestamp of the event.
*/
long getDetectionDate();
<T extends Object> void setAttribute(String pKey, T pValue);
<T extends Object> T getAttribute(String pKey);
<T extends Object> List<T> getAttributes();
<T extends Object> boolean hasAttribute(String pKey);
}
...@@ -18,9 +18,8 @@ ...@@ -18,9 +18,8 @@
* *
*/ */
package de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance; package de.tudarmstadt.maki.simonstrator.api.component.vehicular.information;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge;
/** /**
...@@ -32,7 +31,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.Road ...@@ -32,7 +31,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.Road
* @version 1.0.0 * @version 1.0.0
* *
*/ */
public interface VehicularPointInformation { public interface VehicularPointInformation extends PointInformation {
/** /**
* The edge of an information is required to decide whether the event is on * The edge of an information is required to decide whether the event is on
...@@ -42,19 +41,4 @@ public interface VehicularPointInformation { ...@@ -42,19 +41,4 @@ public interface VehicularPointInformation {
* @return The edge of the event. * @return The edge of the event.
*/ */
RoadNetworkEdge getEdge(); RoadNetworkEdge getEdge();
/**
* This method provides the location of the detected event.
*
* @return The location of the event.
*/
Location getLocation();
/**
* This method provides the detection date of the event. This is required to
* decide on the freshness of a detected event.
*
* @return The detection timestamp of the event.
*/
long getDetectionDate();
} }
...@@ -22,6 +22,7 @@ package de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance; ...@@ -22,6 +22,7 @@ package de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance;
import de.tudarmstadt.maki.simonstrator.api.component.HostComponent; import de.tudarmstadt.maki.simonstrator.api.component.HostComponent;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.VehicleInformationComponent; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.VehicleInformationComponent;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.VehicularPointInformation;
/** /**
* This interface provide methods to calculate the relevance of an event for a * This interface provide methods to calculate the relevance of an event for a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment