134f4587d4c1d0e3464321b5f173aebdce60e973
[yangtools.git] / yang / yang-data-jaxen / src / main / java / org / opendaylight / yangtools / yang / data / jaxen / api / XPathSchemaContextFactory.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 package org.opendaylight.yangtools.yang.data.jaxen.api;
9
10 import org.eclipse.jdt.annotation.NonNullByDefault;
11 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
12
13 /**
14  * A factory for obtaining {@link XPathSchemaContext}s. This is the primary entry point to an XPath evaluation
15  * implementation. Users are expected to resolve these via their service resolution framework, be it
16  * {@link java.util.ServiceLoader}, OSGi or similar.
17  *
18  * <p>
19  * Implementations are required to support {@link java.util.ServiceLoader}.
20  */
21 @Deprecated
22 @NonNullByDefault
23 public interface XPathSchemaContextFactory {
24     /**
25      * Create an {@link XPathSchemaContext} based on a {@link SchemaContext}. This effectively binds the namespaces
26      * the user expects to map to YANG schema. The {@link XPathExpression} compilation, relocation and optimization
27      * processes can take advantage of the YANG schema provided.
28      *
29      * @param context SchemaContext associated with the resulting {@link XPathSchemaContext}
30      * @return An {@link XPathSchemaContext} instance
31      */
32     XPathSchemaContext createContext(SchemaContext context);
33 }