Remove yang-test
[controller.git] / opendaylight / config / config-util / src / main / java / org / opendaylight / controller / config / util / capability / BasicCapability.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.config.util.capability;
10
11 import com.google.common.base.Optional;
12 import java.util.Collection;
13 import java.util.Collections;
14
15 /**
16  * Capability representing a basic, one-line, string based capability
17  */
18 public class BasicCapability implements Capability {
19
20     private final String capability;
21
22     public BasicCapability(final String capability) {
23         this.capability = capability;
24     }
25
26     @Override
27     public String getCapabilityUri() {
28         return capability;
29     }
30
31     @Override
32     public Optional<String> getModuleNamespace() {
33         return Optional.absent();
34     }
35
36     @Override
37     public Optional<String> getModuleName() {
38         return Optional.absent();
39     }
40
41     @Override
42     public Optional<String> getRevision() {
43         return Optional.absent();
44     }
45
46     @Override
47     public Optional<String> getCapabilitySchema() {
48         return Optional.absent();
49     }
50
51     @Override
52     public Collection<String> getLocation() {
53         return Collections.emptyList();
54     }
55
56     @Override
57     public String toString() {
58         return capability;
59     }
60 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.