public IScope scope_StatusSource_property(final StatusSource exp, final EReference ref) { FunctionblockModel _model = exp.getModel(); FunctionblockModel model = ((FunctionblockModel) _model); FunctionBlock _functionblock = model.getFunctionblock(); Status _status = _functionblock.getStatus(); EList<Property> _properties = _status.getProperties(); return Scopes.scopeFor(_properties); }
String _xblockexpression = null; EObject _eContainer = status.eContainer(); EObject _eContainer_1 = _eContainer.eContainer(); FunctionblockModel fbm = ((FunctionblockModel) _eContainer_1); _builder.newLine(); _builder.append("\t\t"); EList<Property> _properties = status.getProperties(); CharSequence _handleProperties = EntityValidationTemplate.handleProperties(_properties, invocationContext); String _string = _handleProperties.toString(); _builder.newLine(); _builder.append("\t"); EList<Property> _properties_1 = status.getProperties(); CharSequence _calculateRequired = EntityValidationTemplate.calculateRequired(_properties_1); _builder.append(_calculateRequired, "\t");
public static FunctionblockModel convertToFlatHierarchy(FunctionblockModel fbm) { FunctionBlock fb = fbm.getFunctionblock(); // Consolidate all properties List<Property> properties = getFlatProperties(fbm); // remove super type reference if (fbm.getSuperType() != null) { removeSuperTypeModelReference(fbm); } properties.stream().filter(p -> p.getType() instanceof ObjectPropertyType) .forEach(p -> createReference(fbm, (ObjectPropertyType) p.getType())); Status status = FunctionblockFactory.eINSTANCE.createStatus(); status.getProperties().addAll(properties.stream().filter(p -> p.eContainer() instanceof Status) .collect(Collectors.toList())); fb.setStatus(status); Configuration configuration = FunctionblockFactory.eINSTANCE.createConfiguration(); configuration.getProperties().addAll(properties.stream() .filter(p -> p.eContainer() instanceof Configuration).collect(Collectors.toList())); fb.setConfiguration(configuration); // Consolidate all operations List<Operation> operations = getFlatOperations(fbm); fb.getOperations().clear(); fb.getOperations().addAll(operations); return fbm; }
private void generateStatus(InvocationContext context, String jsonFileExt, IGeneratedWriter outputter, String stateTargetPath, Status status) { if (status != null) { generateTask(status, context, outputter, ValidationTaskFactory.getPropertiesStatusValidationTask(jsonFileExt, stateTargetPath)); for (Property property : status.getProperties()) { generateTask(property, context, outputter, ValidationTaskFactory.getPropertiesSinglePropertyValidationTask( "-status-" + property.getName() + jsonFileExt, stateTargetPath)); } } }
public static InformationModel convertToFlatHierarchy(InformationModel infomodel) { for (FunctionblockProperty fbProperty : infomodel.getProperties()) { FunctionblockModel fbm = fbProperty.getType(); fbProperty.setType(convertToFlatHierarchy(fbm)); // merge any extended properties from information model to the FB properties if (fbProperty.getExtendedFunctionBlock() != null && fbProperty.getExtendedFunctionBlock().getStatus() != null) { for (Property extendedProperty : fbProperty.getExtendedFunctionBlock().getStatus() .getProperties()) { Optional<Property> baseProperty = fbm.getFunctionblock().getStatus().getProperties() .stream().filter(p -> p.getName().equals(extendedProperty.getName())).findFirst(); if (baseProperty.isPresent()) { baseProperty.get().setConstraintRule(extendedProperty.getConstraintRule()); } } } } return infomodel; }
FunctionBlock _functionblock = fbModel.getFunctionblock(); Status _status = _functionblock.getStatus(); EList<Property> _properties = _status.getProperties(); properties = _properties; } else {
public static EList<Type> getReferencedTypes(FunctionBlock fb) { EList<Type> types = new BasicEList<Type>(); if (fb != null) { // Analyze the status properties... if (fb.getStatus() != null) { for (Property property : fb.getStatus().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the configuration properties... if (fb.getConfiguration() != null) { for (Property property : fb.getConfiguration().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the fault properties... if (fb.getFault() != null) { for (Property property : fb.getFault().getProperties()) { types.addAll(getReferencedTypes(property)); } } } return types; } }
public static EList<Type> getReferencedTypes(FunctionBlock fb) { EList<Type> types = new BasicEList<Type>(); if (fb != null) { // Analyze the status properties... if (fb.getStatus() != null) { for (Property property : fb.getStatus().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the configuration properties... if (fb.getConfiguration() != null) { for (Property property : fb.getConfiguration().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the fault properties... if (fb.getFault() != null) { for (Property property : fb.getFault().getProperties()) { types.addAll(getReferencedTypes(property)); } } } return types; } }
final EList<Property> statusProps = status.getProperties();
if (_notEquals_1) { Status _status_1 = fb.getStatus(); EList<Property> _properties = _status_1.getProperties(); for (final Property property : _properties) { EList<Type> _referencedTypes = Utils.getReferencedTypes(property);
FunctionBlock _functionblock_2 = _type_2.getFunctionblock(); Status _status_1 = _functionblock_2.getStatus(); EList<Property> _properties_1 = _status_1.getProperties(); for(final Property statusProperty : _properties_1) { IMapped<Property> mappedElement_1 = context.getMappedElement(statusProperty, AbstractAlexaTemplate.STEREOTYPE_ALEXA);
@Override public void generate(InformationModel model, InvocationContext context, IGeneratedWriter writer) { for (FunctionblockProperty fbProperty : model.getProperties()) { for (Operation operation : fbProperty.getType().getFunctionblock().getOperations()) { IMapped<Operation> mappedElement = context.getMappedElement(operation,STEREOTYPE_AWS_THINGSHADOW); if (isUpdateableOperation(mappedElement)) { ICodeGeneratorTask<Operation> generator = new GeneratorTaskFromFileTemplate<>(new UpdateThingShadowLambdaTemplate(mappedElement)); generator.generate(operation,context,writer); } else if (!operation.getParams().isEmpty() && !operation.getName().startsWith("get")) { ICodeGeneratorTask<Operation> generator = new GeneratorTaskFromFileTemplate<>(new UpdateThingShadowLambdaTemplate(mappedElement)); generator.generate(operation,context,writer); } } if (fbProperty.getType().getFunctionblock().getStatus() != null) { for (Property statusProperty : fbProperty.getType().getFunctionblock().getStatus().getProperties()) { ICodeGeneratorTask<Property> generator = new GeneratorTaskFromFileTemplate<>(new GetThingShadowLambdaTemplate()); generator.generate(statusProperty,context,writer); } } } }
for (Property property : fb.getStatus().getProperties()) { transformProperty(service, property);
FunctionBlock _functionblock_2 = _type_2.getFunctionblock(); Status _status_1 = _functionblock_2.getStatus(); EList<Property> _properties_1 = _status_1.getProperties(); for(final Property statusProperty : _properties_1) { IMapped<Property> mappedElement_1 = context.getMappedElement(statusProperty, AbstractAlexaTemplate.STEREOTYPE_ALEXA);
} else { Status _status_1 = fb.getStatus(); EList<Property> _properties_2 = _status_1.getProperties(); boolean _tripleNotEquals_3 = (_properties_2 != null); _and_1 = _tripleNotEquals_3; EList<Property> _properties_3 = _status_2.getProperties(); for (final Property property_1 : _properties_3) { statusProperties.add(property_1);
EList<Property> _properties = _status_1.getProperties(); for(final Property property : _properties) { _builder.append("\t"); EList<Property> _properties_1 = _status_2.getProperties(); for(final Property property_1 : _properties_1) { _builder.append("\t");
EList<Property> _properties = _status_2.getProperties(); for(final Property status : _properties) { _builder.append(" "); EList<Property> _properties_1 = _status_4.getProperties(); for(final Property status_1 : _properties_1) { _builder.append(" ");
EList<Property> _properties = _status_1.getProperties(); for(final Property prop : _properties) { _builder.append(" "); EList<Property> _properties_1 = _status_3.getProperties(); for(final Property prop_1 : _properties_1) { _builder.append(" "); EList<Property> _properties_2 = _status_5.getProperties(); for(final Property prop_2 : _properties_2) { _builder.append(" ");
EList<Property> _properties = _status.getProperties(); for(final Property status : _properties) { EList<Property> _properties_1 = _status_1.getProperties(); for(final Property status_1 : _properties_1) {
FunctionBlock _functionblock_3 = _type_3.getFunctionblock(); Status _status_1 = _functionblock_3.getStatus(); EList<Property> _properties_1 = _status_1.getProperties(); boolean _hasElements_3 = false; for(final Property statusProperty : _properties_1) {