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 Definition interface.
23 * @see InstanceIdentifierTypeDefinition
25 public class InstanceIdentifier implements InstanceIdentifierTypeDefinition {
27 private static final QName name = BaseTypes
28 .constructQName("instance-identifier");
29 private static final String description = "The instance-identifier built-in type is used to " +
30 "uniquely identify a particular instance node in the data tree.";
31 private static final String reference = "https://tools.ietf.org/html/rfc6020#section-9.13";
33 private final transient SchemaPath path = BaseTypes.schemaPath(name);
34 private final RevisionAwareXPath xpath;
35 private final String units = "";
37 private final boolean requireInstance;
39 public InstanceIdentifier(RevisionAwareXPath xpath, boolean requireInstance) {
42 this.requireInstance = requireInstance;
48 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
51 public InstanceIdentifierTypeDefinition getBaseType() {
58 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getUnits()
61 public String getUnits() {
68 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue()
71 public Object getDefaultValue() {
78 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getQName()
81 public QName getQName() {
88 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getPath()
91 public SchemaPath getPath() {
98 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getDescription()
101 public String getDescription() {
108 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getReference()
111 public String getReference() {
118 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getStatus()
121 public Status getStatus() {
122 return Status.CURRENT;
128 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getExtensionSchemaNodes()
131 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
132 return Collections.emptyList();
138 * @see org.opendaylight.controller.yang.model.api.type.InstanceIdentifierTypeDefinition#
142 public RevisionAwareXPath getPathStatement() {
149 * @see org.opendaylight.controller.yang.model.api.type.InstanceIdentifierTypeDefinition#
153 public boolean requireInstance() {
154 return requireInstance;