- /**
- * Extracts the base type of leaf schema node until it reach concrete type of TypeDefinition.
- *
- * @param node
- * a node representing LeafSchemaNode
- * @return concrete type definition of node value
- */
- private static TypeDefinition<?> typeDefinition(final LeafSchemaNode node) {
- TypeDefinition<?> baseType = node.getType();
- while (baseType.getBaseType() != null) {
- baseType = baseType.getBaseType();
- }
- return baseType;
- }
-
- /**
- * Extracts the base type of leaf schema node until it reach concrete type of TypeDefinition.
- *
- * @param node
- * a node representing LeafListSchemaNode
- * @return concrete type definition of node value
- */
- private static TypeDefinition<?> typeDefinition(final LeafListSchemaNode node) {
- TypeDefinition<?> baseType = node.getType();
- while (baseType.getBaseType() != null) {
- baseType = baseType.getBaseType();
- }
- return baseType;
- }
-