2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
8 package org.opendaylight.controller.model.util;
\r
10 import java.util.Collections;
\r
11 import java.util.List;
\r
13 import org.opendaylight.controller.model.api.type.IdentityTypeDefinition;
\r
14 import org.opendaylight.controller.model.api.type.IdentityrefTypeDefinition;
\r
15 import org.opendaylight.controller.yang.common.QName;
\r
16 import org.opendaylight.controller.yang.model.api.RevisionAwareXPath;
\r
17 import org.opendaylight.controller.yang.model.api.SchemaPath;
\r
18 import org.opendaylight.controller.yang.model.api.Status;
\r
19 import org.opendaylight.controller.yang.model.api.UnknownSchemaNode;
\r
21 public class Identityref implements IdentityrefTypeDefinition {
\r
23 private final QName name = BaseTypes.constructQName("identityref");
\r
24 private final SchemaPath path = BaseTypes.schemaPath(name);
\r
25 private final String description = "";
\r
26 private final String reference = "";
\r
28 private final IdentityTypeDefinition identity;
\r
29 private final RevisionAwareXPath xpath;
\r
31 private String units = "";
\r
33 public Identityref(RevisionAwareXPath xpath, IdentityTypeDefinition identity) {
\r
35 this.identity = identity;
\r
39 public Identityref(RevisionAwareXPath xpath) {
\r
42 this.identity = null;
\r
48 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
\r
51 public IdentityTypeDefinition getBaseType() {
\r
58 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getUnits()
\r
61 public String getUnits() {
\r
68 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue()
\r
71 public Object getDefaultValue() {
\r
78 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getQName()
\r
81 public QName getQName() {
\r
88 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getPath()
\r
91 public SchemaPath getPath() {
\r
98 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getDescription()
\r
101 public String getDescription() {
\r
102 return description;
\r
108 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getReference()
\r
111 public String getReference() {
\r
118 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getStatus()
\r
121 public Status getStatus() {
\r
122 return Status.CURRENT;
\r
126 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
\r
127 return Collections.emptyList();
\r
134 * org.opendaylight.controller.yang.model.base.type.api.IdentityrefTypeDefinition#getIdentityName
\r
138 public IdentityTypeDefinition getIdentity() {
\r
143 public RevisionAwareXPath getPathStatement() {
\r