}
@Override
public Key getPropertyValue(PropertyValue propertyValue) {
Reference reference = new Reference();
ReferenceValue refValue = propertyValue.getReferenceValue();
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 KeyTranslator.createFromPb(reference);
}