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
22 * The <code>default</code> implementation of Identityref Type Definition interface.
\r
24 * @see IdentityrefTypeDefinition
\r
26 public class Identityref implements IdentityrefTypeDefinition {
\r
28 private final QName name = BaseTypes.constructQName("identityref");
\r
29 private final SchemaPath path = BaseTypes.schemaPath(name);
\r
30 private final String description = "The identityref type is used to reference an existing identity.";
\r
31 private final String reference = "https://tools.ietf.org/html/rfc6020#section-9.10";
\r
33 private final IdentityTypeDefinition identity;
\r
34 private final RevisionAwareXPath xpath;
\r
36 private String units = "";
\r
38 public Identityref(RevisionAwareXPath xpath, IdentityTypeDefinition identity) {
\r
40 this.identity = identity;
\r
44 public Identityref(RevisionAwareXPath xpath) {
\r
47 this.identity = null;
\r
53 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
\r
56 public IdentityTypeDefinition getBaseType() {
\r
63 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getUnits()
\r
66 public String getUnits() {
\r
73 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue()
\r
76 public Object getDefaultValue() {
\r
83 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getQName()
\r
86 public QName getQName() {
\r
93 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getPath()
\r
96 public SchemaPath getPath() {
\r
103 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getDescription()
\r
106 public String getDescription() {
\r
107 return description;
\r
113 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getReference()
\r
116 public String getReference() {
\r
123 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getStatus()
\r
126 public Status getStatus() {
\r
127 return Status.CURRENT;
\r
131 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
\r
132 return Collections.emptyList();
\r
139 * org.opendaylight.controller.yang.model.base.type.api.IdentityrefTypeDefinition#getIdentityName
\r
143 public IdentityTypeDefinition getIdentity() {
\r
148 public RevisionAwareXPath getPathStatement() {
\r