BUG-1092: rename data.api.InstanceIdentifier to YangInstanceIdentifier
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / transform / base / serializer / AugmentationNodeBaseSerializer.java
1 /*
2  * Copyright (c) 2013 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.transform.base.serializer;
9
10 import java.util.Set;
11
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
14 import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
15 import org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils;
16 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
17 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
18
19 /**
20  * Abstract(base) serializer for AugmentationNode, serializes elements of type E.
21  *
22  * @param <E> type of serialized elements
23  */
24 public abstract class AugmentationNodeBaseSerializer<E> extends
25         BaseDispatcherSerializer<E, AugmentationNode, AugmentationSchema> {
26
27     @Override
28     protected Set<DataSchemaNode> getRealSchemasForAugment(AugmentationSchema schema, AugmentationSchema augmentationSchema) {
29         return SchemaUtils.getRealSchemasForAugment(schema, augmentationSchema);
30     }
31
32     @Override
33     protected DataSchemaNode getSchemaForChild(AugmentationSchema schema,
34                                                DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?> childNode) {
35         return SchemaUtils.findSchemaForChild(schema, childNode.getNodeType());
36     }
37
38     @Override
39     protected AugmentationSchema getAugmentedCase(AugmentationSchema schema, AugmentationNode augmentationNode) {
40         throw new UnsupportedOperationException("");
41     }
42
43 }