Populate model/ hierarchy
[yangtools.git] / xpath / yang-xpath-api / src / main / java / org / opendaylight / yangtools / yang / xpath / api / YangXPathNodeType.java
1 /*
2  * Copyright (c) 2018 Pantheon Technologies, s.r.o. 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.xpath.api;
9
10 import static java.util.Objects.requireNonNull;
11
12 import com.google.common.annotations.Beta;
13
14 /**
15  * XPath node type as defined in <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#NT-NodeType">XPath 1.0</a>.
16  *
17  * @author Robert Varga
18  */
19 @Beta
20 public enum YangXPathNodeType {
21     /**
22      * A {@code comment}.
23      */
24     COMMENT("comment"),
25     /**
26      * A {@code text}.
27      */
28     TEXT("text"),
29     /**
30      * A {@code processing-instruction}.
31      */
32     PROCESSING_INSTRUCTION("processing-instruction"),
33     /**
34      * A {@code node}.
35      */
36     NODE("node");
37
38     private final String str;
39
40     YangXPathNodeType(final String str) {
41         this.str = requireNonNull(str);
42     }
43
44     @Override
45     public String toString() {
46         return str;
47     }
48 }