org.eclipse.vorto.core.api.model.datatype.Entity.getProperties()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中org.eclipse.vorto.core.api.model.datatype.Entity.getProperties()方法的一些代码示例,展示了Entity.getProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.getProperties()方法的具体详情如下:
包路径:org.eclipse.vorto.core.api.model.datatype.Entity
类名称:Entity
方法名:getProperties

Entity.getProperties介绍

[英]Returns the value of the 'Properties' containment reference list. The list contents are of type org.eclipse.vorto.core.api.model.datatype.Property.

If the meaning of the 'Properties' containment reference list isn't clear, there really should be more of a description here...
[中]返回“Properties”包含引用列表的值。列表内容的类型为org。日食沃托。果心应用程序编程接口。模型数据类型。所有物
如果“Properties”包含引用列表的含义不清楚,那么这里应该有更多的描述。。。

代码示例

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.editor.mapping

  1. public IScope scope_EntityPropertySource_property(final EntityPropertySource exp, final EReference ref) {
  2. Entity _model = exp.getModel();
  3. Entity model = ((Entity) _model);
  4. EList<Property> _properties = model.getProperties();
  5. return Scopes.scopeFor(_properties);
  6. }

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.prosystfi

  1. public static EList<Type> getReferencedTypes(Entity entity) {
  2. EList<Type> types = new BasicEList<Type>();
  3. for (Property property : entity.getProperties()) {
  4. types.addAll(getReferencedTypes(property));
  5. }
  6. types.add(entity.getSuperType());
  7. return types;
  8. }

代码示例来源:origin: org.eclipse.vorto/boschiotsuite-gateway

  1. public static EList<Type> getReferencedTypes(Entity entity) {
  2. EList<Type> types = new BasicEList<Type>();
  3. for (Property property : entity.getProperties()) {
  4. types.addAll(getReferencedTypes(property));
  5. }
  6. types.add(entity.getSuperType());
  7. return types;
  8. }

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.editor.datatype

  1. @Override
  2. public Collection<Model> apply(final Model input) {
  3. final ArrayList<Model> children = Lists.<Model>newArrayList();
  4. final Entity parent = ((Entity) input);
  5. Entity _superType = parent.getSuperType();
  6. boolean _notEquals = (!Objects.equal(_superType, null));
  7. if (_notEquals) {
  8. Entity _superType_1 = parent.getSuperType();
  9. children.add(_superType_1);
  10. }
  11. EList<Property> _properties = parent.getProperties();
  12. Collection<Model> _referenceModels = this.getReferenceModels(_properties);
  13. children.addAll(_referenceModels);
  14. return children;
  15. }
  16. }

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto

  1. @Override
  2. public String getContent(final Entity entity, final InvocationContext invocationContext) {
  3. StringConcatenation _builder = new StringConcatenation();
  4. EList<Property> _properties = entity.getProperties();
  5. CharSequence _handleProperties = EntityValidationTemplate.handleProperties(_properties, invocationContext);
  6. String _string = _handleProperties.toString();
  7. String _trim = _string.trim();
  8. _builder.append(_trim, "");
  9. _builder.newLineIfNotEmpty();
  10. return _builder.toString();
  11. }

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino

  1. public EList<Property> getEntity(final FunctionBlock fb, final PropertyType type) {
  2. EList<Entity> _referencedEntities = Utils.getReferencedEntities(fb);
  3. for (final Entity entity : _referencedEntities) {
  4. boolean _and = false;
  5. String _displayname = entity.getDisplayname();
  6. Type _type = ((ObjectPropertyType) type).getType();
  7. String _name = _type.getName();
  8. boolean _equals = _displayname.equals(_name);
  9. if (!_equals) {
  10. _and = false;
  11. } else {
  12. String _namespace = entity.getNamespace();
  13. Type _type_1 = ((ObjectPropertyType) type).getType();
  14. String _namespace_1 = _type_1.getNamespace();
  15. boolean _equals_1 = _namespace.equals(_namespace_1);
  16. _and = _equals_1;
  17. }
  18. if (_and) {
  19. return entity.getProperties();
  20. }
  21. }
  22. return null;
  23. }
  24. }

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.webui

  1. Entity entity = ((Entity) _type_3);
  2. StringBuilder result = new StringBuilder();
  3. EList<Property> _properties = entity.getProperties();
  4. for (final Property _prop : _properties) {
  5. PropertyType _type_4 = _prop.getType();

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.webdevice

  1. Entity entity = ((Entity) _type_3);
  2. StringBuilder result = new StringBuilder();
  3. EList<Property> _properties = entity.getProperties();
  4. for (final Property _prop : _properties) {
  5. PropertyType _type_4 = _prop.getType();

代码示例来源:origin: eclipse/vorto

  1. private static List<Property> getFlatProperties(FunctionblockModel fbm) {
  2. List<Property> properties = new ArrayList<Property>();
  3. TreeIterator<EObject> iter = fbm.eAllContents();
  4. while (iter.hasNext()) {
  5. EObject obj = iter.next();
  6. if (obj instanceof Property) {
  7. Property property = (Property) obj;
  8. properties.add(property);
  9. if (property.getType() instanceof ObjectPropertyType) {
  10. ObjectPropertyType objectType = (ObjectPropertyType) property.getType();
  11. if (objectType.getType() instanceof Entity) { // only flatten entities
  12. Entity entity = (Entity) ((ObjectPropertyType) property.getType()).getType();
  13. List<Property> entityProperties = getFlatProperties(entity);
  14. entity.getProperties().addAll(entityProperties);
  15. if (entity.getSuperType() != null) {
  16. removeSuperTypeModelReference(entity);
  17. }
  18. entity.getProperties().stream().filter(p -> p.getType() instanceof ObjectPropertyType)
  19. .forEach(p -> createReference(entity, (ObjectPropertyType) p.getType()));
  20. }
  21. }
  22. }
  23. }
  24. if (fbm.getSuperType() != null) {
  25. properties.addAll(getFlatProperties(fbm.getSuperType()));
  26. }
  27. return properties;
  28. }

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen

  1. public static EList<Type> getReferencedTypes(final Type type) {
  2. BasicEList<Type> types = new BasicEList<Type>();
  3. types.add(type);
  4. if ((type instanceof Entity)) {
  5. Entity entityType = ((Entity) type);
  6. EList<Property> _properties = entityType.getProperties();
  7. for (final Property property : _properties) {
  8. EList<Type> _referencedTypes = Utils.getReferencedTypes(property);
  9. types.addAll(_referencedTypes);
  10. }
  11. Entity _superType = entityType.getSuperType();
  12. types.add(_superType);
  13. }
  14. return types;
  15. }

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino

  1. _builder.newLine();
  2. EList<Property> _properties = dataEntity.getProperties();
  3. for(final Property status : _properties) {
  4. _builder.append(" ");
  5. _builder.newLine();
  6. EList<Property> _properties_1 = dataEntity.getProperties();
  7. for(final Property status_1 : _properties_1) {
  8. _builder.append(" ");

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.ios

  1. _builder.newLine();
  2. EList<Property> _properties = context.getProperties();
  3. for(final Property property : _properties) {
  4. _builder.append("\t");

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.templates.java

  1. EList<Property> _properties = entity.getProperties();
  2. for(final Property property : _properties) {
  3. _builder.append("\t");
  4. EList<Property> _properties_1 = entity.getProperties();
  5. for(final Property property_1 : _properties_1) {
  6. _builder.append("\t");

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.latex

  1. _builder.newLineIfNotEmpty();
  2. EList<Property> _properties = entity.getProperties();
  3. for(final Property property : _properties) {

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto

  1. _builder.newLine();
  2. _builder.append("\t\t\t");
  3. EList<Property> _properties = theEntity.getProperties();
  4. CharSequence _handleProperties = EntityValidationTemplate.handleProperties(_properties, invocationContext);
  5. _builder.append(_handleProperties, "\t\t\t");
  6. _builder.append("\"required\": [");
  7. EList<Property> _properties_1 = theEntity.getProperties();
  8. final Function1<Property, Boolean> _function = (Property it) -> {
  9. boolean _and = false;
  10. _builder.newLine();
  11. _builder.append("\t\t");
  12. EList<Property> _properties_2 = theEntity.getProperties();
  13. CharSequence _handleProperties_1 = EntityValidationTemplate.handleProperties(_properties_2, invocationContext);
  14. _builder.append(_handleProperties_1, "\t\t");
  15. _builder.append("\"required\": [");
  16. EList<Property> _properties_3 = theEntity.getProperties();
  17. final Function1<Property, Boolean> _function_1 = (Property it) -> {
  18. boolean _and = false;

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino

  1. _builder.newLine();
  2. EList<Property> _properties = dataEntity.getProperties();
  3. for(final Property status : _properties) {
  4. _builder.append("void ");
  5. _builder.newLineIfNotEmpty();
  6. EList<Property> _properties_1 = dataEntity.getProperties();
  7. for(final Property status_1 : _properties_1) {
  8. _builder.append(" ");

代码示例来源:origin: org.eclipse.vorto/generator-templates-java

  1. EList<Property> _properties = entity.getProperties();
  2. for(final Property property : _properties) {
  3. _builder.append("\t");
  4. EList<Property> _properties_1 = entity.getProperties();
  5. for(final Property property_1 : _properties_1) {
  6. _builder.append("\t");

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto

  1. _builder.append("\t");
  2. _builder.append("\t");
  3. EList<Property> _properties = entity.getProperties();
  4. CharSequence _calculateRequired = EntityValidationTemplate.calculateRequired(_properties);
  5. _builder.append(_calculateRequired, "\t\t");
  6. _builder.newLine();
  7. _builder.append("\t");
  8. EList<Property> _properties_1 = entity.getProperties();
  9. CharSequence _calculateRequired_1 = EntityValidationTemplate.calculateRequired(_properties_1);
  10. _builder.append(_calculateRequired_1, "\t");

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto

  1. _builder.append("\"required\": [");
  2. EList<Property> _properties = entity.getProperties();
  3. final Function1<Property, Boolean> _function = (Property it) -> {
  4. boolean _and_3 = false;
  5. _builder.append("\"required\": [");
  6. EList<Property> _properties_1 = entity.getProperties();
  7. final Function1<Property, Boolean> _function_1 = (Property it) -> {
  8. boolean _and_4 = false;

相关文章