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 QName identity;
31 private static final String UNITS = "";
33 public IdentityrefType(QName identity, SchemaPath schemaPath) {
34 this.identity = identity;
35 this.path = schemaPath;
39 public String getUnits() {
44 public Object getDefaultValue() {
49 public QName getQName() {
54 public SchemaPath getPath() {
59 public String getDescription() {
64 public String getReference() {
69 public Status getStatus() {
70 return Status.CURRENT;
74 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
75 return Collections.emptyList();
79 public QName getIdentity() {
84 public IdentityrefTypeDefinition getBaseType() {
89 public String toString() {
90 return "identityref " + identity.getLocalName();