public static boolean isContainerAdHoc(FlowElementsContainer container) { if (container instanceof Process) { Process process = (Process) container; Iterator<FeatureMap.Entry> iter = process.getAnyAttribute().iterator(); while(iter.hasNext()) { FeatureMap.Entry entry = iter.next(); if(entry.getEStructuralFeature().getName().equals("adHoc")) { return Boolean.parseBoolean(((String)entry.getValue()).trim()); } } } else if (container instanceof AdHocSubProcess) { return true; } return false; } }
@Override public Object doAdjustReferences(CDOReferenceAdjuster adjuster, Object value, EStructuralFeature feature, int index) { FeatureMap.Entry entry = (FeatureMap.Entry)value; EStructuralFeature innerFeature = entry.getEStructuralFeature(); Object innerValue = entry.getValue(); CDOType innerType = CDOModelUtil.getType(innerFeature.getEType()); Object innerCopy = innerType.adjustReferences(adjuster, innerValue, feature, index); if (innerCopy != innerValue) // Just an optimization for NOOP adjusters { value = CDORevisionUtil.createFeatureMapEntry(innerFeature, innerCopy); } return value; } };
protected Collection<Object> getValues(FeatureMap featureMap, String name, boolean remove) { Collection<Object> values = new UniqueEList.FastCompare<Object>(); for (Iterator<FeatureMap.Entry> entries = featureMap.iterator(); entries .hasNext();) { FeatureMap.Entry entry = entries.next(); if (name.equals(entry.getEStructuralFeature().getName())) { if (remove) { entries.remove(); } values.add(entry.getValue()); } } return values; }
public static boolean isContainerAdHoc(FlowElementsContainer container) { if (container instanceof Process) { Process process = (Process) container; Iterator<FeatureMap.Entry> iter = process.getAnyAttribute().iterator(); while(iter.hasNext()) { FeatureMap.Entry entry = iter.next(); if(entry.getEStructuralFeature().getName().equals("adHoc")) { return Boolean.parseBoolean(((String)entry.getValue()).trim()); } } } else if (container instanceof AdHocSubProcess) { return true; } return false; } }
public int size(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int result = 0; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { ++result; } } return result; }
public static boolean isAdHoc(FlowElement element) { if (element.eContainer() instanceof Process) { Process process = (Process) element.eContainer(); Iterator<FeatureMap.Entry> iter = process.getAnyAttribute().iterator(); while(iter.hasNext()) { FeatureMap.Entry entry = iter.next(); if(entry.getEStructuralFeature().getName().equals("adHoc")) { return Boolean.parseBoolean(((String)entry.getValue()).trim()); } } } else if (element instanceof AdHocSubProcess) { return true; } return false; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static String getText(ED ed) { StringBuffer text = new StringBuffer(""); for (FeatureMap.Entry entry : ed.getMixed()) { if (FeatureMapUtil.isText(entry)) { text.append(entry.getValue().toString()); } } return text.toString(); }
public static boolean isAdHoc(FlowElement element) { if (element.eContainer() instanceof Process) { Process process = (Process) element.eContainer(); Iterator<FeatureMap.Entry> iter = process.getAnyAttribute().iterator(); while(iter.hasNext()) { FeatureMap.Entry entry = iter.next(); if(entry.getEStructuralFeature().getName().equals("adHoc")) { return Boolean.parseBoolean(((String)entry.getValue()).trim()); } } } else if (element instanceof AdHocSubProcess) { return true; } return false; }
protected Collection<Object> getValues(FeatureMap featureMap, String name, boolean remove) { Collection<Object> values = new UniqueEList.FastCompare<Object>(); for (Iterator<FeatureMap.Entry> entries = featureMap.iterator(); entries .hasNext();) { FeatureMap.Entry entry = entries.next(); if (name.equals(entry.getEStructuralFeature().getName())) { if (remove) { entries.remove(); } values.add(entry.getValue()); } } return values; }
public static boolean isAdHoc(FlowElement element) { if (element.eContainer() instanceof Process) { Process process = (Process) element.eContainer(); Iterator<FeatureMap.Entry> iter = process.getAnyAttribute().iterator(); while(iter.hasNext()) { FeatureMap.Entry entry = iter.next(); if(entry.getEStructuralFeature().getName().equals("adHoc")) { return Boolean.parseBoolean(((String)entry.getValue()).trim()); } } } else if (element instanceof AdHocSubProcess) { return true; } return false; }
protected Collection<Object> getValues(FeatureMap featureMap, String name, boolean remove) { Collection<Object> values = new UniqueEList.FastCompare<Object>(); for (Iterator<FeatureMap.Entry> entries = featureMap.iterator(); entries .hasNext();) { FeatureMap.Entry entry = entries.next(); if (name.equals(entry.getEStructuralFeature().getName())) { if (remove) { entries.remove(); } values.add(entry.getValue()); } } return values; }
@Override protected Entry validate(int index, Entry object) { if (modCount == 0) return object; Entry result = super.validate(index, object); EStructuralFeature eStructuralFeature = object.getEStructuralFeature(); if (!eStructuralFeature.isChangeable() || !featureMapValidator.isValid(eStructuralFeature)) { throw new RuntimeException ("Invalid entry feature '" + eStructuralFeature.getEContainingClass().getName() + "." + eStructuralFeature.getName() + "'"); } return result; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static String getText(AD ad) { StringBuffer text = new StringBuffer(""); for (FeatureMap.Entry entry : ad.getMixed()) { if (FeatureMapUtil.isText(entry)) { text.append(entry.getValue().toString()); } } return text.toString(); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static String getText(EN en) { StringBuffer text = new StringBuffer(""); for (FeatureMap.Entry entry : en.getMixed()) { if (FeatureMapUtil.isText(entry)) { text.append(entry.getValue().toString()); } } return text.toString(); }
@Override protected Entry validate(int index, Entry object) { if (modCount == 0) return object; Entry result = super.validate(index, object); EStructuralFeature eStructuralFeature = object.getEStructuralFeature(); if (!eStructuralFeature.isChangeable() || !featureMapValidator.isValid(eStructuralFeature)) { throw new RuntimeException ("Invalid entry feature '" + eStructuralFeature.getEContainingClass().getName() + "." + eStructuralFeature.getName() + "'"); } return result; }
public int size(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int result = 0; for (int i = 0, size = delegateSize(); i < size; ++i) { Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { ++result; } } return result; }
public boolean isEmpty(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { return false; } } return true; }
@Override protected Entry validate(int index, Entry object) { if (modCount == 0) return object; Entry result = super.validate(index, object); EStructuralFeature eStructuralFeature = object.getEStructuralFeature(); if (!eStructuralFeature.isChangeable() || !featureMapValidator.isValid(eStructuralFeature)) { throw new RuntimeException ("Invalid entry feature '" + eStructuralFeature.getEContainingClass().getName() + "." + eStructuralFeature.getName() + "'"); } return result; }
public int size(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int result = 0; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { ++result; } } return result; }
@Override protected Object validate(int index, Object object) { if (object instanceof FeatureMapEntry) { return object; } else { FeatureMap.Entry entry = (FeatureMap.Entry)object; return createFeatureMapEntry(entry.getEStructuralFeature(), entry.getValue()); } } };