public boolean exists(String filename) { return exists(filename, null) ; }
public static ReorderTransformation chooseOptimizer(Location location) { if ( location == null ) return ReorderLib.identity() ; ReorderTransformation reorder = null ; if ( location.exists(Names.optStats) ) { try { reorder = ReorderLib.weighted(location.getPath(Names.optStats)) ; log.debug("Statistics-based BGP optimizer") ; } catch (SSEParseException ex) { log.warn("Error in stats file: " + ex.getMessage()) ; reorder = null ; } } if ( reorder == null && location.exists(Names.optFixed) ) { // Not as good but better than nothing. reorder = ReorderLib.fixed() ; log.debug("Fixed pattern BGP optimizer") ; } if ( location.exists(Names.optNone) ) { reorder = ReorderLib.identity() ; log.debug("Optimizer explicitly turned off") ; } if ( reorder == null ) reorder = SystemTDB.defaultReorderTransform ; if ( reorder == null && warnAboutOptimizer ) ARQ.getExecLogger().warn("No BGP optimizer") ; return reorder ; }