2 * Copyright (c) 2013 Cisco Systems, Inc. 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.yangtools.yang.data.impl.schema.transform.base.serializer;
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;
20 * Abstract(base) serializer for AugmentationNode, serializes elements of type E.
22 * @param <E> type of serialized elements
24 public abstract class AugmentationNodeBaseSerializer<E> extends
25 BaseDispatcherSerializer<E, AugmentationNode, AugmentationSchema> {
28 protected Set<DataSchemaNode> getRealSchemasForAugment(AugmentationSchema schema, AugmentationSchema augmentationSchema) {
29 return SchemaUtils.getRealSchemasForAugment(schema, augmentationSchema);
33 protected DataSchemaNode getSchemaForChild(AugmentationSchema schema,
34 DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?> childNode) {
35 return SchemaUtils.findSchemaForChild(schema, childNode.getNodeType());
39 protected AugmentationSchema getAugmentedCase(AugmentationSchema schema, AugmentationNode augmentationNode) {
40 throw new UnsupportedOperationException("");