2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. 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.restconf.nb.rfc8040;
10 import static java.util.Objects.requireNonNull;
13 import javax.xml.xpath.XPathExpressionException;
14 import org.eclipse.jdt.annotation.NonNullByDefault;
15 import org.opendaylight.yangtools.concepts.Immutable;
16 import org.opendaylight.yangtools.yang.xpath.api.YangXPathExpression;
17 import org.opendaylight.yangtools.yang.xpath.api.YangXPathMathMode;
18 import org.opendaylight.yangtools.yang.xpath.api.YangXPathParserFactory;
21 * This class represents a {@code filter} parameter as defined in
22 * <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-4.8.4">RFC8040 section 4.8.4</a>.
25 public final class FilterParameter implements Immutable {
26 private static final URI CAPABILITY = URI.create("urn:ietf:params:restconf:capability:filter:1.0");
28 private final YangXPathExpression value;
30 private FilterParameter(final YangXPathExpression value) {
31 this.value = requireNonNull(value);
34 public static FilterParameter forUriValue(final YangXPathParserFactory parserFactory, final String uriValue)
35 throws XPathExpressionException {
36 return new FilterParameter(parserFactory.newParser(YangXPathMathMode.EXACT).parseExpression(uriValue));
39 public YangXPathExpression value() {
43 public static String uriName() {
47 public static URI capabilityUri() {