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.yang.model.util;
\r
10 import java.util.Collections;
\r
11 import java.util.List;
\r
13 import org.opendaylight.controller.yang.common.QName;
\r
14 import org.opendaylight.controller.yang.model.api.SchemaPath;
\r
15 import org.opendaylight.controller.yang.model.api.Status;
\r
16 import org.opendaylight.controller.yang.model.api.UnknownSchemaNode;
\r
17 import org.opendaylight.controller.yang.model.api.type.IdentityrefTypeDefinition;
\r
20 * The <code>default</code> implementation of Identityref Type Definition interface.
\r
22 * @see IdentityrefTypeDefinition
\r
24 public final class IdentityrefType implements IdentityrefTypeDefinition {
\r
26 private final QName name = BaseTypes.constructQName("identityref");
\r
27 private final SchemaPath path;
\r
28 private final String description = "The identityref type is used to reference an existing identity.";
\r
29 private final String reference = "https://tools.ietf.org/html/rfc6020#section-9.10";
\r
30 private final IdentityrefTypeDefinition baseType;
\r
32 private final QName identity;
\r
34 private String units = "";
\r
36 private IdentityrefType(QName identity) {
\r
37 this.identity = identity;
\r
38 this.path = BaseTypes.schemaPath(name);
\r
39 this.baseType = this;
\r
42 public IdentityrefType(QName identity, SchemaPath schemaPath) {
\r
43 this.identity = identity;
\r
44 this.path = schemaPath;
\r
45 this.baseType = new IdentityrefType(identity);
\r
49 public String getUnits() {
\r
54 public Object getDefaultValue() {
\r
59 public QName getQName() {
\r
64 public SchemaPath getPath() {
\r
69 public String getDescription() {
\r
74 public String getReference() {
\r
79 public Status getStatus() {
\r
80 return Status.CURRENT;
\r
84 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
\r
85 return Collections.emptyList();
\r
89 public QName getIdentity() {
\r
94 public IdentityrefTypeDefinition getBaseType() {
\r