Merge "BUG-869: reworked check for integer value."
[yangtools.git] / yang / yang-data-impl / src / test / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / SchemaAwareApplyOperationRoot.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.impl.schema.tree;
9
10
11 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
12 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
13 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder;
14 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder;
15 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
16 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
17
18 public class SchemaAwareApplyOperationRoot extends DataNodeContainerModificationStrategy<ContainerSchemaNode> {
19     private final SchemaContext context;
20
21     public SchemaAwareApplyOperationRoot(final SchemaContext context) {
22         super(context,ContainerNode.class);
23         this.context = context;
24     }
25
26     public SchemaContext getContext() {
27         return context;
28     }
29
30     @Override
31     public String toString() {
32         return "SchemaAwareApplyOperationRoot [context=" + context + "]";
33     }
34
35     @Override
36     @SuppressWarnings("rawtypes")
37     protected DataContainerNodeBuilder createBuilder(NormalizedNode<?, ?> original) {
38         return ImmutableContainerNodeBuilder.create((ContainerNode) original);
39     }
40 }