public interface DataTreeFactory
Modifier and Type | Method and Description |
---|---|
DataTree |
create(DataTreeConfiguration treeConfig)
Create a new data tree based on specified configuration, with a best-guess root.
|
DataTree |
create(DataTreeConfiguration treeConfig,
SchemaContext initialSchemaContext)
Create a new data tree based on specified configuration, with a root node derived from the schema context lookup
of the configuration.
|
DataTree |
create(DataTreeConfiguration treeConfig,
SchemaContext initialSchemaContext,
NormalizedNodeContainer<?,?,?> initialRoot)
Create a new data tree based on specified configuration, with the specified node.
|
DataTree create(DataTreeConfiguration treeConfig)
Correctness note: this method may not accurately initialize the root node in certain non-root scenarios due to
the impossibility to accurately derive root type from plain YangInstanceIdentifier. Using
create(DataTreeConfiguration, SchemaContext)
is recommended, as it does not suffer from this
shortcoming.
treeConfig
- Tree configuration.NullPointerException
- if treeConfig is nullDataTree create(DataTreeConfiguration treeConfig, SchemaContext initialSchemaContext)
treeConfig
- Tree configuration.NullPointerException
- if any of the arguments are nullIllegalArgumentException
- if tree configuration does not match the SchemaContext, for example by root path
referring to a node which does not exist in the SchemaContextDataTree create(DataTreeConfiguration treeConfig, SchemaContext initialSchemaContext, NormalizedNodeContainer<?,?,?> initialRoot) throws DataValidationFailedException
treeConfig
- Tree configuration.DataValidationFailedException
- if initial root is not valid according to the schema contextNullPointerException
- if any of the arguments are nullIllegalArgumentException
- if a mismatch between the arguments is detectedCopyright © 2019 OpenDaylight. All rights reserved.