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