@Override public void processArgs(CmdArgModule cmdLine) { if ( cmdLine.getValues(setDecl) == null || cmdLine.getValues(setDecl).size() == 0 ) return; for ( String arg : cmdLine.getValues(setDecl) ) { String[] frags = arg.split("=", 2); if ( frags.length != 2 ) { throw new RuntimeException("Can't split '" + arg + "' -- looking for '=' to separate name and value"); } String symbolName = frags[0]; String value = frags[1]; // Make it a long name. symbolName = MappingRegistry.mapPrefixName(symbolName); Symbol symbol = Symbol.create(symbolName); context.set(symbol, value); } ARQ.getContext().putAll(context); }
@Override public void processArgs(CmdArgModule cmdLine) { if ( cmdLine.getValues(setDecl) == null || cmdLine.getValues(setDecl).size() == 0 ) return; for ( String arg : cmdLine.getValues(setDecl) ) { String[] frags = arg.split("=", 2); if ( frags.length != 2 ) { throw new RuntimeException("Can't split '" + arg + "' -- looking for '=' to separate name and value"); } String symbolName = frags[0]; String value = frags[1]; // Make it a long name. symbolName = MappingRegistry.mapPrefixName(symbolName); Symbol symbol = Symbol.create(symbolName); context.set(symbol, value); } ARQ.getContext().putAll(context); }
String name = soln.getLiteral("name").getLexicalForm() ; String value = soln.getLiteral("value").getLexicalForm() ; // Works for numbers as well! name = MappingRegistry.mapPrefixName(name) ; Symbol symbol = Symbol.create(name) ; if ( "undef".equalsIgnoreCase(value) )