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