use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DeploymentProperties method getSchedulingProtocol.
public static Optional<List<SupportedSchedulingProtocols>> getSchedulingProtocol(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getSchedulingProtocol_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 SupportedSchedulingProtocols.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 DeploymentProperties method getAllowedSubprogramCallBinding.
public static Optional<List<InstanceObject>> getAllowedSubprogramCallBinding(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getAllowedSubprogramCallBinding_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 ((InstanceReferenceValue) resolved1).getReferencedInstanceObject();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DeploymentProperties method getActualSubprogramCallBinding.
public static Optional<List<InstanceObject>> getActualSubprogramCallBinding(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getActualSubprogramCallBinding_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 ((InstanceReferenceValue) resolved1).getReferencedInstanceObject();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class CommunicationProperties method getConnectionPattern.
public static Optional<List<List<SupportedConnectionPatterns>>> getConnectionPattern(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getConnectionPattern_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 ((ListValue) resolved1).getOwnedListElements().stream().map(element2 -> {
PropertyExpression resolved2 = CodeGenUtil.resolveNamedValue(element2, lookupContext, mode);
return SupportedConnectionPatterns.valueOf(resolved2);
}).collect(Collectors.toList());
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class CommunicationProperties method getInputTime.
public static Optional<List<IoTimeSpec>> getInputTime(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getInputTime_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 new IoTimeSpec(resolved1, lookupContext, mode);
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
Aggregations