use of com.onespatial.jrc.tns.oml_to_rif.translate.context.RifVariable in project hale by halestudio.
the class ModelAlignmentToModelRifTranslator method lazyCreate.
private RifVariable lazyCreate(RifVariable current, GmlAttribute fragment, ModelSentence sentence, boolean isSource) {
// XXX what name to use here? //getName(fragment.getAttributeElement());
String propertyName = fragment.getDefinition().getName();
RifVariable child = sentence.findChildAttribute(current, propertyName);
if (child == null) {
String variableName = // $NON-NLS-1$
fragment.getDefinition().getDeclaringType().getName().getLocalPart() + "-" + fragment.getDefinition().getName();
variableName = variableName.toLowerCase();
if (isSource) {
child = sentence.createVariable(variableName);
} else {
child = sentence.createActionVariable(variableName, false);
}
child.setType(Type.ATTRIBUTE);
child.setPropertyName(propertyName);
child.setContextVariable(current);
}
return child;
}
Aggregations