public class DefaultYangModelRegistry extends Object implements YangModelRegistry, org.onosproject.yang.model.SingleInstanceNodeContext
| Constructor and Description |
|---|
DefaultYangModelRegistry()
Creates an instance of default YANG schema registry.
|
| Modifier and Type | Method and Description |
|---|---|
org.onosproject.yang.model.SchemaContext |
getChildContext(org.onosproject.yang.model.SchemaId schemaId) |
org.onosproject.yang.compiler.datamodel.YangSchemaNode |
getForNameSpace(String nameSpace,
boolean isForChildContext)
Returns schema node for the given name.
|
org.onosproject.yang.compiler.datamodel.YangSchemaNode |
getForSchemaName(String schemaName)
Returns schema node for the given name.
|
org.onosproject.yang.model.YangModel |
getModel(String id)
Returns YANG model for given model id.
|
Set<org.onosproject.yang.model.YangModel> |
getModels()
Returns collection of all registered models.
|
org.onosproject.yang.model.YangModule |
getModule(org.onosproject.yang.model.YangModuleId id)
Returns YANG module for given YANG module id.
|
org.onosproject.yang.model.SchemaContext |
getParentContext() |
org.onosproject.yang.model.SchemaId |
getSchemaId() |
org.onosproject.yang.model.DataNode.Type |
getType() |
void |
registerAnydataSchema(org.onosproject.yang.model.ModelObjectId aid,
org.onosproject.yang.model.ModelObjectId cid)
Registers the given generated node referenced by given model object
identifier under provided anydata model object identifier.
|
void |
registerModel(ModelRegistrationParam param)
Registers a new model.
|
void |
unregisterAnydataSchema(Class id,
Class id1)
Unregisters the given generated node class under provided anydata class.
|
void |
unregisterModel(ModelRegistrationParam param)
Unregisters the specified model.
|
public DefaultYangModelRegistry()
public void registerModel(ModelRegistrationParam param) throws IllegalArgumentException
YangModelRegistryregisterModel in interface YangModelRegistryparam - parameters having model to be registered with additional
information provided by appIllegalArgumentException - when requested model with provided
identifier is already registered or
not validpublic void registerAnydataSchema(org.onosproject.yang.model.ModelObjectId aid,
org.onosproject.yang.model.ModelObjectId cid)
throws IllegalArgumentException
YangModelRegistryregisterAnydataSchema in interface YangModelRegistryaid - identifier to reference anydata container under which
application is expecting the datacid - identifier to reference the node defined in YANG file which
application can send as content or child nodes under anydataIllegalArgumentException - when provided identifier is not
not validpublic void unregisterAnydataSchema(Class id, Class id1) throws IllegalArgumentException
YangModelRegistryunregisterAnydataSchema in interface YangModelRegistryid - identifier to reference anydata container under which
application has registered the schemaid1 - identifier to reference the node defined in YANG file which
application can send as content or child nodes under anydataIllegalArgumentException - when provided identifier is not
not validpublic void unregisterModel(ModelRegistrationParam param)
YangModelRegistryunregisterModel in interface YangModelRegistryparam - parameters having model to be registered with additional
information provided by apppublic Set<org.onosproject.yang.model.YangModel> getModels()
YangModelRegistrygetModels in interface YangModelRegistrypublic org.onosproject.yang.compiler.datamodel.YangSchemaNode getForSchemaName(String schemaName)
schemaName - schema namepublic org.onosproject.yang.model.YangModel getModel(String id)
YangModelRegistrygetModel in interface YangModelRegistryid - model identifierpublic org.onosproject.yang.model.YangModule getModule(org.onosproject.yang.model.YangModuleId id)
YangModelRegistrygetModule in interface YangModelRegistryid - module identifierpublic org.onosproject.yang.compiler.datamodel.YangSchemaNode getForNameSpace(String nameSpace, boolean isForChildContext)
nameSpace - name space of YANG fileisForChildContext - if the method call has arrived for child contextpublic org.onosproject.yang.model.SchemaContext getParentContext()
getParentContext in interface org.onosproject.yang.model.SchemaContextpublic org.onosproject.yang.model.DataNode.Type getType()
getType in interface org.onosproject.yang.model.SchemaContextpublic org.onosproject.yang.model.SchemaId getSchemaId()
getSchemaId in interface org.onosproject.yang.model.SchemaContextpublic org.onosproject.yang.model.SchemaContext getChildContext(org.onosproject.yang.model.SchemaId schemaId)
getChildContext in interface org.onosproject.yang.model.SingleInstanceNodeContextCopyright © 2018. All rights reserved.