Пример #1
0
 /** Get the name of a repository resource from the identity name space." */
 public static String getResourceName(Resource resource) {
   final List<Capability> idCaps = resource.getCapabilities(IdentityNamespace.IDENTITY_NAMESPACE);
   if (idCaps.size() != 1) {
     Activator.log.error(
         "Found " + idCaps.size() + " identity capabilites expected one: " + idCaps);
     return resource.toString();
   }
   final Capability idCap = idCaps.get(0);
   return idCap.getAttributes().get(IdentityNamespace.IDENTITY_NAMESPACE).toString();
 }
 public static void debug(ParseResult pr) {
   System.out.println("======= BEGIN PARSED REPOSITORY XML =======");
   for (Resource r : pr.resources) {
     System.out.println(r.toString());
   }
   System.out.println("======== END PARSED REPOSITORY XML ========");
   System.out.println("======== NAME: " + pr.name);
   System.out.println("======== INCREMENT: " + pr.increment);
   System.out.println("======== RESOURCES FOUND: " + pr.resources.size());
   System.out.flush();
 }