2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.xpath.api;
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.concepts.Identifiable;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.common.YangConstants;
16 * Functions known to a YANG XPath.
18 * @author Robert Varga
21 public enum YangFunction implements Identifiable<QName> {
22 // XPath 1.0 functions
33 LOCAL_NAME("local-name"),
36 NAMESPACE_URI("namespace-uri"),
37 NORMALIZE_SPACE("normalize-space"),
41 STARTS_WITH("starts-with"),
43 STRING_LENGTH("string-length"),
45 SUBSTRING("substring"),
46 SUBSTRING_AFTER("substring-after"),
47 SUBSTRING_BEFORE("substring-before"),
48 TRANSLATE("translate"),
52 BIT_IS_SET("bit-is-set"),
55 DERIVED_FROM("derived-from"),
56 DERIVED_FROM_OR_SELF("derived-from-or-self"),
57 ENUM_VALUE("enum-value"),
60 private final QName identifier;
62 YangFunction(final String localName) {
63 identifier = QName.create(YangConstants.RFC6020_YIN_MODULE, localName).intern();
67 public QName getIdentifier() {