Populate xpath/ hierarchy
[yangtools.git] / parser / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / validation / ValidationBundlesNamespace.java
1 /*
2  * Copyright (c) 2015 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
9 package org.opendaylight.yangtools.yang.parser.spi.validation;
10
11 import java.util.Collection;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
14 import org.opendaylight.yangtools.yang.parser.spi.meta.ParserNamespace;
15
16 /**
17  * Namespace used for validating whether a node is of some type, e.g. usable target for some operation or has other
18  * significant properties.
19  */
20 public interface ValidationBundlesNamespace
21         extends ParserNamespace<ValidationBundlesNamespace.ValidationBundleType, Collection<?>> {
22     NamespaceBehaviour<ValidationBundleType, Collection<?>, @NonNull ValidationBundlesNamespace> BEHAVIOUR =
23             NamespaceBehaviour.global(ValidationBundlesNamespace.class);
24
25     enum ValidationBundleType {
26         /**
27          * Whether a node is suitable refine substatement.
28          */
29         SUPPORTED_REFINE_SUBSTATEMENTS,
30
31         /**
32          * Whether a node is suitable target for refine operation.
33          */
34         SUPPORTED_REFINE_TARGETS,
35
36         /**
37          * Whether a node is suitable target for augment operation.
38          */
39         SUPPORTED_AUGMENT_TARGETS,
40
41         /**
42          * Whether a <a href="https://tools.ietf.org/html/rfc6020#section-7.9.2">case shorthand</a> can be created for a
43          * node.
44          */
45         // FIXME: 7.0.0: consider removing this constant, this functionality is part of statement support.
46         SUPPORTED_CASE_SHORTHANDS,
47
48         /**
49          * Whether a node is data node.
50          */
51         SUPPORTED_DATA_NODES
52     }
53 }