use of com.google.cloud.vision.v1p4beta1.Feature in project osate2 by osate.
the class FeatureImpl method getPropertyValue.
public void getPropertyValue(Property prop, PropertyAcc pas, Classifier cl, final boolean all) {
Classifier owner = getContainingClassifier();
// local contained value
if (pas.addLocalContained(this, owner) && !all || pas.addLocal(this)) {
if (!all) {
return;
}
}
// values from refined features
Feature refined = getRefined();
while (refined != null) {
if (pas.addLocal(refined)) {
if (!all) {
return;
}
}
refined = refined.getRefined();
}
getPropertyValueHelper(prop, pas, cl, all);
// feature group TYPE, not an implementation.
if (prop.isInherit()) {
owner.getPropertyValueInternal(prop, pas, true, all);
}
}
use of com.google.cloud.vision.v1p4beta1.Feature in project osate2 by osate.
the class FeatureGroupTypeImpl method processFeatures.
private void processFeatures(final List<Feature> allFeatures, final List<Feature> refinedFeatures, final List<Feature> localFeatures) {
/*
* Iterate backwards, so when we insert features at the start of the complete list, they
* still are inserted in the order of declaration. Keep the refined features in order because
* the types get visited from the bottom of the tree up, so the feature being refined will
* not have been added to the list yet.
*/
for (final ListIterator<Feature> listIter = localFeatures.listIterator(localFeatures.size()); listIter.hasPrevious(); ) {
final Feature f = listIter.previous();
final Feature r = f.getRefined();
if (r == null) {
allFeatures.add(0, f);
} else {
refinedFeatures.add(0, f);
}
}
}
use of com.google.cloud.vision.v1p4beta1.Feature in project osate2 by osate.
the class FlowEndImpl method setFeature.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setFeature(Feature newFeature) {
Feature oldFeature = feature;
feature = newFeature;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, Aadl2Package.FLOW_END__FEATURE, oldFeature, feature));
}
}
use of com.google.cloud.vision.v1p4beta1.Feature in project osate2 by osate.
the class FeatureGroupImpl method getAllFeatureGroupType.
/*
* Get the feature group type of given feature group or its refinement ancestor, if it has
* one, otherwise null.
*
* @return The FeatureGroupType, or <code>null</code> if none.
*/
public FeatureGroupType getAllFeatureGroupType() {
FeatureGroupType cc = getFeatureGroupType();
Feature f = this;
while (cc == null && f.getRefined() != null) {
f = f.getRefined();
if (f instanceof FeatureGroup) {
cc = ((FeatureGroup) f).getFeatureGroupType();
}
}
return cc;
}
use of com.google.cloud.vision.v1p4beta1.Feature in project osate2 by osate.
the class Aadl2InstanceUtil method getIncomingConnection.
/**
* find incoming connection that goes through the feature of the specified component instance
* @param ci Component instance
* @param fi Feature instance
* @return list of connection instances going through the feature
*/
public static EList<ConnectionInstance> getIncomingConnection(ComponentInstance ci, FeatureInstance fi) {
Feature f = fi.getFeature();
EList<ConnectionInstance> result = new BasicEList<ConnectionInstance>();
// allEnclosingConnectionInstances();
Iterable<ConnectionInstance> it = ci.getSystemInstance().getAllConnectionInstances();
for (ConnectionInstance connectionInstance : it) {
ConnectionInstanceEnd dest = connectionInstance.getDestination();
ComponentInstance destci = dest.getContainingComponentInstance();
if (containedIn(destci, ci)) {
EList<ConnectionReference> connreflist = connectionInstance.getConnectionReferences();
for (ConnectionReference connectionReference : connreflist) {
ComponentInstance pci = connectionReference.getContext();
Connection conn = connectionReference.getConnection();
ConnectionEnd ce = conn.getAllSource();
if (pci == ci.getContainingComponentInstance() && ce == f) {
result.add(connectionInstance);
}
}
}
}
return result;
}
Aggregations