Search in sources :

Example 1 with Criterion

use of org.obeonetwork.dsl.entity.Criterion in project InformationSystem by ObeoNetwork.

the class FinderImpl method getName.

/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 *
 * @generated NOT
 */
public String getName() {
    String result = "";
    String customizedName = getCustomizedName();
    if ((customizedName != null) && (!customizedName.equals(""))) {
        result = customizedName;
    } else {
        result = "finder : ";
        EList<Criterion> listCriterions = getCriterions();
        if (listCriterions != null) {
            for (Iterator<Criterion> iter = listCriterions.iterator(); iter.hasNext(); ) {
                Criterion criterion = (Criterion) iter.next();
                if (criterion instanceof InternalCriterion) {
                    InternalCriterion internalCriterion = (InternalCriterion) criterion;
                    result += internalCriterion.getName();
                } else if (criterion instanceof ExternalCriterion) {
                    ExternalCriterion externalCriterion = (ExternalCriterion) criterion;
                    result += externalCriterion.getName();
                } else
                    result += criterion.toString();
                if (iter.hasNext())
                    result += ", ";
            }
        }
    }
    return result;
}
Also used : Criterion(org.obeonetwork.dsl.entity.Criterion) ExternalCriterion(org.obeonetwork.dsl.entity.ExternalCriterion) InternalCriterion(org.obeonetwork.dsl.entity.InternalCriterion) InternalCriterion(org.obeonetwork.dsl.entity.InternalCriterion) ExternalCriterion(org.obeonetwork.dsl.entity.ExternalCriterion)

Aggregations

Criterion (org.obeonetwork.dsl.entity.Criterion)1 ExternalCriterion (org.obeonetwork.dsl.entity.ExternalCriterion)1 InternalCriterion (org.obeonetwork.dsl.entity.InternalCriterion)1