Package com.esri.gpt.catalog.discovery

Examples of com.esri.gpt.catalog.discovery.PropertyValueType.evaluate()


    if (value instanceof Timestamp) {
      tsValue = (Timestamp)value;
    } else if (value instanceof String) {
      try {
        PropertyValueType valueType = PropertyValueType.TIMESTAMP;
        tsValue = (Timestamp)valueType.evaluate((String)value);
      } catch (IllegalArgumentException e) {}     
    }
    if (tsValue != null) {
      boolean bIndex = !this.getIndexingOption().equals(Field.Index.NO);
      NumericField fld = new NumericField(this.getName(),this.getStorageOption(),bIndex);
View Full Code Here


    PropertyValueType valueType = PropertyValueType.TIMESTAMP;
    Long lLower = null;
    Long lUpper = null;
    if (literalLowerValue.length() > 0) {
      try {
        Timestamp ts = (Timestamp)valueType.evaluate(literalLowerValue,true,false);
        if (ts != null) lLower = ts.getTime();
      } catch (NumberFormatException e) {
        throw new DiscoveryException("Invalid Timestamp: "+literalLowerValue);
      }
    }
View Full Code Here

        throw new DiscoveryException("Invalid Timestamp: "+literalLowerValue);
      }
    }
    if (literalUpperValue.length() > 0) {
      try {
        Timestamp ts = (Timestamp)valueType.evaluate(literalUpperValue,false,true);
        if (ts != null) lUpper = ts.getTime();
      } catch (NumberFormatException e) {
        throw new DiscoveryException("Invalid Timestamp: "+literalUpperValue);
      }
    }
View Full Code Here

                                    boolean isLowerBoundary,
                                    boolean isUpperBoundary)
    throws DiscoveryException {
    try {
      PropertyValueType valueType = PropertyValueType.TIMESTAMP;
      Timestamp tsValue = (Timestamp)valueType.evaluate(
          value,isLowerBoundary,isUpperBoundary);
      if (tsValue == null) return null;
     
      if (isLowerBoundary) {
        LOGGER.finer("Lower boundary timestamp to query: "+tsValue);
View Full Code Here

    if (value instanceof Double) {
      dValue = (Double)value;
    } else if (value instanceof String) {
      try {
        PropertyValueType valueType = PropertyValueType.DOUBLE;
        dValue = (Double)valueType.evaluate((String)value);
      } catch (IllegalArgumentException e) {}     
    }
    if (dValue != null) {
      boolean bIndex = !this.getIndexingOption().equals(Field.Index.NO);
      NumericField fld = new NumericField(this.getName(),this.getStorageOption(),bIndex);
View Full Code Here

    PropertyValueType valueType = PropertyValueType.DOUBLE;
    Double dLower = null;
    Double dUpper = null;
    if (literalLowerValue.length() > 0) {
      try {
        dLower = (Double)valueType.evaluate(literalLowerValue);
      } catch (NumberFormatException e) {
        throw new DiscoveryException("Invalid Double: "+literalLowerValue);
      }
    }
    if (literalUpperValue.length() > 0) {
View Full Code Here

        throw new DiscoveryException("Invalid Double: "+literalLowerValue);
      }
    }
    if (literalUpperValue.length() > 0) {
      try {
        dUpper = (Double)valueType.evaluate(literalUpperValue);
      } catch (NumberFormatException e) {
        throw new DiscoveryException("Invalid Double: "+literalUpperValue);
      }
    }
    if ((dLower == null) && (dUpper == null)) {
View Full Code Here

                                    boolean isLowerBoundary,
                                    boolean isUpperBoundary)
    throws DiscoveryException {
    try {
      PropertyValueType valueType = PropertyValueType.DOUBLE;
      Double dValue = (Double)valueType.evaluate(value);
      return NumericUtils.doubleToPrefixCoded(dValue);
    } catch (NumberFormatException e) {
      throw new DiscoveryException("Invalid Double: "+value);
    }
  }
View Full Code Here

    if (value instanceof Long) {
      lValue = (Long)value;
    } else if (value instanceof String) {
      try {
        PropertyValueType valueType = PropertyValueType.LONG;
        lValue = (Long)valueType.evaluate((String)value);
      } catch (IllegalArgumentException e) {}     
    }
    if (lValue != null) {
      boolean bIndex = !this.getIndexingOption().equals(Field.Index.NO);
      NumericField fld = new NumericField(this.getName(),this.getStorageOption(),bIndex);
View Full Code Here

    PropertyValueType valueType = PropertyValueType.LONG;
    Long lLower = null;
    Long lUpper = null;
    if (literalLowerValue.length() > 0) {
      try {
        lLower = (Long)valueType.evaluate(literalLowerValue);
      } catch (NumberFormatException e) {
        throw new DiscoveryException("Invalid Long: "+literalLowerValue);
      }
    }
    if (literalUpperValue.length() > 0) {
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.