/** * Get the value a string (uses .toString() if the value is not null) - * supply a default string value */ public String getAsString(Symbol property, String defaultValue) { String x = getAsString(property) ; if ( x == null ) return defaultValue ; return x ; }
/** * Test whether a named value (as a string) has a specific string form - can * ignore case */ public boolean hasValueAsString(Symbol property, String value, boolean ignoreCase) { String s = getAsString(property) ; if ( s == null && value == null ) return true ; if ( s == null || value == null ) return false ; if ( ignoreCase ) return s.equalsIgnoreCase(value) ; return s.equals(value) ; }
private EnvJavaScript(Context context) { this.scriptLib = context.getAsString(symJavaScriptFunctions); this.scriptLibFile = context.getAsString(symJavaScriptLibFile); // Put one in the pool. pool.put(build()); }
private Object getAsString(String name) { return context.getAsString(Symbol.create(name)) ; }
public void verbose(IndentedWriter out) { for ( Symbol symbol : context.keys() ) { String value = context.getAsString(symbol); out.println(symbol + " -> " + value); } } }
public void verbose(IndentedWriter out) { for ( Symbol symbol : context.keys() ) { String value = context.getAsString(symbol); out.println(symbol + " -> " + value); } } }
private static FileMode determineFileMode() { // Be careful that this is not called very, very early, before --set might be seen. // Hence delayed access above in fileMode(). String x = ARQ.getContext().getAsString(SystemTDB.symFileMode, "default") ; if ( x.equalsIgnoreCase("direct") ) { TDB2.logInfo.info("File mode: direct (forced)") ; return FileMode.direct ; } if ( x.equalsIgnoreCase("mapped") ) { TDB2.logInfo.info("File mode: mapped (forced)") ; return FileMode.mapped ; } if ( x.equalsIgnoreCase("default") ) { if ( is64bitSystem ) { TDB2.logInfo.debug("File mode: Mapped") ; return FileMode.mapped ; } TDB2.logInfo.debug("File mode: Direct") ; return FileMode.direct ; } throw new TDBException("Unrecognized file mode (not one of 'default', 'direct' or 'mapped': "+x) ; }
String x = ARQ.getContext().getAsString(SystemTDB.symFileMode, "default") ;
str = execCxt.getContext().getAsString(SDB.jdbcFetchSize) ;
@Test public void testCxt6() { Context cxt = new Context() ; cxt.setTrue(p1) ; assertTrue("Not true", cxt.isTrue(p1)) ; String x = cxt.getAsString(p1) ; assertEquals("Not string 'true'", "true", x) ; }