/*
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.yangtools.yang.model.api;

import java.util.Set;
import javax.annotation.Nonnull;

/**
 * Interface describing YANG 'identity' statement.
 *
 * <p>
 * The 'identity' statement is used to define a new globally unique, abstract,
 * and untyped identity. Its only purpose is to denote its name, semantics, and
 * existence. The built-in datatype "identityref" can be used to reference
 * identities within a data model.
 */
public interface IdentitySchemaNode extends SchemaNode {
    /**
     * The YANG 1.0 (RFC6020) implementation of IdentitySchemaNode always returns an ImmutableSet containing just one
     * base identity or an empty ImmutableSet as it does not support multiple base identities.
     * Starting with YANG 1.1 (RFC7950), the identity can be derived from multiple base identities.
     *
     * @return set of existing identities from which the new identity is derived or
     *         an empty ImmutableSet if the identity is defined from scratch.
     */
    @Nonnull Set<IdentitySchemaNode> getBaseIdentities();

    /**
     * Get identities derived from this identity.
     *
     * @return collection of identities derived from this identity
     */
    Set<IdentitySchemaNode> getDerivedIdentities();

}

@@ -552,19 +552,16 @@
 bstract,
-%0A *
  and unt
@@ -591,16 +591,19 @@
  purpose
+%0A *
  is to d
@@ -632,19 +632,16 @@
 ics, and
-%0A *
  existen
@@ -820,287 +820,334 @@
   * 
-The YANG 1.0 (RFC6020) implementation
+Return base identities
  of 
-I
+this i
 dentity
-SchemaNode always returns an ImmutableSet containing just one%0A     * base identity or an empty ImmutableSet 
+. The semantics of differ between RFC6020 and RFC7950 here. YANG 1.0%0A     * uses single inheritance, where there can be 0..1 b
 as
+e
  i
-t does not support multiple base identities.%0A     * Starting with YANG 1.1 (RFC7950), the identity can be derived from
+dentities. YANG 1.1 uses multiple inheritance, where%0A     * there can be 0..N base identities.%0A     *%0A     * %3Cp%3E%0A     * Callers should be prepared to handle
  mul
@@ -1263,23 +1263,8 @@
 d or
-%0A     *        
  an 
@@ -1273,17 +1273,8 @@
 pty 
-Immutable
 Set 
@@ -1295,29 +1295,39 @@
 y is
- defined from scratch
+%0A     *         a root identity
 .%0A  
@@ -1583,11 +1583,10 @@
 ties();%0A
-%0A
 %7D%0A

Correct IdentitySchemaNode documentation