import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
private final DataTree dataTree;
private NormalizedNodeAggregator(final YangInstanceIdentifier rootIdentifier,
private final DataTree dataTree;
private NormalizedNodeAggregator(final YangInstanceIdentifier rootIdentifier,
- final List<Optional<NormalizedNode<?, ?>>> nodes, final SchemaContext schemaContext,
+ final List<Optional<NormalizedNode<?, ?>>> nodes, final EffectiveModelContext schemaContext,
final LogicalDatastoreType logicalDatastoreType) {
this.rootIdentifier = rootIdentifier;
this.nodes = nodes;
this.dataTree = new InMemoryDataTreeFactory().create(
logicalDatastoreType == LogicalDatastoreType.CONFIGURATION ? DataTreeConfiguration.DEFAULT_CONFIGURATION
: DataTreeConfiguration.DEFAULT_OPERATIONAL);
final LogicalDatastoreType logicalDatastoreType) {
this.rootIdentifier = rootIdentifier;
this.nodes = nodes;
this.dataTree = new InMemoryDataTreeFactory().create(
logicalDatastoreType == LogicalDatastoreType.CONFIGURATION ? DataTreeConfiguration.DEFAULT_CONFIGURATION
: DataTreeConfiguration.DEFAULT_OPERATIONAL);
}
/**
* Combine data from all the nodes in the list into a tree with root as rootIdentifier.
*/
public static Optional<NormalizedNode<?,?>> aggregate(final YangInstanceIdentifier rootIdentifier,
}
/**
* Combine data from all the nodes in the list into a tree with root as rootIdentifier.
*/
public static Optional<NormalizedNode<?,?>> aggregate(final YangInstanceIdentifier rootIdentifier,
- final List<Optional<NormalizedNode<?, ?>>> nodes, final SchemaContext schemaContext,
+ final List<Optional<NormalizedNode<?, ?>>> nodes, final EffectiveModelContext schemaContext,
final LogicalDatastoreType logicalDatastoreType) throws DataValidationFailedException {
return new NormalizedNodeAggregator(rootIdentifier, nodes, schemaContext, logicalDatastoreType).aggregate();
}
final LogicalDatastoreType logicalDatastoreType) throws DataValidationFailedException {
return new NormalizedNodeAggregator(rootIdentifier, nodes, schemaContext, logicalDatastoreType).aggregate();
}