if(log.isDebugEnabled()) { log.debug("TESTING- got a local Asset to match: " + lasset); }
    public boolean matches(Asset asset) {      // If its an ABC LocalAsset, treat it separately      if (asset instanceof LocalAsset) {	LocalAsset lasset = (LocalAsset)asset;        if(log.isDebugEnabled()) {          log.debug("TESTING- got a local Asset to match: " + lasset);        }	RolesPG rolesPG = 	  ((lasset != null) ?  lasset.getRolesPG() : null);	if (rolesPG == null) {	  // no roles?	  return false;	}	// Our asset my have only one role	if (this.assetRoles instanceof String) {	  String myRole = (String)this.assetRoles;	  // NOTE Next line synchronizes on an internal Role lock	  if (rolesPG.inRoles(Role.getRole(myRole))) {	    // rolesPG has a Role that matches!	    return true;	  } else {	    // If the Asset does not have my needed role, it cant help	    return false;	  }	} else {	  // The asset has a collection of (Strings) roles	  Collection myRoles = (Collection)this.assetRoles;	  // see if asset has ALL of my roles	  for (Iterator myRolesIter = myRoles.iterator();	       myRolesIter.hasNext();	       ) {	    String myRoleI = (String)myRolesIter.next();	    // NOTE Next line synchronizes on an internal Role lock	    if (! rolesPG.inRoles(Role.getRole(myRoleI))) {	      // missing one of my roles	      return false;	    }	  } // finished checking all my roles	  return true;	} // finished case of collection of roles      } else if (asset instanceof Entity) {	// This is some sort of Organization asset	Entity entity = (Entity)asset;	// must avoid self org  	if (entity.isLocal()) {  	  // this Entity resides on the local Agent (there may be many)  	  // no sense allocating to it, since I'll then just  	  // deal with one of the local assets I've already been through  	  return false;  	}		// is this the right way to do this?	EntityPG rolesPG = entity.getEntityPG();	if (rolesPG == null)	  return false;		// Our asset my have only one role	if (this.assetRoles instanceof String) {	  String myRole = (String)this.assetRoles;	  // See if the asset contains a matching role	  // NOTE Next line synchronizes on an internal Role lock	  if (rolesPG.inRoles(Role.getRole(myRole))) {	    // rolesPG has a Role that matches!	    return true;	  } else {	    return false;	  }	} else {	  // The asset has a collection of (Strings) roles	  Collection myRoles = (Collection)this.assetRoles;	  // see if asset has ALL of my roles	  for (Iterator myRolesIter = myRoles.iterator();	       myRolesIter.hasNext();	       ) {	    String myRoleI = (String)myRolesIter.next();	  // NOTE Next line synchronizes on an internal Role lock	    if (! rolesPG.inRoles(Role.getRole(myRoleI))) {	      // missing one of my roles	      return false;	    }	  } // finished checking all my roles	  return true;	} // finished case of collection of roles      } else {	// what is this?	return false;      }    } // end of matches(Asset) method