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()); } }
private void scanInteractions(GroupMap groupMap, Set<PEStateChange> stateChanges, EntityReference pr, PhysicalEntity spe) { for (Interaction interaction : spe.getParticipantOf()) { if (interaction instanceof Conversion) { Simplify.entityHasAChange(pr, (Conversion) interaction, groupMap, stateChanges, extendedControls); } } for (PhysicalEntity generic : spe.getMemberPhysicalEntityOf()) { scanInteractions(groupMap, stateChanges, pr, generic); } for (Complex complex : spe.getComponentOf()) { scanInteractions(groupMap, stateChanges, pr, complex); } }
for (Complex complex : physicalEntityBP.getComponentOf()) { physicalEntity.getComponentOfComplex().add(complex.getRDFId().split("#")[1]);