}
/**
+ * Create an absolute leafref path.
+ *
* @param leafRefPath leafRefPath
* @param contextNodeSchemaPath contextNodeSchemaPath
* @param module module
final Deque<QNameWithPredicate> absoluteLeafRefTargetPathList = schemaPathToXPathQNames(
contextNodeSchemaPath, module);
-
- final Iterable<QNameWithPredicate> leafRefTargetPathFromRoot = leafRefPath
- .getPathFromRoot();
- final Iterator<QNameWithPredicate> leafRefTgtPathFromRootIterator = leafRefTargetPathFromRoot
- .iterator();
+ final Iterator<QNameWithPredicate> leafRefTgtPathFromRootIterator = leafRefPath.getPathFromRoot().iterator();
while (leafRefTgtPathFromRootIterator.hasNext()) {
final QNameWithPredicate qname = leafRefTgtPathFromRootIterator.next();
return LeafRefPath.create(absoluteLeafRefTargetPathList, true);
}
- /**
- * @param currentNodePath
- * @param module
- * @param absoluteLeafRefTargetPathList
- */
private static Deque<QNameWithPredicate> schemaPathToXPathQNames(
final SchemaPath nodePath, final Module module) {
return xpath;
}
- public static LeafRefPath schemaPathToLeafRefPath(final SchemaPath nodePath,
- final Module module) {
- final Deque<QNameWithPredicate> xpathQNames = schemaPathToXPathQNames(
- nodePath, module);
- return LeafRefPath.create(xpathQNames, true);
+ public static LeafRefPath schemaPathToLeafRefPath(final SchemaPath nodePath, final Module module) {
+ return LeafRefPath.create(schemaPathToXPathQNames(nodePath, module), true);
}
-
}