}
protected ResourceExpression createResourceExpression(boolean exported, boolean virtual, boolean additive,
String type, Expression title, Object... keyValPairs) {
ResourceExpression re = pf.createResourceExpression();
Expression resourceExpr = null;
if(virtual) {
VirtualNameOrReference resourceName = pf.createVirtualNameOrReference();
resourceName.setValue(type);
resourceName.setExported(exported);
resourceExpr = resourceName;
}
else {
LiteralNameOrReference resourceName = pf.createLiteralNameOrReference();
resourceName.setValue(type);
resourceExpr = resourceName;
}
re.setResourceExpr(resourceExpr);
re.getResourceData().add(createResourceBody(additive, title, keyValPairs));
return re;
}