private boolean isBound(Set<PhysicalEntity> participants) { for(PhysicalEntity pe : participants) { //if(pe instanceof Complex) continue; // it's impossible as far isBound called from where it is called if(pe.getFeature() != null && pe.getFeature() instanceof BindingFeature) { BindingFeature bf1 = (BindingFeature) pe.getFeature(); BindingFeature bf2 = bf1.getBindsTo(); if(bf2 != null) { Set<PhysicalEntity> bf2Of = bf2.getFeatureOf(); //if these phys. entities are (same side) participants as well if(!Collections.disjoint(participants, bf2Of)) return true; } } } return false; }
private static Set<Modification> collectFeatures(PhysicalEntity pe) { Set<Modification> set = new HashSet<Modification>(); for (EntityFeature f : pe.getFeature()) { if (f instanceof ModificationFeature) set.add(new Modification((ModificationFeature) f)); } return set; }
private boolean isBound(Set<PhysicalEntity> participants) { for(PhysicalEntity pe : participants) { //if(pe instanceof Complex) continue; // it's impossible as far isBound called from where it is called if(pe.getFeature() != null && pe.getFeature() instanceof BindingFeature) { BindingFeature bf1 = (BindingFeature) pe.getFeature(); BindingFeature bf2 = bf1.getBindsTo(); if(bf2 != null) { Set<PhysicalEntity> bf2Of = bf2.getFeatureOf(); //if these phys. entities are (same side) participants as well if(!Collections.disjoint(participants, bf2Of)) return true; } } } return false; }
public void check(final Validation validation, PhysicalEntity thing) { // Capture PEs that is both a participant of a conversion and a component of a complex if(!thing.getParticipantOf().isEmpty() && !thing.getComponentOf().isEmpty()) { HashSet<EntityFeature> efs = new HashSet<EntityFeature>(); efs.addAll(thing.getFeature()); efs.addAll(thing.getNotFeature()); // Do we have any information about the binding properties? If so, it's OK. for(EntityFeature ef: efs) { if(ef instanceof BindingFeature) { return; } } // TODO: Call Emek's feature resolver function explicitly if the PE is to be fixed error(validation, thing, "ambiguous.feature", false, thing.getName()); } }
@Override public void check(PhysicalEntity thing, boolean fix) { // Capture PEs that is both a participant of a conversion and a component of a complex if(!thing.getParticipantOf().isEmpty() && !thing.getComponentOf().isEmpty()) { HashSet<EntityFeature> efs = new HashSet<EntityFeature>(); efs.addAll(thing.getFeature()); efs.addAll(thing.getNotFeature()); // Do we have any information about the binding properties? If so, it's OK. for(EntityFeature ef: efs) { if(ef instanceof BindingFeature) { return; } } // TODO: Call Emek's feature resolver function explicitly if the PE is to be fixed error(thing, "ambiguous.feature", false, thing.getName()); } }
result.put(EXISTENCE, NOT_EXIST_TO_EXIST); for (EntityFeature entityFeature : right.getFeature()) { result.put(entityFeature, NOT_EXIST_TO_EXIST); for (EntityFeature entityFeature : left.getFeature()) { result.put(entityFeature, EXIST_TO_NOT_EXIST); for (EntityFeature lFeat : left.getFeature()) { if (right.getFeature().contains(lFeat)) if (right.getFeature().contains(lFeat)) { result.put(lFeat, NOT_EXIST_TO_EXIST); for (EntityFeature rFeat : right.getFeature()) { if (!result.containsKey(rFeat)) { result.put(rFeat, UNKNOWN_TO_EXIST);
extractFeatures(pe.getFeature(), true, list); extractFeatures(pe.getNotFeature(), false, list);
Set<EntityFeature> entityFeatures = physicalEntityBP.getFeature(); for (EntityFeature entityFeature : entityFeatures) { Map<String, Object> feature = new HashMap<>();