[classad-users] Problem with ClassAd.match in Java-Implementation


Date: Mon, 9 Jan 2012 16:41:43 +0100
From: Holger Bähren <hbaehren@xxxxxxxxxxxxxx>
Subject: [classad-users] Problem with ClassAd.match in Java-Implementation
Hi there,

I am new to ClassAd and have some problems with the matching. I am
matching two ClassAds (both with requirements=true)), but I get null
as the result.
Same thing happens when I match two ClassAds that should match, I
still get null as a result.
Where am I going wrong? Here is my code. I am using ClassAd Version 2.4

public static void main(String[] args) {
String resource="[requirements=true]";
String job="[requirements=true; number=5]";
RecordExpr resourceAd;
RecordExpr jobAd;

ClassAdParser cap= new ClassAdParser();
cap.reset(resource);
resourceAd=(RecordExpr) cap.parse();
cap.reset(job);
jobAd=(RecordExpr) cap.parse();

int [] result=ClassAd.match(jobAd, resourceAd);

System.out.println(result);
}

Thanks a lot in advance.

Greetings,

Holger Bähren
[← Prev in Thread] Current Thread [Next in Thread→]
  • [classad-users] Problem with ClassAd.match in Java-Implementation, Holger Bähren <=