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.model.util;
\r
10 import java.util.Collections;
\r
11 import java.util.List;
\r
13 import org.opendaylight.controller.model.api.type.InstanceIdentifierTypeDefinition;
\r
14 import org.opendaylight.controller.yang.common.QName;
\r
15 import org.opendaylight.controller.yang.model.api.RevisionAwareXPath;
\r
16 import org.opendaylight.controller.yang.model.api.SchemaPath;
\r
17 import org.opendaylight.controller.yang.model.api.Status;
\r
18 import org.opendaylight.controller.yang.model.api.UnknownSchemaNode;
\r
20 public class InstanceIdentifier implements InstanceIdentifierTypeDefinition {
\r
22 private static final QName name = BaseTypes
\r
23 .constructQName("instance-identifier");
\r
24 private static final String description = "";
\r
25 private static final String reference = "";
\r
27 private final transient SchemaPath path = BaseTypes.schemaPath(name);
\r
28 private final RevisionAwareXPath xpath;
\r
29 private final String units = "";
\r
31 private final boolean requireInstance;
\r
33 public InstanceIdentifier(RevisionAwareXPath xpath, boolean requireInstance) {
\r
36 this.requireInstance = requireInstance;
\r
42 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
\r
45 public InstanceIdentifierTypeDefinition getBaseType() {
\r
52 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getUnits()
\r
55 public String getUnits() {
\r
62 * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue()
\r
65 public Object getDefaultValue() {
\r
72 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getQName()
\r
75 public QName getQName() {
\r
82 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getPath()
\r
85 public SchemaPath getPath() {
\r
92 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getDescription()
\r
95 public String getDescription() {
\r
102 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getReference()
\r
105 public String getReference() {
\r
112 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getStatus()
\r
115 public Status getStatus() {
\r
116 return Status.CURRENT;
\r
122 * @see org.opendaylight.controller.yang.model.api.SchemaNode#getExtensionSchemaNodes()
\r
125 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
\r
126 return Collections.emptyList();
\r
132 * @see org.opendaylight.controller.yang.model.api.type.InstanceIdentifierTypeDefinition#
\r
133 * getPathStatement()
\r
136 public RevisionAwareXPath getPathStatement() {
\r
143 * @see org.opendaylight.controller.yang.model.api.type.InstanceIdentifierTypeDefinition#
\r
144 * requireInstance()
\r
147 public boolean requireInstance() {
\r
148 return requireInstance;
\r