private final SchemaNode root;
private final NormalizedNodeStreamWriter writer;
- public OrderedNormalizedNodeWriter(NormalizedNodeStreamWriter writer, SchemaContext schemaContext, SchemaPath path) {
+ public OrderedNormalizedNodeWriter(final NormalizedNodeStreamWriter writer,final SchemaContext schemaContext,final SchemaPath path) {
this.writer = writer;
this.schemaContext = schemaContext;
this.root = findParentSchemaOnPath(schemaContext, path);
}
- private OrderedNormalizedNodeWriter write(NormalizedNode<?, ?> node, SchemaNode dataSchemaNode) throws IOException {
+ private OrderedNormalizedNodeWriter write(final NormalizedNode<?, ?> node, final SchemaNode dataSchemaNode) throws IOException {
if (node == null) {
return this;
}
throw new IllegalStateException("It wasn't possible to serialize node " + node);
}
- private void write(List<NormalizedNode<?, ?>> nodes, SchemaNode dataSchemaNode) throws IOException {
+ private void write(final List<NormalizedNode<?, ?>> nodes, final SchemaNode dataSchemaNode) throws IOException {
for (NormalizedNode<?, ?> node : nodes) {
write(node, dataSchemaNode);
}
throw new IllegalStateException("It wasn't possible to serialize node " + node);
}
- private boolean writeChildren(final Iterable<? extends NormalizedNode<?, ?>> children, SchemaNode parentSchemaNode, boolean endParent) throws IOException {
+ private boolean writeChildren(final Iterable<? extends NormalizedNode<?, ?>> children, final SchemaNode parentSchemaNode, boolean endParent) throws IOException {
//Augmentations cannot be gotten with node.getChild so create our own structure with augmentations resolved
ArrayListMultimap<QName, NormalizedNode<?, ?>> qNameToNodes = ArrayListMultimap.create();
for (NormalizedNode<?, ?> child : children) {
return true;
}
- private ArrayListMultimap<QName, NormalizedNode<?, ?>> resolveAugmentations(NormalizedNode<?, ?> child) {
+ private ArrayListMultimap<QName, NormalizedNode<?, ?>> resolveAugmentations(final NormalizedNode<?, ?> child) {
final ArrayListMultimap<QName, NormalizedNode<?, ?>> resolvedAugs = ArrayListMultimap.create();
for (NormalizedNode<?, ?> node : ((AugmentationNode) child).getValue()) {
if (node instanceof AugmentationNode) {
return false;
}
- private boolean wasProcessedAsCompositeNode(final NormalizedNode<?, ?> node, SchemaNode dataSchemaNode) throws IOException {
+ private boolean wasProcessedAsCompositeNode(final NormalizedNode<?, ?> node, final SchemaNode dataSchemaNode) throws IOException {
if (node instanceof ContainerNode) {
final ContainerNode n = (ContainerNode) node;
if(writer instanceof NormalizedNodeStreamAttributeWriter) {
}
//TODO similar code is already present in schemaTracker, unify this when this writer is moved back to yangtools
- private SchemaNode findParentSchemaOnPath(SchemaContext schemaContext, SchemaPath path) {
+ private SchemaNode findParentSchemaOnPath(final SchemaContext schemaContext, final SchemaPath path) {
SchemaNode current = Preconditions.checkNotNull(schemaContext);
for (final QName qname : path.getPathFromRoot()) {
SchemaNode child;
return input.getQName().equals(qname);
}
}
-}
\ No newline at end of file
+}