public final class SchemaUtils extends Object
public static com.google.common.base.Optional<DataSchemaNode> findFirstSchema(QName qname, Iterable<DataSchemaNode> dataSchemaNode)
qname - - schema node to finddataSchemaNode - - iterable of schemaNodes to look throughpublic static DataSchemaNode findSchemaForChild(DataNodeContainer schema, QName qname)
schema - schema for parent node - search rootqname - qname(with or without a revision) of a child node to be found in the parent schemaIllegalStateException - if the child was not found in parent schema node@Nullable public static DataSchemaNode findSchemaForChild(DataNodeContainer schema, QName qname, boolean strictMode)
public static DataSchemaNode findSchemaForChild(DataNodeContainer schema, QName qname, Iterable<DataSchemaNode> childNodes)
public static AugmentationSchema findSchemaForAugment(AugmentationTarget schema, Set<QName> qNames)
public static AugmentationSchema findSchemaForAugment(ChoiceSchemaNode schema, Set<QName> qNames)
public static DataSchemaNode findSchemaForChild(ChoiceSchemaNode schema, QName childPartialQName)
public static Map<QName,ChoiceSchemaNode> mapChildElementsFromChoices(DataNodeContainer schema)
schema - schemapublic static Map<QName,AugmentationSchema> mapChildElementsFromAugments(AugmentationTarget schema)
schema - schemapublic static Set<QName> getChildNodesRecursive(DataNodeContainer nodeContainer)
nodeContainer - node containerpublic static Set<DataSchemaNode> getRealSchemasForAugment(AugmentationTarget targetSchema, AugmentationSchema augmentSchema)
targetSchema - target schemaaugmentSchema - augment schemapublic static Set<DataSchemaNode> getRealSchemasForAugment(DataNodeContainer targetSchema, AugmentationSchema augmentSchema)
public static com.google.common.base.Optional<ChoiceCaseNode> detectCase(ChoiceSchemaNode schema, DataContainerChild<?,?> child)
public static boolean belongsToCaseAugment(ChoiceCaseNode caseNode, YangInstanceIdentifier.AugmentationIdentifier childToProcess)
public static AugmentationSchema findCorrespondingAugment(DataSchemaNode parent, DataSchemaNode child)
parent which is dealed as augmentation target node with QName as child. If such
node is found then it is returned, else null.parent - parent nodechild - child nodepublic static YangInstanceIdentifier.AugmentationIdentifier getNodeIdentifierForAugmentation(AugmentationSchema schema)
public static SchemaNode findDataParentSchemaOnPath(SchemaContext schemaContext, SchemaPath path)
schemaContext - schema contextpath - path@Deprecated public static SchemaNode findParentSchemaOnPath(SchemaContext schemaContext, SchemaPath path)
findParentSchemaNodesOnPath(SchemaContext, SchemaPath)
instead.schemaContext - schema contextpath - path@Nullable public static SchemaNode findDataChildSchemaByQName(SchemaNode node, QName qname)
node - schema nodeqname - QNameIllegalArgumentException - if the schema node does not allow children@Deprecated public static SchemaNode findChildSchemaByQName(SchemaNode node, QName qname)
findChildSchemaNodesByQName(SchemaNode, QName)
instead.node - schema nodeqname - QNameIllegalArgumentException - if the schema node does not allow childrenpublic static Collection<SchemaNode> findParentSchemaNodesOnPath(SchemaContext schemaContext, SchemaPath path)
schemaContext - schema contextpath - pathpublic static Collection<SchemaNode> findChildSchemaNodesByQName(SchemaNode node, QName qname)
node - schema nodeqname - QNameIllegalArgumentException - if the schema node does not allow childrenCopyright © 2018 OpenDaylight. All rights reserved.