Package org.encog.app.analyst.script.prop

Examples of org.encog.app.analyst.script.prop.PropertyEntry


   * @param name The name of the property.
   * @param value The new value for the property.
   */
  private void validateProperty(final String section,
      final String subSection, final String name, final String value) {
    final PropertyEntry entry = PropertyConstraints.getInstance().getEntry(
        section, subSection, name);
    if (entry == null) {
      throw new AnalystError("Unknown property: "
          + PropertyEntry.dotForm(section, subSection, name));
    }
    entry.validate(section, subSection, name, value);
  }
View Full Code Here


  public final boolean executeCommand(final String args) {
    final int index = args.indexOf('=');
    final String dots = args.substring(0, index).trim();
    String value = args.substring(index + 1).trim();

    final PropertyEntry entry = PropertyConstraints.getInstance()
        .findEntry(dots);

    if (entry == null) {
      throw new AnalystError("Unknown property: " + args.toUpperCase());
    }

    // strip quotes
    if (value.charAt(0) == '\"') {
      value = value.substring(1);
    }
    if (value.endsWith("\"")) {
      value = value.substring(0, value.length() - 1);
    }

    final String[] cols = dots.split("\\.");
    final String section = cols[0];
    final String subSection = cols[1];
    final String name = cols[2];

    entry.validate(section, subSection, name, value);
    getProp().setProperty(entry.getKey(), value);

    return false;
  }
View Full Code Here

  public boolean executeCommand(final String args) {
    final int index = args.indexOf('=');
    final String dots = args.substring(0, index).trim();
    String value = args.substring(index + 1).trim();

    final PropertyEntry entry = PropertyConstraints.getInstance()
        .findEntry(dots);

    if (entry == null) {
      throw new AnalystError("Unknown property: " + args.toUpperCase());
    }

    // strip quotes
    if (value.charAt(0) == '\"') {
      value = value.substring(1);
    }
    if (value.endsWith("\"")) {
      value = value.substring(0, value.length() - 1);
    }

    final String[] cols = dots.split("\\.");
    final String section = cols[0];
    final String subSection = cols[1];
    final String name = cols[2];

    entry.validate(section, subSection, name, value);
    getProp().setProperty(entry.getKey(), value);

    return false;
  }
View Full Code Here

   * @param value
   *            The new value for the property.
   */
  private void validateProperty(final String section,
      final String subSection, final String name, final String value) {
    final PropertyEntry entry = PropertyConstraints.getInstance().getEntry(
        section, subSection, name);
    if (entry == null) {
      throw new AnalystError("Unknown property: "
          + PropertyEntry.dotForm(section, subSection, name));
    }
    entry.validate(section, subSection, name, value);
  }
View Full Code Here

TOP

Related Classes of org.encog.app.analyst.script.prop.PropertyEntry

Copyright © 2018 www.massapicom. 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.