Interface GraphModel<D extends GraphData>

All Known Subinterfaces:
GraphGroupModel, HoseGraphModel, IncidentGraphModel, LineGraphModel
All Known Implementing Classes:
AbstractGraphGroupModel, AbstractHoseGraphModel, AbstractIncidentGraphModel, AbstractLineGraphModel, AggregatingLineGraphModel, DelegatingHoseModel, PartitioningTimestampsLineGraphModel

public interface GraphModel<D extends GraphData>
  • Method Details

    • onDataChanged

      Event<java.lang.Void> onDataChanged()
    • getDomainX

      Interval getDomainX()
    • getData

      D getData​(TimePartitioning zoomLevel, java.time.ZoneId zoneId, Interval neededInterval, Interval displayedInterval)
      Retrieves graph data (GraphData) for the specified zoomLevel and {cod@ neededInterval}.

      The model MAY choose return more data than needed, covering a larger interval than requested.
      However, the result MUST at least cover neededInterval!
      If the model delegates to multiple sub-models for different graphs, its aggregated GraphData object should use the intersection of the sub-model's GraphData.getInterval() as its own GraphData.getInterval().

      Parameters:
      zoomLevel - the requested zoom level
      zoneId - the zoneId to apply when partitioning over time
      neededInterval - the time interval requested by the client
      displayedInterval - the time interval displayed by the client
      Returns:
      graph data