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.yangtools.yang.model.util;
10 import java.util.Collections;
11 import java.util.List;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
15 import org.opendaylight.yangtools.yang.model.api.Status;
16 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
17 import org.opendaylight.yangtools.yang.model.api.type.IdentityrefTypeDefinition;
20 * The <code>default</code> implementation of Identityref Type Definition
23 * @see IdentityrefTypeDefinition
25 public final class IdentityrefType implements IdentityrefTypeDefinition {
26 private final QName name = BaseTypes.constructQName("identityref");
27 private final SchemaPath path;
28 private static final String DESCRIPTION = "The identityref type is used to reference an existing identity.";
29 private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.10";
30 private final IdentityrefTypeDefinition baseType;
31 private final QName identity;
32 private static final String UNITS = "";
34 public IdentityrefType(QName identity, SchemaPath schemaPath) {
35 this.identity = identity;
36 this.path = schemaPath;
41 public String getUnits() {
46 public Object getDefaultValue() {
51 public QName getQName() {
56 public SchemaPath getPath() {
61 public String getDescription() {
66 public String getReference() {
71 public Status getStatus() {
72 return Status.CURRENT;
76 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
77 return Collections.emptyList();
81 public QName getIdentity() {
86 public IdentityrefTypeDefinition getBaseType() {
91 public String toString() {
92 return "identityref " + identity.getLocalName();