Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleIf the model is not registered the implementation returns null else it returns schema context corresponding to a given resource identifier.
SchemaContext getSchemaContext(ResourceId id)

Helper Utils

 

 

  • Runtime Helper

    Represents utility for runtime.These utilities can be used by the application to get the YANG model for the application and also it can be used by the runtime to get the YANG Node for the given YANG model.
    Examples API's :

    Code Block
    languagejava
    titleTo obtain YANG model for given generated class:
     YANGModel getModel(Class<?> aClass)
    Code Block
    languagejava
    titleTo get YANG node for given YANG model
     Set<YANGNode> getNodes(YANGModel model)
    Code Block
    languagejava
    titleTo get interface class name of the schema node
     String getInterfaceClassName(YANGSchemaNode schemaNode)

...

  • Serializer Helper

    These set of utilities are used by Serializer to build the data node and resource identifier without obtaining schema.

    Example API's:

    Code Block
    languagejava
    titleTo add to resource identifier builder used by applications which are not aware about the schema name association with key's value.This api will also carry out necessary schema related validations.
     ResourceId.Builder addToResourceId(ResourceId.Builder builder, String name, String namespace, List<String> value)
    Code Block
    languagejava
    titleTo add a data node to a given data node builder. This API will also carry out necessary schema related validations.
    Builder addDataNode(Builder builder, String name, String namespace, String value, DataNode.Type type)
    Code Block
    languagejava
    titleTo get the resource identifier for a given data node. This API will be used by serializer to obtain the resource identifier in the scenario when an annotation is associated with a given data node.
    ResourceId getResourceId(Builder builder)

...