597b7a8acbf3b9d8fa1efee313bac77fc5c19db0
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / IdentitySchemaNode.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\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
7  */\r
8 package org.opendaylight.yangtools.yang.model.api;\r
9 \r
10 import java.util.Set;\r
11 \r
12 /**\r
13  * Interface describing YANG 'identity' statement.\r
14  * <p>\r
15  * The 'identity' statement is used to define a new globally unique, abstract,\r
16  * and untyped identity. Its only purpose is to denote its name, semantics, and\r
17  * existence. The built-in datatype "identityref" can be used to reference\r
18  * identities within a data model.\r
19  * </p>\r
20  */\r
21 public interface IdentitySchemaNode extends SchemaNode {\r
22 \r
23     /**\r
24      * @return an existing identity, from which the new identity is derived or\r
25      *         null, if the identity is defined from scratch.\r
26      */\r
27     IdentitySchemaNode getBaseIdentity();\r
28 \r
29     /**\r
30      * Get identities derived from this identity.\r
31      *\r
32      * @return collection of identities derived from this identity\r
33      */\r
34     Set<IdentitySchemaNode> getDerivedIdentities();\r
35 \r
36 }\r