Class NormalizedNodeStreamWriterStack
- java.lang.Object
-
- org.opendaylight.yangtools.yang.data.util.NormalizedNodeStreamWriterStack
-
- All Implemented Interfaces:
LeafrefResolver
@Beta public final class NormalizedNodeStreamWriterStack extends Object implements LeafrefResolver
Utility class for tracking schema state underlying aNormalizedNode
structure.
-
-
Method Summary
-
-
-
Method Detail
-
of
public static @NonNull NormalizedNodeStreamWriterStack of(EffectiveStatementInference root)
Create a new writer with the specified inference state as its root.- Parameters:
root
- Root inference state- Returns:
- A new
NormalizedNodeStreamWriter
- Throws:
NullPointerException
- ifroot
is null
-
of
public static @NonNull NormalizedNodeStreamWriterStack of(SchemaInferenceStack.Inference root)
Create a new writer with the specified inference state as its root.- Parameters:
root
- Root inference state- Returns:
- A new
NormalizedNodeStreamWriter
- Throws:
NullPointerException
- ifroot
is null
-
of
public static @NonNull NormalizedNodeStreamWriterStack of(EffectiveModelContext context)
Create a new writer at the root of specifiedEffectiveModelContext
.- Parameters:
context
- effective model context- Returns:
- A new
NormalizedNodeStreamWriter
- Throws:
NullPointerException
- ifcontext
is null
-
of
public static @NonNull NormalizedNodeStreamWriterStack of(EffectiveModelContext context, SchemaNodeIdentifier.Absolute path)
Create a new writer with the specified context and rooted in the specified schema path.- Parameters:
context
- AssociatedEffectiveModelContext
path
- schema path- Returns:
- A new
NormalizedNodeStreamWriterStack
- Throws:
NullPointerException
- if any argument is nullIllegalArgumentException
- ifpath
does not point to a valid root
-
of
@Deprecated public static @NonNull NormalizedNodeStreamWriterStack of(EffectiveModelContext context, SchemaPath path)
Deprecated.Create a new writer with the specified context and rooted in the specified schema path.- Parameters:
context
- AssociatedEffectiveModelContext
path
- schema path- Returns:
- A new
NormalizedNodeStreamWriterStack
- Throws:
NullPointerException
- if any argument is nullIllegalArgumentException
- ifpath
does not point to a valid root
-
ofOperation
public static @NonNull NormalizedNodeStreamWriterStack ofOperation(EffectiveModelContext context, SchemaNodeIdentifier.Absolute operation, QName qname)
Create a new writer with the specified context and rooted in the specified schema path.- Parameters:
context
- AssociatedEffectiveModelContext
operation
- Operation schema pathqname
- Input/Output container QName- Returns:
- A new
NormalizedNodeStreamWriter
- Throws:
NullPointerException
- if any argument is nullIllegalArgumentException
- ifoperation
does not point to an actual operation or ifqname
does not identify a valid root underneath it.
-
resolveLeafref
public TypeDefinition<?> resolveLeafref(LeafrefTypeDefinition type)
Description copied from interface:LeafrefResolver
Resolve specifiedLeafrefTypeDefinition
until a non-leafref
type is found.- Specified by:
resolveLeafref
in interfaceLeafrefResolver
- Parameters:
type
- leafref definition- Returns:
- Resolved type
-
getParent
public Object getParent()
-
startList
public void startList(YangInstanceIdentifier.PathArgument name)
-
startListItem
public void startListItem(YangInstanceIdentifier.PathArgument name) throws IOException
- Throws:
IOException
-
startLeafNode
public void startLeafNode(YangInstanceIdentifier.NodeIdentifier name) throws IOException
- Throws:
IOException
-
startLeafSet
public LeafListSchemaNode startLeafSet(YangInstanceIdentifier.NodeIdentifier name)
-
leafSetEntryNode
public LeafListSchemaNode leafSetEntryNode(QName qname)
-
startLeafSetEntryNode
public void startLeafSetEntryNode(YangInstanceIdentifier.NodeWithValue<?> name)
-
startChoiceNode
public ChoiceSchemaNode startChoiceNode(YangInstanceIdentifier.NodeIdentifier name)
-
startContainerNode
public SchemaNode startContainerNode(YangInstanceIdentifier.NodeIdentifier name)
-
startAnyxmlNode
public void startAnyxmlNode(YangInstanceIdentifier.NodeIdentifier name)
-
startAnydataNode
public void startAnydataNode(YangInstanceIdentifier.NodeIdentifier name)
-
endNode
public Object endNode()
-
startAugmentationNode
public AugmentationSchemaNode startAugmentationNode(YangInstanceIdentifier.AugmentationIdentifier identifier)
-
-