Package dovetaildb.dbservice.DbResultLiterals

Examples of dovetaildb.dbservice.DbResultLiterals.DbResultAtom


          result = ((Map)result).get(deref);
        }
        if (result == null) return defaultScore;
      }
      if (result instanceof List || result instanceof Map) return defaultScore;
      return scoreLeafDbResult(new DbResultAtom(result));
    }
View Full Code Here


        Object valObj = pair.get(0);
        Object scoreObj = pair.get(1);
        if (scoreObj == null || !(scoreObj instanceof Number))
          throw new ApiException("InvalidScoringPoint", "Invalid score point: \""+pair+"\"; Y coordinate must be a number");
        values[i] = valObj;
        DbResultAtom atom = new DbResultAtom(values[i]);
        char type = atom.type;
        if (type == DbServiceUtil.TYPE_CHAR_MAP || type == DbServiceUtil.TYPE_CHAR_LIST)
          throw new ApiException("InvalidScoringPoint", "Invalid score point: \""+pair+"\"; X coordinate must be an atomic type");
        if (i > 0) {
          if (atom.compareTo(values[i-1]) < 0) {
            throw new ApiException("InvalidScoringPoint", "X coordinates must be in increasing order, but '"+values[i-1]+"' > '"+values[i]+"'");
          }
        }
        double score = ((Number)scoreObj).doubleValue();
        scores[i] = score;
View Full Code Here

TOP

Related Classes of dovetaildb.dbservice.DbResultLiterals.DbResultAtom

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.