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.InstanceIdentifierTypeDefinition;
21 * The <code>default</code> implementation of Instance Identifier Type
22 * Definition interface.
24 * @see InstanceIdentifierTypeDefinition
26 public final class InstanceIdentifier implements InstanceIdentifierTypeDefinition {
27 private static final QName name = BaseTypes.constructQName("instance-identifier");
28 private static final String description = "The instance-identifier built-in type is used to "
29 + "uniquely identify a particular instance node in the data tree.";
30 private static final String reference = "https://tools.ietf.org/html/rfc6020#section-9.13";
32 private final transient SchemaPath path;
33 private final RevisionAwareXPath xpath;
34 private final String units = "";
35 private final InstanceIdentifierTypeDefinition baseType;
36 private boolean requireInstance = true;
38 public InstanceIdentifier(final SchemaPath path, final RevisionAwareXPath xpath) {
45 public InstanceIdentifier(final SchemaPath path, final RevisionAwareXPath xpath, final boolean requireInstance) {
49 this.requireInstance = requireInstance;
57 * org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
60 public InstanceIdentifierTypeDefinition getBaseType() {
67 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getUnits()
70 public String getUnits() {
78 * org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue
82 public Object getDefaultValue() {
89 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getQName()
92 public QName getQName() {
99 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getPath()
102 public SchemaPath getPath() {
110 * org.opendaylight.controller.yang.model.api.SchemaNode#getDescription()
113 public String getDescription() {
120 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getReference()
123 public String getReference() {
130 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getStatus()
133 public Status getStatus() {
134 return Status.CURRENT;
141 * org.opendaylight.controller.yang.model.api.SchemaNode#getExtensionSchemaNodes
145 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
146 return Collections.emptyList();
152 * @see org.opendaylight.controller.yang.model.api.type.
153 * InstanceIdentifierTypeDefinition# getPathStatement()
156 public RevisionAwareXPath getPathStatement() {
163 * @see org.opendaylight.controller.yang.model.api.type.
164 * InstanceIdentifierTypeDefinition# requireInstance()
167 public boolean requireInstance() {
168 return requireInstance;