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.builder.impl;
10 import javax.xml.transform.dom.DOMSource;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
12 import org.opendaylight.yangtools.yang.data.api.schema.AnyXmlNode;
13 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeAttrBuilder;
14 import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
16 public final class ImmutableAnyXmlNodeSchemaAwareBuilder extends ImmutableAnyXmlNodeBuilder {
18 private ImmutableAnyXmlNodeSchemaAwareBuilder(final AnyXmlSchemaNode schema) {
19 super.withNodeIdentifier(NodeIdentifier.create(schema.getQName()));
22 public static NormalizedNodeAttrBuilder<NodeIdentifier, DOMSource, AnyXmlNode> create(
23 final AnyXmlSchemaNode schema) {
24 return new ImmutableAnyXmlNodeSchemaAwareBuilder(schema);
28 public NormalizedNodeAttrBuilder<NodeIdentifier, DOMSource, AnyXmlNode> withValue(final DOMSource withValue) {
29 return super.withValue(withValue);
33 public NormalizedNodeAttrBuilder<NodeIdentifier, DOMSource, AnyXmlNode> withNodeIdentifier(
34 final NodeIdentifier withNodeIdentifier) {
35 throw new UnsupportedOperationException("Node identifier created from schema");