private Location createLocation(
     BioEntity object,
     BioEntity subject,
     String strand,
     int start,
     int end,
     Class<?> locationClass) {
   Location loc = (Location) DynamicUtil.createObject(Collections.singleton(locationClass));
   loc.setLocatedOn(object);
   loc.setFeature(subject);
   loc.setStrand(strand);
   loc.setStart(new Integer(start));
   loc.setEnd(new Integer(end));
   loc.setStrand(strand);
   return loc;
 }