return refValue;
}
private static Reference toReference(ReferenceValue refValue) {
Reference reference = new Reference();
reference.setApp(refValue.getApp());
if (refValue.hasNameSpace()) {
reference.setNameSpace(refValue.getNameSpace());
}
Path path = new Path();
for (ReferenceValuePathElement element : refValue.pathElements()) {
Element newElement = new Element();
newElement.setType(element.getType());
if (element.hasName()) {
newElement.setName(element.getName());
}
if (element.hasId()) {
newElement.setId(element.getId());
}
path.addElement(newElement);
}
reference.setPath(path);
return reference;
}