Un-deprecate CopyableNode, AddedByUsesAware
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DerivableSchemaNode.java
1 /*
2  * Copyright (c) 2014 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.Optional;
11
12 /**
13  * Schema Node which may be derived from other schema node using augmentation or uses statement.
14  */
15 // FIXME: 8.0.0: refactor this interface to take into account CopyableNode and AddedByUsesAware
16 public interface DerivableSchemaNode extends DataSchemaNode {
17     /**
18      * If this node is added by uses, returns original node definition from
19      * grouping where it was defined.
20      *
21      * @return original node definition from grouping if this node is added by
22      *         uses, Optional.absent otherwise
23      */
24     // FIXME: 8.0.0: this should be a type capture as it always matches this node's type
25     Optional<? extends SchemaNode> getOriginal();
26 }