1 /*
2 * ParallelSpaceModel.java
3 *
4 * Created on 18. November 2001, 19:59
5 *
6 * Copyright 2001 Flo ledermann flo@subnet.at
7 *
8 * Licensed under GNU General Public License (GPL).
9 * See http://www.gnu.org/copyleft/gpl.html
10 */
11
12 package edu.psu.geovista.app.parvis.model;
13
14 import javax.swing.event.*;
15 import java.util.*;
16
17 /***
18 * Defines the data model for Parallel Coordinate visualisation.
19 * The model is defined as read-only because the source of the data is not
20 * known and currently no data modification operations are provided. An optional
21 * writeback interface might be developed in the future.
22 *
23 * @author flo
24 * @version 0.1
25 */
26 public interface ParallelSpaceModel {
27
28 /***
29 * Subscribes a ChangeListener with the model.
30 *
31 * @param l The ChangeListener to be notified when values change.
32 */
33 void addChangeListener(ChangeListener l);
34
35 /***
36 * Removes a previously subscribed changeListener.
37 *
38 * @param l The ChangeListener to be removed from the model.
39 */
40 void removeChangeListener(ChangeListener l);
41
42 /***
43 * Returns the number of dimensions (=columns) of the dataset.
44 *
45 * @return Number of dimensions of the data.
46 */
47 public int getNumDimensions();
48
49 /***
50 * Returns the number of records in the dataset.
51 *
52 * @return Number of records in the dataset.
53 */
54 public int getNumRecords();
55
56 /***
57 * Returns the maximum value for the given dimension.
58 *
59 * @return Maximum value of all records for the given dimension.
60 */
61 public float getMaxValue(int dimension);
62
63 /***
64 * Returns the minimum value for the given dimension.
65 *
66 * @return Minimum value of all records for the given dimension.
67 */
68 public float getMinValue(int dimension);
69
70 /***
71 * Returns a specific value of the dataset.
72 *
73 * @param record The number of the record to be queried.
74 * @param dimension The value of the record to be returned.
75 *
76 * @return The value specified by record, dimension.
77 */
78 public float getValue(int record, int dimension);
79
80 /***
81 * Returns all values of a specific record.
82 *
83 * @param record The number of the record to be returned.
84 *
85 * @return All values of the specified record..
86 */
87 public float[] getValues(int record);
88
89 /***
90 * Returns a String label for a specific dimension.
91 *
92 * @param dimension The dimension.
93 *
94 * @return A Human-readable label for the dimension.
95 */
96 public String getAxisLabel(int dimension);
97
98 /***
99 * Returns a Hashtable with labels for specific values. This is provided for
100 * ordinal values, which might be added as keys to the Hashtable, with the
101 * corresponding human-readable labels as values.
102 *
103 * @param dimension The dimension to retrieve value labels for.
104 *
105 * @return A Hashtable containing value-label pairs.
106 */
107 public Hashtable getValueLabels(int dimension);
108
109 /***
110 * Returns the label for a single value in a specific dimension, if present.
111 *
112 * @param dimension The dimension.
113 * @param value The value to look up a label for.
114 *
115 * @return A String with the label, null if no label is set.
116 */
117 public String getValueLabel(int dimension, float value);
118
119 /***
120 * Returns a human-readable label for a specific record.
121 *
122 * @param num The record number.
123 *
124 * @retrun A human-readable label for the record.
125 */
126 public String getRecordLabel(int num);
127
128 }
129
This page was automatically generated by Maven