Examples of IteratorOptions


Examples of com.adobe.xmp.options.IteratorOptions

    public int size() {
        int size = 0;

        try {
            // Get an iterator for the XMP packet, starting at the top level schema nodes
            XMPIterator nsIter = xmpData.iterator( new IteratorOptions().setJustChildren( true )
                    .setOmitQualifiers( true ) );
            // iterate all top level namespaces
            while (nsIter.hasNext()) {
                nsIter.next();
                size++;
View Full Code Here

Examples of com.adobe.xmp.options.IteratorOptions

   */
  public XMPIteratorImpl(XMPMetaImpl xmp, String schemaNS, String propPath,
      IteratorOptions options) throws XMPException
  {
    // make sure that options is defined at least with defaults
    this.options = options != null ? options : new IteratorOptions();
   
    // the start node of the iteration depending on the schema and property filter
    XMPNode startNode = null;
    String initialPath = null;
    boolean baseSchema = schemaNS != null  &&  schemaNS.length() > 0;
View Full Code Here

Examples of com.adobe.xmp.options.IteratorOptions

    public int size() {
        int size = 0;

        try {
            // Get an iterator for the XMP packet, starting at the top level schema nodes
            XMPIterator nsIter = xmpData.iterator( new IteratorOptions().setJustChildren( true )
                    .setOmitQualifiers( true ) );
            // iterate all top level namespaces
            while (nsIter.hasNext()) {
                nsIter.next();
                size++;
View Full Code Here

Examples of com.itextpdf.xmp.options.IteratorOptions

   */
  public XMPIteratorImpl(XMPMetaImpl xmp, String schemaNS, String propPath,
      IteratorOptions options) throws XMPException
  {
    // make sure that options is defined at least with defaults
    this.options = options != null ? options : new IteratorOptions();
   
    // the start node of the iteration depending on the schema and property filter
    XMPNode startNode = null;
    String initialPath = null;
    boolean baseSchema = schemaNS != null  &&  schemaNS.length() > 0;
View Full Code Here

Examples of org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions

      msg.append(OptionDescriber.class.getSimpleName());
      msg.append("; use 'config -s' instead.");
      throw new ShellCommandException(ErrorCode.INITIALIZATION_FAILURE, msg.toString());
    }
   
    final IteratorOptions itopts = skvi.describeOptions();
    if (itopts.getName() == null) {
      throw new IllegalArgumentException(className + " described its default distinguishing name as null");
    }
    String shortClassName = className;
    if (className.contains(".")) {
      shortClassName = className.substring(className.lastIndexOf('.') + 1);
    }
    final Map<String,String> localOptions = new HashMap<String,String>();
    do {
      // clean up the overall options that caused things to fail
      for (String key : localOptions.keySet()) {
        options.remove(key);
      }
      localOptions.clear();
     
      reader.printString(itopts.getDescription());
      reader.printNewline();
     
      String prompt;
      if (itopts.getNamedOptions() != null) {
        for (Entry<String,String> e : itopts.getNamedOptions().entrySet()) {
          prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " parameter " + e.getKey() + ", " + e.getValue() + ": ";
          reader.flushConsole();
          input = reader.readLine(prompt);
          if (input == null) {
            reader.printNewline();
            throw new IOException("Input stream closed");
          }
          // Places all Parameters and Values into the LocalOptions, even if the value is "".
          // This allows us to check for "" values when setting the iterators and allows us to remove
          // the parameter and value from the table property.
          localOptions.put(e.getKey(), input);
        }
      }
     
      if (itopts.getUnnamedOptionDescriptions() != null) {
        for (String desc : itopts.getUnnamedOptionDescriptions()) {
          reader.printString(Shell.repeat("-", 10) + "> entering options: " + desc + "\n");
          input = "start";
          while (true) {
            prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " option (<name> <value>, hit enter to skip): ";
           
            reader.flushConsole();
            input = reader.readLine(prompt);
            if (input == null) {
              reader.printNewline();
              throw new IOException("Input stream closed");
            }
           
            if (input.length() == 0)
              break;
           
            String[] sa = input.split(" ", 2);
            localOptions.put(sa[0], sa[1]);
          }
        }
      }
     
      options.putAll(localOptions);
      if (!skvi.validateOptions(options))
        reader.printString("invalid options for " + clazz.getName() + "\n");
     
    } while (!skvi.validateOptions(options));
    return itopts.getName();
  }
View Full Code Here

Examples of org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions

      iterOptions = (OptionDescriber) skvi;
    }

    String iteratorName;
    if (null != iterOptions) {
      final IteratorOptions itopts = iterOptions.describeOptions();
      iteratorName = itopts.getName();
     
      if (iteratorName == null) {
        throw new IllegalArgumentException(className + " described its default distinguishing name as null");
      }
      String shortClassName = className;
      if (className.contains(".")) {
        shortClassName = className.substring(className.lastIndexOf('.') + 1);
      }
      final Map<String,String> localOptions = new HashMap<String,String>();
      do {
        // clean up the overall options that caused things to fail
        for (String key : localOptions.keySet()) {
          options.remove(key);
        }
        localOptions.clear();
 
        reader.println(itopts.getDescription());
 
        String prompt;
        if (itopts.getNamedOptions() != null) {
          for (Entry<String,String> e : itopts.getNamedOptions().entrySet()) {
            prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " parameter " + e.getKey() + ", " + e.getValue() + ": ";
            reader.flush();
            input = reader.readLine(prompt);
            if (input == null) {
              reader.println();
              throw new IOException("Input stream closed");
            }
            // Places all Parameters and Values into the LocalOptions, even if the value is "".
            // This allows us to check for "" values when setting the iterators and allows us to remove
            // the parameter and value from the table property.
            localOptions.put(e.getKey(), input);
          }
        }
 
        if (itopts.getUnnamedOptionDescriptions() != null) {
          for (String desc : itopts.getUnnamedOptionDescriptions()) {
            reader.println(Shell.repeat("-", 10) + "> entering options: " + desc);
            input = "start";
            prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " option (<name> <value>, hit enter to skip): ";
            while (true) {
              reader.flush();
View Full Code Here

Examples of org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions

        throw new IllegalArgumentException(e.getMessage());
      } catch (IllegalAccessException e) {
        throw new IllegalArgumentException(e.getMessage());
      }
     
      IteratorOptions itopts = skvi.describeOptions();
      if (itopts.name == null)
        throw new IllegalArgumentException(className + " described its default distinguishing name as null");
     
      Map<String,String> localOptions = new HashMap<String,String>();
      do {
View Full Code Here

Examples of org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions

    } catch (ClassCastException e) {
      throw new ShellCommandException(ErrorCode.INITIALIZATION_FAILURE, "Unable to load " + className + " as type " + OptionDescriber.class.getName()
          + "; configure with 'config' instead");
    }
   
    IteratorOptions itopts = skvi.describeOptions();
    if (itopts.getName() == null)
      throw new IllegalArgumentException(className + " described its default distinguishing name as null");
   
    String shortClassName = className;
    if (className.contains("."))
      shortClassName = className.substring(className.lastIndexOf('.') + 1);
   
    Map<String,String> localOptions = new HashMap<String,String>();
    do {
      // clean up the overall options that caused things to fail
      for (String key : localOptions.keySet())
        options.remove(key);
      localOptions.clear();
     
      reader.printString(itopts.getDescription());
      reader.printNewline();
     
      String prompt;
      if (itopts.getNamedOptions() != null) {
        for (Entry<String,String> e : itopts.getNamedOptions().entrySet()) {
          prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " parameter " + e.getKey() + ", " + e.getValue() + ": ";
         
          input = reader.readLine(prompt);
          if (input == null) {
            reader.printNewline();
            throw new IOException("Input stream closed");
          }
          // Places all Parameters and Values into the LocalOptions, even if the value is "".
          // This allows us to check for "" values when setting the iterators and allows us to remove
          // the parameter and value from the table property.
          localOptions.put(e.getKey(), input);
        }
      }
     
      if (itopts.getUnnamedOptionDescriptions() != null) {
        for (String desc : itopts.getUnnamedOptionDescriptions()) {
          reader.printString(Shell.repeat("-", 10) + "> entering options: " + desc + "\n");
          input = "start";
          while (true) {
            prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " option (<name> <value>, hit enter to skip): ";
           
            input = reader.readLine(prompt);
            if (input == null) {
              reader.printNewline();
              throw new IOException("Input stream closed");
            }
           
            if (input.length() == 0)
              break;
           
            String[] sa = input.split(" ", 2);
            localOptions.put(sa[0], sa[1]);
          }
        }
      }
     
      options.putAll(localOptions);
      if (!skvi.validateOptions(options))
        reader.printString("invalid options for " + clazz.getName() + "\n");
     
    } while (!skvi.validateOptions(options));
    return itopts.getName();
  }
View Full Code Here

Examples of org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions

      msg.append(OptionDescriber.class.getSimpleName());
      msg.append("; use 'config -s' instead.");
      throw new ShellCommandException(ErrorCode.INITIALIZATION_FAILURE, msg.toString());
    }
   
    final IteratorOptions itopts = skvi.describeOptions();
    if (itopts.getName() == null) {
      throw new IllegalArgumentException(className + " described its default distinguishing name as null");
    }
    String shortClassName = className;
    if (className.contains(".")) {
      shortClassName = className.substring(className.lastIndexOf('.') + 1);
    }
    final Map<String,String> localOptions = new HashMap<String,String>();
    do {
      // clean up the overall options that caused things to fail
      for (String key : localOptions.keySet()) {
        options.remove(key);
      }
      localOptions.clear();
     
      reader.printString(itopts.getDescription());
      reader.printNewline();
     
      String prompt;
      if (itopts.getNamedOptions() != null) {
        for (Entry<String,String> e : itopts.getNamedOptions().entrySet()) {
          prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " parameter " + e.getKey() + ", " + e.getValue() + ": ";
          reader.flushConsole();
          input = reader.readLine(prompt);
          if (input == null) {
            reader.printNewline();
            throw new IOException("Input stream closed");
          } else {
            input = new String(input);
          }
          // Places all Parameters and Values into the LocalOptions, even if the value is "".
          // This allows us to check for "" values when setting the iterators and allows us to remove
          // the parameter and value from the table property.
          localOptions.put(e.getKey(), input);
        }
      }
     
      if (itopts.getUnnamedOptionDescriptions() != null) {
        for (String desc : itopts.getUnnamedOptionDescriptions()) {
          reader.printString(Shell.repeat("-", 10) + "> entering options: " + desc + "\n");
          input = "start";
          while (true) {
            prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " option (<name> <value>, hit enter to skip): ";
           
            reader.flushConsole();
            input = reader.readLine(prompt);
            if (input == null) {
              reader.printNewline();
              throw new IOException("Input stream closed");
            } else {
              input = new String(input);
            }
           
            if (input.length() == 0)
              break;
           
            String[] sa = input.split(" ", 2);
            localOptions.put(sa[0], sa[1]);
          }
        }
      }
     
      options.putAll(localOptions);
      if (!skvi.validateOptions(options))
        reader.printString("invalid options for " + clazz.getName() + "\n");
     
    } while (!skvi.validateOptions(options));
    return itopts.getName();
  }
View Full Code Here

Examples of org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions

      iterOptions = (OptionDescriber) skvi;
    }

    String iteratorName;
    if (null != iterOptions) {
      final IteratorOptions itopts = iterOptions.describeOptions();
      iteratorName = itopts.getName();
     
      if (iteratorName == null) {
        throw new IllegalArgumentException(className + " described its default distinguishing name as null");
      }
      String shortClassName = className;
      if (className.contains(".")) {
        shortClassName = className.substring(className.lastIndexOf('.') + 1);
      }
      final Map<String,String> localOptions = new HashMap<String,String>();
      do {
        // clean up the overall options that caused things to fail
        for (String key : localOptions.keySet()) {
          options.remove(key);
        }
        localOptions.clear();
 
        reader.println(itopts.getDescription());
 
        String prompt;
        if (itopts.getNamedOptions() != null) {
          for (Entry<String,String> e : itopts.getNamedOptions().entrySet()) {
            prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " parameter " + e.getKey() + ", " + e.getValue() + ": ";
            reader.flush();
            input = reader.readLine(prompt);
            if (input == null) {
              reader.println();
              throw new IOException("Input stream closed");
            }
            // Places all Parameters and Values into the LocalOptions, even if the value is "".
            // This allows us to check for "" values when setting the iterators and allows us to remove
            // the parameter and value from the table property.
            localOptions.put(e.getKey(), input);
          }
        }
 
        if (itopts.getUnnamedOptionDescriptions() != null) {
          for (String desc : itopts.getUnnamedOptionDescriptions()) {
            reader.println(Shell.repeat("-", 10) + "> entering options: " + desc);
            input = "start";
            prompt = Shell.repeat("-", 10) + "> set " + shortClassName + " option (<name> <value>, hit enter to skip): ";
            while (true) {
              reader.flush();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.