blob: 1a1d2340c2b49d9ee401a2b15bc78935e954af18 [file] [log] [blame]
Steven Burrows3a9a6442016-05-05 15:31:16 +01001/*
Brian O'Connor0a4e6742016-09-15 23:03:10 -07002 * Copyright 2016-present Open Networking Laboratory
Steven Burrows3a9a6442016-05-05 15:31:16 +01003 *
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
17package org.onosproject.ui;
18
19/**
Simon Hunt8add9ee2016-09-20 17:05:07 -070020 * Represents a geographically-based map to be used in the user interface
21 * topology view. Instances of this class are immutable.
Steven Burrows3a9a6442016-05-05 15:31:16 +010022 */
23public class UiTopoMap {
24
25 private final String id;
Simon Hunt8add9ee2016-09-20 17:05:07 -070026 private final String desc;
Steven Burrows3a9a6442016-05-05 15:31:16 +010027 private final String filePath;
28 private final double scale;
29
30
31 /**
32 * Creates a new topology map.
33 *
34 * @param id map identifier
Simon Hunt8add9ee2016-09-20 17:05:07 -070035 * @param desc map description
36 * @param filePath map filePath
37 * @param scale map scale
Steven Burrows3a9a6442016-05-05 15:31:16 +010038 */
Simon Hunt8add9ee2016-09-20 17:05:07 -070039 public UiTopoMap(String id, String desc, String filePath, double scale) {
Steven Burrows3a9a6442016-05-05 15:31:16 +010040 this.id = id;
Simon Hunt8add9ee2016-09-20 17:05:07 -070041 this.desc = desc;
Steven Burrows3a9a6442016-05-05 15:31:16 +010042 this.filePath = filePath;
43 this.scale = scale;
44 }
45
46 /**
47 * Returns the identifier for this map.
48 *
49 * @return the identifier
50 */
Simon Hunt8add9ee2016-09-20 17:05:07 -070051 public String id() {
52 return id;
Steven Burrows3a9a6442016-05-05 15:31:16 +010053 }
54
55 /**
56 * Returns the description for this map.
57 *
58 * @return the description
59 */
Simon Hunt8add9ee2016-09-20 17:05:07 -070060 public String description() {
61 return desc;
Steven Burrows3a9a6442016-05-05 15:31:16 +010062 }
63
64 /**
65 * Returns the filePath for this map.
66 *
67 * @return the filePath
68 */
Simon Hunt8add9ee2016-09-20 17:05:07 -070069 public String filePath() {
70 return filePath;
Steven Burrows3a9a6442016-05-05 15:31:16 +010071 }
72
73 /**
74 * Returns the scale for this map.
75 *
76 * @return the scale
77 */
Simon Hunt8add9ee2016-09-20 17:05:07 -070078 public double scale() {
79 return scale;
Steven Burrows3a9a6442016-05-05 15:31:16 +010080 }
Steven Burrows3a9a6442016-05-05 15:31:16 +010081}