Class AbstractNodeDataWithSchema<T extends DataSchemaNode>
java.lang.Object
org.opendaylight.yangtools.yang.data.util.AbstractNodeDataWithSchema<T>
- Direct Known Subclasses:
CompositeNodeDataWithSchema
,SimpleNodeDataWithSchema
Utility abstract class for tracking parser state, as needed by StAX-like parser.
This class is to be used only by respective XML and JSON parsers in yang-data-codec-xml and yang-data-codec-gson.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
final ImmutableMap<QName,
Object> Return the associated attributes.final @NonNull T
Return the associated schema node.int
hashCode()
protected final YangInstanceIdentifier.NodeIdentifier
final void
setAttributes
(ImmutableMap<QName, Object> attributes) Set the associated attributes.final void
write
(NormalizedNodeStreamWriter writer) Emit this node's events into the specified writer.protected abstract void
write
(NormalizedNodeStreamWriter writer, @Nullable StreamWriterMetadataExtension metaWriter) protected final void
writeMetadata
(StreamWriterMetadataExtension metaWriter)
-
Constructor Details
-
AbstractNodeDataWithSchema
-
-
Method Details
-
getSchema
Return the associated schema node.- Returns:
- Associated schema node.
-
setAttributes
Set the associated attributes.- Parameters:
attributes
- parsed attributes
-
getAttributes
Return the associated attributes.- Returns:
- associated attributes
-
write
Emit this node's events into the specified writer.- Parameters:
writer
- Target writer- Throws:
IOException
- reported when thrown by the writer.
-
write
protected abstract void write(NormalizedNodeStreamWriter writer, @Nullable StreamWriterMetadataExtension metaWriter) throws IOException - Throws:
IOException
-
provideNodeIdentifier
-
writeMetadata
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-