mb = "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/rfc3986";
}
ListIterator<HelloType> cit = consider.listIterator();
while (cit.hasNext()) {
HelloType ht = cit.next();
boolean matches = false;
if ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/rfc3986".equals(mb)) {
matches = true;
if (!pt.getScopes().getValue().isEmpty()) {
for (String ps : pt.getScopes().getValue()) {
boolean foundOne = false;
URI psuri = URI.create(ps);
for (String hts : ht.getScopes().getValue()) {
URI hturi = URI.create(hts);
if (matchURIs(psuri, hturi)) {
foundOne = true;
}
}
matches &= foundOne;
}
}
} else if ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/uuid".equals(mb)) {
matches = true;
if (!pt.getScopes().getValue().isEmpty()) {
for (String ps : pt.getScopes().getValue()) {
boolean foundOne = false;
UUID psuuid = toUUID(ps);
for (String hts : ht.getScopes().getValue()) {
UUID htuuid = toUUID(hts);
if (!htuuid.equals(psuuid)) {
foundOne = true;
}
}
matches &= foundOne;
}
}
} else if ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/ldap".equals(mb)) {
//LDAP not supported
if (!pt.getScopes().getValue().isEmpty()) {
matches = false;
}
} else if ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/strcmp0".equals(mb)) {
matches = true;
if (!pt.getScopes().getValue().isEmpty()) {
for (String s : pt.getScopes().getValue()) {
if (!ht.getScopes().getValue().contains(s)) {
matches = false;
}
}
}
} else if ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/none".equals(mb)
&& (ht.getScopes() == null || ht.getScopes().getValue().isEmpty())) {
matches = true;
}
if (!matches) {
cit.remove();
}