e82982d4f354cc5ff9ea178b190cd35e50d39187
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / tree / DataTreeFactory.java
1 /*
2  * Copyright (c) 2014 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.api.schema.tree;
9
10 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
11
12 /**
13  * Factory interface for creating data trees.
14  */
15 public interface DataTreeFactory {
16     /**
17      * Create a new data tree.
18      * @param type
19      *          Tree type.
20      *
21      * @return A data tree instance.
22      */
23     DataTree create(TreeType type);
24
25     /**
26      * Create a new data tree.
27      * @param treeConfig
28      *          Tree config.
29      *
30      * @return A data tree instance.
31      */
32     DataTree create(DataTreeConfiguration treeConfig);
33
34     /**
35      * Create a new data tree rooted at a particular node.
36      * @param treeType
37      *          Tree type.
38      * @param rootPath
39      *          Root.
40      *
41      * @return A data tree instance.
42      */
43     DataTree create(TreeType treeType, YangInstanceIdentifier rootPath);
44 }