public List getAssociatedInstanceReferences(Object srcReference, String classPath, String resultInstancesClassFilter, String assocClass, String role, String resultRole) throws SPLException {
logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "getAssociatedInstanceReferences");
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" String className, String classPath, String resultInstancesClassFilter, String assocClass, String role, String resultRole,Map keys");
CIMObjectPath srcRef=(CIMObjectPath)srcReference;
String className=srcRef.getObjectName();
if(logger.isLoggable(Level.FINE))
logger.fine(className+" "+classPath+" "+resultInstancesClassFilter+" "+ assocClass+" "+role+" "+ resultRole+" "+ srcReference.toString());
if(className!=null && classPath!=null)
{
try{
List instanceREFList=new ArrayList();
//check to see if the association exists
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" check to see if the association exists");
if(associationExists(className ,classPath,resultInstancesClassFilter,assocClass,role,resultRole)){
//System.out.println("association exists");
//create cop of anchor object
CIMObjectPath cop=new CIMObjectPath(className,classPath);
cop.setKeys(srcRef.getKeys());
//add keys of the source instance to the cop
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" Anchor Object cop "+cop);
CIMObjectPath copAssociationClass=new CIMObjectPath(assocClass,classPath);
//enumerating all instances of associaation class
Enumeration instancesOfAssociation=_handle.enumerateInstances(copAssociationClass, true, true, true, true, null);
//iterating over all instances of association class
while(instancesOfAssociation.hasMoreElements()){
CIMInstance inst=(CIMInstance)instancesOfAssociation.nextElement();
//check to see if the source instance is same as current Anchor Object
CIMProperty srcinstcop=inst.getProperty(role);//this will return partial cop of src instance
CIMObjectPath copSrcInstFull=CIMObjectPath.toCop(srcinstcop.getValue().getValue().toString());
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" Anchor cop "+cop);
if(equalCOP(copSrcInstFull,cop)){
//get and add associated result instance to vector
CIMProperty cimprop=inst.getProperty(resultRole);
CIMObjectPath coop= CIMObjectPath.toCop(cimprop.getValue().getValue().toString());
CIMObjectPath copAssociatedInstance=new CIMObjectPath(resultInstancesClassFilter,classPath);
copAssociatedInstance.setKeys(coop.getKeys());
//Reference ref=new Reference(copAssociatedInstance.toString());
instanceREFList.add(copAssociatedInstance);
}
else{