use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class Arinc653 method getMemoryKind.
public static Optional<List<SupportedMemoryKind>> getMemoryKind(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getMemoryKind_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return SupportedMemoryKind.valueOf(resolved1);
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DataModel method getDimension.
public static Optional<List<Long>> getDimension(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getDimension_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((IntegerLiteral) resolved1).getValue();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DataModel method getEnumerators.
public static Optional<List<String>> getEnumerators(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getEnumerators_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((StringLiteral) resolved1).getValue();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DataModel method getInitialValue.
public static Optional<List<String>> getInitialValue(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getInitialValue_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((StringLiteral) resolved1).getValue();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DataModel method getRepresentation.
public static Optional<List<String>> getRepresentation(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getRepresentation_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((StringLiteral) resolved1).getValue();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
Aggregations