+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
package org.opendaylight.controller.md.sal.common.impl.util.compat;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Optional;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.Node;
import org.opendaylight.yangtools.yang.data.api.SimpleNode;
+import org.opendaylight.yangtools.yang.data.api.schema.AnyXmlNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer;
import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeAttrBuilder;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeAttrBuilder;
import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeContainerBuilder;
+import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
import org.opendaylight.yangtools.yang.model.api.AugmentationTarget;
import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
public abstract class DataNormalizationOperation<T extends PathArgument> implements Identifiable<T> {
private final T identifier;
return false;
}
+
+ public boolean isKeyedEntry() {
+ return false;
+ }
+
protected Set<QName> getQNameIdentifiers() {
return Collections.singleton(identifier.getNodeType());
}
- public abstract DataNormalizationOperation<?> getChild(final PathArgument child);
+ public abstract DataNormalizationOperation<?> getChild(final PathArgument child) throws DataNormalizationException;
- public abstract DataNormalizationOperation<?> getChild(QName child);
+ public abstract DataNormalizationOperation<?> getChild(QName child) throws DataNormalizationException;
public abstract NormalizedNode<?, ?> normalize(Node<?> legacyData);
+ public abstract boolean isLeaf();
+
private static abstract class SimpleTypeNormalization<T extends PathArgument> extends DataNormalizationOperation<T> {
protected SimpleTypeNormalization(final T identifier) {
@Override
public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
- // TODO Auto-generated method stub
return null;
}
+ @Override
+ public boolean isLeaf() {
+ return true;
+ }
+
}
private static final class LeafNormalization extends SimpleTypeNormalization<NodeIdentifier> {
return Builders.leafSetEntryBuilder().withNodeIdentifier(nodeId).withValue(node.getValue()).build();
}
+
+ @Override
+ public boolean isKeyedEntry() {
+ return true;
+ }
}
- private static abstract class CompositeNodeNormalizationOpertation<T extends PathArgument> extends
- DataNormalizationOperation<T> {
+ private static abstract class CompositeNodeNormalizationOperation<T extends PathArgument> extends
+ DataNormalizationOperation<T> {
- protected CompositeNodeNormalizationOpertation(final T identifier) {
+ protected CompositeNodeNormalizationOperation(final T identifier) {
super(identifier);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
- public final NormalizedNodeContainer<?, ?, ?> normalize(final Node<?> legacyData) {
+ public final NormalizedNode<?, ?> normalize(final Node<?> legacyData) {
checkArgument(legacyData != null);
if (!isMixin() && getIdentifier().getNodeType() != null) {
checkArgument(getIdentifier().getNodeType().equals(legacyData.getNodeType()),
Set<DataNormalizationOperation<?>> usedMixins = new HashSet<>();
for (Node<?> childLegacy : compositeNode.getValue()) {
- DataNormalizationOperation childOp = getChild(childLegacy.getNodeType());
+ final DataNormalizationOperation childOp;
+
+ try {
+ childOp = getChild(childLegacy.getNodeType());
+ } catch (DataNormalizationException e) {
+ throw new IllegalArgumentException(String.format("Failed to normalize data %s", compositeNode.getValue()), e);
+ }
// We skip unknown nodes if this node is mixin since
// it's nodes and parent nodes are interleaved
if (childOp.isMixin()) {
if (usedMixins.contains(childOp)) {
// We already run / processed that mixin, so to avoid
- // dupliciry we are
- // skiping next nodes.
+ // duplicity we are skipping next nodes.
continue;
}
builder.addChild(childOp.normalize(compositeNode));
builder.addChild(childOp.normalize(childLegacy));
}
}
- return (NormalizedNodeContainer<?, ?, ?>) builder.build();
+ return builder.build();
+ }
+
+ @Override
+ public boolean isLeaf() {
+ return false;
}
@SuppressWarnings("rawtypes")
}
private static abstract class DataContainerNormalizationOperation<T extends PathArgument> extends
- CompositeNodeNormalizationOpertation<T> {
+ CompositeNodeNormalizationOperation<T> {
private final DataNodeContainer schema;
private final Map<QName, DataNormalizationOperation<?>> byQName;
}
@Override
- public DataNormalizationOperation<?> getChild(final PathArgument child) {
+ public DataNormalizationOperation<?> getChild(final PathArgument child) throws DataNormalizationException {
DataNormalizationOperation<?> potential = byArg.get(child);
if (potential != null) {
return potential;
}
- potential = fromSchema(schema, child);
+ potential = fromLocalSchema(child);
return register(potential);
}
+ private DataNormalizationOperation<?> fromLocalSchema(final PathArgument child) throws DataNormalizationException {
+ if (child instanceof AugmentationIdentifier) {
+ return fromSchemaAndQNameChecked(schema, ((AugmentationIdentifier) child).getPossibleChildNames()
+ .iterator().next());
+ }
+ return fromSchemaAndQNameChecked(schema, child.getNodeType());
+ }
+
@Override
- public DataNormalizationOperation<?> getChild(final QName child) {
+ public DataNormalizationOperation<?> getChild(final QName child) throws DataNormalizationException {
DataNormalizationOperation<?> potential = byQName.get(child);
if (potential != null) {
return potential;
}
- potential = fromSchemaAndPathArgument(schema, child);
+ potential = fromLocalSchemaAndQName(schema, child);
return register(potential);
}
+ protected DataNormalizationOperation<?> fromLocalSchemaAndQName(final DataNodeContainer schema2, final QName child) throws DataNormalizationException {
+ return fromSchemaAndQNameChecked(schema2, child);
+ }
+
private DataNormalizationOperation<?> register(final DataNormalizationOperation<?> potential) {
if (potential != null) {
byArg.put(potential.getIdentifier(), potential);
}
private static final class ListItemNormalization extends
- DataContainerNormalizationOperation<NodeIdentifierWithPredicates> {
+ DataContainerNormalizationOperation<NodeIdentifierWithPredicates> {
private final List<QName> keyDefinition;
}
@Override
- protected NormalizedNodeContainerBuilder createBuilder(final CompositeNode compositeNode) {
+ protected NormalizedNodeContainerBuilder<?, ?, ?, ?> createBuilder(final CompositeNode compositeNode) {
ImmutableMap.Builder<QName, Object> keys = ImmutableMap.builder();
for (QName key : keyDefinition) {
- SimpleNode<?> valueNode = checkNotNull(compositeNode.getFirstSimpleByName(key),"List node %s MUST contain leaf %s with value.",getIdentifier().getNodeType(),key);
+
+ SimpleNode<?> valueNode = checkNotNull(compositeNode.getFirstSimpleByName(key),
+ "List node %s MUST contain leaf %s with value.", getIdentifier().getNodeType(), key);
keys.put(key, valueNode.getValue());
}
}
return builder.build();
}
+
+
+ @Override
+ public boolean isKeyedEntry() {
+ return true;
+ }
+ }
+
+ private static final class UnkeyedListItemNormalization extends DataContainerNormalizationOperation<NodeIdentifier> {
+
+ protected UnkeyedListItemNormalization(final ListSchemaNode schema) {
+ super(new NodeIdentifier(schema.getQName()), schema);
+ }
+
+ @Override
+ protected NormalizedNodeContainerBuilder<?, ?, ?, ?> createBuilder(final CompositeNode compositeNode) {
+ return Builders.unkeyedListEntryBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.unkeyedListEntryBuilder().withNodeIdentifier((NodeIdentifier) currentArg).build();
+ }
+
}
private static final class ContainerNormalization extends DataContainerNormalizationOperation<NodeIdentifier> {
}
@Override
- protected NormalizedNodeContainerBuilder createBuilder(final CompositeNode compositeNode) {
+ protected NormalizedNodeContainerBuilder<?, ?, ?, ?> createBuilder(final CompositeNode compositeNode) {
return Builders.containerBuilder().withNodeIdentifier(getIdentifier());
}
}
private static abstract class MixinNormalizationOp<T extends PathArgument> extends
- CompositeNodeNormalizationOpertation<T> {
+ CompositeNodeNormalizationOperation<T> {
protected MixinNormalizationOp(final T identifier) {
super(identifier);
}
- private static final class LeafListMixinNormalization extends MixinNormalizationOp<NodeIdentifier> {
+
+ private static final class OrderedLeafListMixinNormalization extends UnorderedLeafListMixinNormalization {
+
+
+ public OrderedLeafListMixinNormalization(final LeafListSchemaNode potential) {
+ super(potential);
+ }
+
+ @Override
+ protected NormalizedNodeContainerBuilder<?, ?, ?, ?> createBuilder(final CompositeNode compositeNode) {
+ return Builders.orderedLeafSetBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.orderedLeafSetBuilder().withNodeIdentifier(getIdentifier()).build();
+ }
+ }
+
+ private static class UnorderedLeafListMixinNormalization extends MixinNormalizationOp<NodeIdentifier> {
private final DataNormalizationOperation<?> innerOp;
- public LeafListMixinNormalization(final LeafListSchemaNode potential) {
+ public UnorderedLeafListMixinNormalization(final LeafListSchemaNode potential) {
super(new NodeIdentifier(potential.getQName()));
innerOp = new LeafListEntryNormalization(potential);
}
@Override
- protected NormalizedNodeContainerBuilder createBuilder(final CompositeNode compositeNode) {
+ protected NormalizedNodeContainerBuilder<?, ?, ?, ?> createBuilder(final CompositeNode compositeNode) {
return Builders.leafSetBuilder().withNodeIdentifier(getIdentifier());
}
}
}
- private static final class AugmentationNormalization extends MixinNormalizationOp<AugmentationIdentifier> {
-
- private final Map<QName, DataNormalizationOperation<?>> byQName;
- private final Map<PathArgument, DataNormalizationOperation<?>> byArg;
+ private static final class AugmentationNormalization extends DataContainerNormalizationOperation<AugmentationIdentifier> {
public AugmentationNormalization(final AugmentationSchema augmentation, final DataNodeContainer schema) {
- super(augmentationIdentifierFrom(augmentation));
-
- ImmutableMap.Builder<QName, DataNormalizationOperation<?>> byQNameBuilder = ImmutableMap.builder();
- ImmutableMap.Builder<PathArgument, DataNormalizationOperation<?>> byArgBuilder = ImmutableMap.builder();
-
- for (DataSchemaNode augNode : augmentation.getChildNodes()) {
- DataSchemaNode resolvedNode = schema.getDataChildByName(augNode.getQName());
- DataNormalizationOperation<?> resolvedOp = fromDataSchemaNode(resolvedNode);
- byArgBuilder.put(resolvedOp.getIdentifier(), resolvedOp);
- for (QName resQName : resolvedOp.getQNameIdentifiers()) {
- byQNameBuilder.put(resQName, resolvedOp);
- }
- }
- byQName = byQNameBuilder.build();
- byArg = byArgBuilder.build();
-
+ //super();
+ super(augmentationIdentifierFrom(augmentation), augmentationProxy(augmentation,schema));
}
@Override
- public DataNormalizationOperation<?> getChild(final PathArgument child) {
- return byArg.get(child);
+ public boolean isMixin() {
+ return true;
}
+
+
@Override
- public DataNormalizationOperation<?> getChild(final QName child) {
- return byQName.get(child);
+ protected DataNormalizationOperation<?> fromLocalSchemaAndQName(final DataNodeContainer schema, final QName child)
+ throws DataNormalizationException {
+ Optional<DataSchemaNode> potential = findChildSchemaNode(schema, child);
+ if (!potential.isPresent()) {
+ return null;
+ }
+
+ DataSchemaNode result = potential.get();
+ // We try to look up if this node was added by augmentation
+ if ((schema instanceof DataSchemaNode) && result.isAugmenting()) {
+ return fromAugmentation(schema, (AugmentationTarget) schema, result);
+ }
+ return fromDataSchemaNode(result);
}
@Override
}
- private static final class ListMixinNormalization extends MixinNormalizationOp<NodeIdentifier> {
+ private static class UnorderedMapMixinNormalization extends MixinNormalizationOp<NodeIdentifier> {
private final ListItemNormalization innerNode;
- public ListMixinNormalization(final ListSchemaNode list) {
+ public UnorderedMapMixinNormalization(final ListSchemaNode list) {
super(new NodeIdentifier(list.getQName()));
this.innerNode = new ListItemNormalization(new NodeIdentifierWithPredicates(list.getQName(),
Collections.<QName, Object> emptyMap()), list);
}
+
+ private static class UnkeyedListMixinNormalization extends MixinNormalizationOp<NodeIdentifier> {
+
+ private final UnkeyedListItemNormalization innerNode;
+
+ public UnkeyedListMixinNormalization(final ListSchemaNode list) {
+ super(new NodeIdentifier(list.getQName()));
+ this.innerNode = new UnkeyedListItemNormalization(list);
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(final CompositeNode compositeNode) {
+ return Builders.unkeyedListBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.unkeyedListBuilder().withNodeIdentifier(getIdentifier()).build();
+ }
+
+ @Override
+ public DataNormalizationOperation<?> getChild(final PathArgument child) {
+ if (child.getNodeType().equals(getIdentifier().getNodeType())) {
+ return innerNode;
+ }
+ return null;
+ }
+
+ @Override
+ public DataNormalizationOperation<?> getChild(final QName child) {
+ if (getIdentifier().getNodeType().equals(child)) {
+ return innerNode;
+ }
+ return null;
+ }
+
+ }
+
+ private static final class OrderedMapMixinNormalization extends UnorderedMapMixinNormalization {
+
+ public OrderedMapMixinNormalization(final ListSchemaNode list) {
+ super(list);
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(final CompositeNode compositeNode) {
+ return Builders.orderedMapBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.orderedMapBuilder().withNodeIdentifier(getIdentifier()).build();
+ }
+
+ }
+
private static class ChoiceNodeNormalization extends MixinNormalizationOp<NodeIdentifier> {
private final ImmutableMap<QName, DataNormalizationOperation<?>> byQName;
}
@Override
- protected NormalizedNodeContainerBuilder createBuilder(final CompositeNode compositeNode) {
+ protected NormalizedNodeContainerBuilder<?, ?, ?, ?> createBuilder(final CompositeNode compositeNode) {
return Builders.choiceBuilder().withNodeIdentifier(getIdentifier());
}
}
}
- public static DataNormalizationOperation<?> fromSchemaAndPathArgument(final DataNodeContainer schema,
- final QName child) {
- DataSchemaNode potential = schema.getDataChildByName(child);
+ private static class AnyXmlNormalization extends DataNormalizationOperation<NodeIdentifier> {
+
+ protected AnyXmlNormalization( final NodeIdentifier identifier ) {
+ super( identifier );
+ }
+
+ @Override
+ public DataNormalizationOperation<?> getChild( final PathArgument child ) throws DataNormalizationException {
+ return null;
+ }
+
+ @Override
+ public DataNormalizationOperation<?> getChild( final QName child ) throws DataNormalizationException {
+ return null;
+ }
+
+ @Override
+ public NormalizedNode<?, ?> normalize( final Node<?> legacyData ) {
+ NormalizedNodeAttrBuilder<NodeIdentifier, Node<?>, AnyXmlNode> builder =
+ Builders.anyXmlBuilder().withNodeIdentifier(
+ new NodeIdentifier( legacyData.getNodeType() ) );
+ builder.withValue(legacyData);
+ return builder.build();
+ }
+
+ @Override
+ public boolean isLeaf() {
+ return false;
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault( final PathArgument currentArg ) {
+ return null;
+ }
+ }
+
+ private static final Optional<DataSchemaNode> findChildSchemaNode(final DataNodeContainer parent,final QName child) {
+ DataSchemaNode potential = parent.getDataChildByName(child);
if (potential == null) {
Iterable<org.opendaylight.yangtools.yang.model.api.ChoiceNode> choices = FluentIterable.from(
- schema.getChildNodes()).filter(org.opendaylight.yangtools.yang.model.api.ChoiceNode.class);
+ parent.getChildNodes()).filter(org.opendaylight.yangtools.yang.model.api.ChoiceNode.class);
potential = findChoice(choices, child);
}
- checkArgument(potential != null, "Supplied QName %s is not valid according to schema %s", child, schema);
- if ((schema instanceof DataSchemaNode) && !((DataSchemaNode) schema).isAugmenting() && potential.isAugmenting()) {
- return fromAugmentation(schema, (AugmentationTarget) schema, potential);
+ return Optional.fromNullable(potential);
+ }
+
+ private static DataNormalizationOperation<?> fromSchemaAndQNameChecked(final DataNodeContainer schema,
+ final QName child) throws DataNormalizationException {
+
+ Optional<DataSchemaNode> potential = findChildSchemaNode(schema, child);
+ if (!potential.isPresent()) {
+ throw new DataNormalizationException(String.format("Supplied QName %s is not valid according to schema %s, potential children nodes: %s", child, schema,schema.getChildNodes()));
+ }
+
+ DataSchemaNode result = potential.get();
+ // We try to look up if this node was added by augmentation
+ if ((schema instanceof DataSchemaNode) && result.isAugmenting()) {
+ return fromAugmentation(schema, (AugmentationTarget) schema, result);
}
- return fromDataSchemaNode(potential);
+ return fromDataSchemaNode(result);
}
private static org.opendaylight.yangtools.yang.model.api.ChoiceNode findChoice(
org.opendaylight.yangtools.yang.model.api.ChoiceNode foundChoice = null;
choiceLoop: for (org.opendaylight.yangtools.yang.model.api.ChoiceNode choice : choices) {
for (ChoiceCaseNode caze : choice.getCases()) {
- if (caze.getDataChildByName(child) != null) {
+ if (findChildSchemaNode(caze, child).isPresent()) {
foundChoice = choice;
break choiceLoop;
}
for (DataSchemaNode child : augmentation.getChildNodes()) {
potentialChildren.add(child.getQName());
}
- return new AugmentationIdentifier(null, potentialChildren.build());
+ return new AugmentationIdentifier(potentialChildren.build());
}
- private static AugmentationNormalization fromAugmentation(final DataNodeContainer schema,
- final AugmentationTarget augments, final DataSchemaNode potential) {
+ private static DataNodeContainer augmentationProxy(final AugmentationSchema augmentation, final DataNodeContainer schema) {
+ Set<DataSchemaNode> children = new HashSet<>();
+ for (DataSchemaNode augNode : augmentation.getChildNodes()) {
+ children.add(schema.getDataChildByName(augNode.getQName()));
+ }
+ return new DataSchemaContainerProxy(children);
+ }
+
+ /**
+ * Returns a DataNormalizationOperation for provided child node
+ *
+ * If supplied child is added by Augmentation this operation returns
+ * a DataNormalizationOperation for augmentation,
+ * otherwise returns a DataNormalizationOperation for child as
+ * call for {@link #fromDataSchemaNode(DataSchemaNode)}.
+ *
+ *
+ * @param parent
+ * @param parentAug
+ * @param child
+ * @return
+ */
+ private static DataNormalizationOperation<?> fromAugmentation(final DataNodeContainer parent,
+ final AugmentationTarget parentAug, final DataSchemaNode child) {
AugmentationSchema augmentation = null;
- for (AugmentationSchema aug : augments.getAvailableAugmentations()) {
- DataSchemaNode child = aug.getDataChildByName(potential.getQName());
- if (child != null) {
+ for (AugmentationSchema aug : parentAug.getAvailableAugmentations()) {
+ DataSchemaNode potential = aug.getDataChildByName(child.getQName());
+ if (potential != null) {
augmentation = aug;
break;
}
}
if (augmentation != null) {
- return new AugmentationNormalization(augmentation, schema);
+ return new AugmentationNormalization(augmentation, parent);
} else {
- return null;
+ return fromDataSchemaNode(child);
}
}
- private static DataNormalizationOperation<?> fromSchema(final DataNodeContainer schema, final PathArgument child) {
- if (child instanceof AugmentationIdentifier) {
- return fromSchemaAndPathArgument(schema, ((AugmentationIdentifier) child).getPossibleChildNames()
- .iterator().next());
- }
- return fromSchemaAndPathArgument(schema, child.getNodeType());
- }
-
public static DataNormalizationOperation<?> fromDataSchemaNode(final DataSchemaNode potential) {
if (potential instanceof ContainerSchemaNode) {
return new ContainerNormalization((ContainerSchemaNode) potential);
} else if (potential instanceof ListSchemaNode) {
- return new ListMixinNormalization((ListSchemaNode) potential);
+
+ return fromListSchemaNode((ListSchemaNode) potential);
} else if (potential instanceof LeafSchemaNode) {
return new LeafNormalization(new NodeIdentifier(potential.getQName()));
} else if (potential instanceof org.opendaylight.yangtools.yang.model.api.ChoiceNode) {
return new ChoiceNodeNormalization((org.opendaylight.yangtools.yang.model.api.ChoiceNode) potential);
} else if (potential instanceof LeafListSchemaNode) {
- return new LeafListMixinNormalization((LeafListSchemaNode) potential);
+ return fromLeafListSchemaNode((LeafListSchemaNode) potential);
+ } else if (potential instanceof AnyXmlSchemaNode) {
+ return new AnyXmlNormalization( new NodeIdentifier(potential.getQName() ) );
}
return null;
}
+ private static DataNormalizationOperation<?> fromListSchemaNode(final ListSchemaNode potential) {
+ List<QName> keyDefinition = potential.getKeyDefinition();
+ if(keyDefinition == null || keyDefinition.isEmpty()) {
+ return new UnkeyedListMixinNormalization(potential);
+ }
+ if(potential.isUserOrdered()) {
+ return new OrderedMapMixinNormalization(potential);
+ }
+ return new UnorderedMapMixinNormalization(potential);
+ }
+
+ private static DataNormalizationOperation<?> fromLeafListSchemaNode(final LeafListSchemaNode potential) {
+ if(potential.isUserOrdered()) {
+ return new OrderedLeafListMixinNormalization(potential);
+ }
+ return new UnorderedLeafListMixinNormalization(potential);
+ }
+
+
public static DataNormalizationOperation<?> from(final SchemaContext ctx) {
return new ContainerNormalization(ctx);
}