Пример #1
0
 public int invoke(CommandLine cl, CommandContext context, AnzoClient client)
     throws AnzoException {
   for (String arg : cl.getArgs()) {
     if (!context.isCURIE(arg) && !context.isURI(arg)) {
       throw new InvalidArgumentException("parameter is not a valid uri or prefixed URI: " + arg);
     }
     if (context.isURI(arg)) {
       CURIE curie = context.getCURIE(arg);
       if (curie == null) {
         try {
           System.out.println(context.getURI(arg));
         } catch (URISyntaxException e) {
           throw new InvalidArgumentException(e);
         }
       } else {
         System.out.println("[" + curie + "]");
       }
     } else {
       System.out.println("[" + context.getCURIE(arg) + "]");
     }
   }
   return 0;
 }