use of org.obeonetwork.dsl.environment.Property in project InformationSystem by ObeoNetwork.
the class DBoundElementContentProvider method getDelegatedChildren.
private EObject[] getDelegatedChildren(EObject object) {
if (object instanceof StructuredType) {
StructuredType structuredType = (StructuredType) object;
List<Property> properties = new ArrayList<Property>();
properties.addAll(structuredType.getAttributes());
for (StructuredType associatedType : structuredType.getAssociatedTypes()) {
properties.addAll(associatedType.getAttributes());
}
properties.addAll(structuredType.getReferences());
return (EObject[]) properties.toArray(new EObject[] {});
} else if (object instanceof Reference) {
Reference entityReference = (Reference) object;
if (entityReference.getReferencedType() != null) {
return getDelegatedChildren(entityReference.getReferencedType());
} else {
return new EObject[] {};
}
}
return new EObject[] {};
}
use of org.obeonetwork.dsl.environment.Property in project InformationSystem by ObeoNetwork.
the class EntityFilterImpl method getReferenceReferences.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public EList<Reference> getReferenceReferences() {
BasicEList<Reference> result = new UniqueEList<Reference>() {
private static final long serialVersionUID = 5391913769894408421L;
protected Object[] newData(int capacity) {
return new Reference[capacity];
}
protected boolean useEquals() {
return false;
}
};
for (Property property : getOwnedPropertyReferences()) {
if (property instanceof Reference) {
result.add((Reference) property);
}
}
result.shrink();
EList<Reference> unmodifiableResult = new EcoreEList.UnmodifiableEList.FastCompare<Reference>(this, ExtensionUtilitiesPackage.eINSTANCE.getEntityFilter_ReferenceReferences(), result.size(), result.data());
return unmodifiableResult;
}
use of org.obeonetwork.dsl.environment.Property in project InformationSystem by ObeoNetwork.
the class EntityFilterImpl method getAttributeReferences.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public EList<Attribute> getAttributeReferences() {
BasicEList<Attribute> result = new UniqueEList<Attribute>() {
private static final long serialVersionUID = 971586213550724954L;
protected Object[] newData(int capacity) {
return new Attribute[capacity];
}
protected boolean useEquals() {
return false;
}
};
for (Property property : getOwnedPropertyReferences()) {
if (property instanceof Attribute) {
result.add((Attribute) property);
}
}
result.shrink();
EList<Attribute> unmodifiableResult = new EcoreEList.UnmodifiableEList.FastCompare<Attribute>(this, ExtensionUtilitiesPackage.Literals.ENTITY_FILTER__ATTRIBUTE_REFERENCES, result.size(), result.data());
return unmodifiableResult;
}
Aggregations