本文整理了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
[英]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
public IScope scope_EntityPropertySource_property(final EntityPropertySource exp, final EReference ref) {
Entity _model = exp.getModel();
Entity model = ((Entity) _model);
EList<Property> _properties = model.getProperties();
return Scopes.scopeFor(_properties);
}
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.prosystfi
public static EList<Type> getReferencedTypes(Entity entity) {
EList<Type> types = new BasicEList<Type>();
for (Property property : entity.getProperties()) {
types.addAll(getReferencedTypes(property));
}
types.add(entity.getSuperType());
return types;
}
代码示例来源:origin: org.eclipse.vorto/boschiotsuite-gateway
public static EList<Type> getReferencedTypes(Entity entity) {
EList<Type> types = new BasicEList<Type>();
for (Property property : entity.getProperties()) {
types.addAll(getReferencedTypes(property));
}
types.add(entity.getSuperType());
return types;
}
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.editor.datatype
@Override
public Collection<Model> apply(final Model input) {
final ArrayList<Model> children = Lists.<Model>newArrayList();
final Entity parent = ((Entity) input);
Entity _superType = parent.getSuperType();
boolean _notEquals = (!Objects.equal(_superType, null));
if (_notEquals) {
Entity _superType_1 = parent.getSuperType();
children.add(_superType_1);
}
EList<Property> _properties = parent.getProperties();
Collection<Model> _referenceModels = this.getReferenceModels(_properties);
children.addAll(_referenceModels);
return children;
}
}
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto
@Override
public String getContent(final Entity entity, final InvocationContext invocationContext) {
StringConcatenation _builder = new StringConcatenation();
EList<Property> _properties = entity.getProperties();
CharSequence _handleProperties = EntityValidationTemplate.handleProperties(_properties, invocationContext);
String _string = _handleProperties.toString();
String _trim = _string.trim();
_builder.append(_trim, "");
_builder.newLineIfNotEmpty();
return _builder.toString();
}
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino
public EList<Property> getEntity(final FunctionBlock fb, final PropertyType type) {
EList<Entity> _referencedEntities = Utils.getReferencedEntities(fb);
for (final Entity entity : _referencedEntities) {
boolean _and = false;
String _displayname = entity.getDisplayname();
Type _type = ((ObjectPropertyType) type).getType();
String _name = _type.getName();
boolean _equals = _displayname.equals(_name);
if (!_equals) {
_and = false;
} else {
String _namespace = entity.getNamespace();
Type _type_1 = ((ObjectPropertyType) type).getType();
String _namespace_1 = _type_1.getNamespace();
boolean _equals_1 = _namespace.equals(_namespace_1);
_and = _equals_1;
}
if (_and) {
return entity.getProperties();
}
}
return null;
}
}
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.webui
Entity entity = ((Entity) _type_3);
StringBuilder result = new StringBuilder();
EList<Property> _properties = entity.getProperties();
for (final Property _prop : _properties) {
PropertyType _type_4 = _prop.getType();
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.webdevice
Entity entity = ((Entity) _type_3);
StringBuilder result = new StringBuilder();
EList<Property> _properties = entity.getProperties();
for (final Property _prop : _properties) {
PropertyType _type_4 = _prop.getType();
代码示例来源:origin: eclipse/vorto
private static List<Property> getFlatProperties(FunctionblockModel fbm) {
List<Property> properties = new ArrayList<Property>();
TreeIterator<EObject> iter = fbm.eAllContents();
while (iter.hasNext()) {
EObject obj = iter.next();
if (obj instanceof Property) {
Property property = (Property) obj;
properties.add(property);
if (property.getType() instanceof ObjectPropertyType) {
ObjectPropertyType objectType = (ObjectPropertyType) property.getType();
if (objectType.getType() instanceof Entity) { // only flatten entities
Entity entity = (Entity) ((ObjectPropertyType) property.getType()).getType();
List<Property> entityProperties = getFlatProperties(entity);
entity.getProperties().addAll(entityProperties);
if (entity.getSuperType() != null) {
removeSuperTypeModelReference(entity);
}
entity.getProperties().stream().filter(p -> p.getType() instanceof ObjectPropertyType)
.forEach(p -> createReference(entity, (ObjectPropertyType) p.getType()));
}
}
}
}
if (fbm.getSuperType() != null) {
properties.addAll(getFlatProperties(fbm.getSuperType()));
}
return properties;
}
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen
public static EList<Type> getReferencedTypes(final Type type) {
BasicEList<Type> types = new BasicEList<Type>();
types.add(type);
if ((type instanceof Entity)) {
Entity entityType = ((Entity) type);
EList<Property> _properties = entityType.getProperties();
for (final Property property : _properties) {
EList<Type> _referencedTypes = Utils.getReferencedTypes(property);
types.addAll(_referencedTypes);
}
Entity _superType = entityType.getSuperType();
types.add(_superType);
}
return types;
}
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino
_builder.newLine();
EList<Property> _properties = dataEntity.getProperties();
for(final Property status : _properties) {
_builder.append(" ");
_builder.newLine();
EList<Property> _properties_1 = dataEntity.getProperties();
for(final Property status_1 : _properties_1) {
_builder.append(" ");
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.ios
_builder.newLine();
EList<Property> _properties = context.getProperties();
for(final Property property : _properties) {
_builder.append("\t");
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.templates.java
EList<Property> _properties = entity.getProperties();
for(final Property property : _properties) {
_builder.append("\t");
EList<Property> _properties_1 = entity.getProperties();
for(final Property property_1 : _properties_1) {
_builder.append("\t");
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.latex
_builder.newLineIfNotEmpty();
EList<Property> _properties = entity.getProperties();
for(final Property property : _properties) {
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto
_builder.newLine();
_builder.append("\t\t\t");
EList<Property> _properties = theEntity.getProperties();
CharSequence _handleProperties = EntityValidationTemplate.handleProperties(_properties, invocationContext);
_builder.append(_handleProperties, "\t\t\t");
_builder.append("\"required\": [");
EList<Property> _properties_1 = theEntity.getProperties();
final Function1<Property, Boolean> _function = (Property it) -> {
boolean _and = false;
_builder.newLine();
_builder.append("\t\t");
EList<Property> _properties_2 = theEntity.getProperties();
CharSequence _handleProperties_1 = EntityValidationTemplate.handleProperties(_properties_2, invocationContext);
_builder.append(_handleProperties_1, "\t\t");
_builder.append("\"required\": [");
EList<Property> _properties_3 = theEntity.getProperties();
final Function1<Property, Boolean> _function_1 = (Property it) -> {
boolean _and = false;
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino
_builder.newLine();
EList<Property> _properties = dataEntity.getProperties();
for(final Property status : _properties) {
_builder.append("void ");
_builder.newLineIfNotEmpty();
EList<Property> _properties_1 = dataEntity.getProperties();
for(final Property status_1 : _properties_1) {
_builder.append(" ");
代码示例来源:origin: org.eclipse.vorto/generator-templates-java
EList<Property> _properties = entity.getProperties();
for(final Property property : _properties) {
_builder.append("\t");
EList<Property> _properties_1 = entity.getProperties();
for(final Property property_1 : _properties_1) {
_builder.append("\t");
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto
_builder.append("\t");
_builder.append("\t");
EList<Property> _properties = entity.getProperties();
CharSequence _calculateRequired = EntityValidationTemplate.calculateRequired(_properties);
_builder.append(_calculateRequired, "\t\t");
_builder.newLine();
_builder.append("\t");
EList<Property> _properties_1 = entity.getProperties();
CharSequence _calculateRequired_1 = EntityValidationTemplate.calculateRequired(_properties_1);
_builder.append(_calculateRequired_1, "\t");
代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.ditto
_builder.append("\"required\": [");
EList<Property> _properties = entity.getProperties();
final Function1<Property, Boolean> _function = (Property it) -> {
boolean _and_3 = false;
_builder.append("\"required\": [");
EList<Property> _properties_1 = entity.getProperties();
final Function1<Property, Boolean> _function_1 = (Property it) -> {
boolean _and_4 = false;
内容来源于网络,如有侵权,请联系作者删除!