blob: bc9fbf57a91bbcc8de63bdcc24bb366597e37623 [file] [log] [blame]
Simon Hunt5f6dbf82016-03-30 08:53:33 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Simon Hunt5f6dbf82016-03-30 08:53:33 -07003 *
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.model.topo;
18
19/**
20 * Represents a node drawn on the topology view (region, device, host).
21 */
Simon Hunt977aa052016-07-20 17:08:29 -070022public abstract class UiNode extends UiElement {
Simon Huntd5b96732016-07-08 13:22:27 -070023
24 /**
25 * Default "layer" tag.
26 */
27 public static final String LAYER_DEFAULT = "def";
28
29 /**
30 * Packet layer tag.
31 */
32 public static final String LAYER_PACKET = "pkt";
33
34 /**
35 * Optical layer tag.
36 */
37 public static final String LAYER_OPTICAL = "opt";
38
39
40 private String layer = LAYER_DEFAULT;
41
42 /**
43 * Returns the tag for the "layer" that the node should be rendered in
44 * when viewed in the oblique view.
45 *
46 * @return the node's layer
47 */
48 public String layer() {
49 return layer;
50 }
51
52 /**
53 * Sets this node's "layer", for layered rendering.
54 *
55 * @param layerTag the layer tag to set
56 */
57 public void setLayer(String layerTag) {
58 layer = layerTag;
59 }
Simon Hunt5f6dbf82016-03-30 08:53:33 -070060}