public static Symbol allocSymbol(String namespace, String shortName) { return Symbol.create(namespace+shortName) ; }
private static Symbol allocSymbol(String namespace, String shortName) { return Symbol.create(namespace+shortName) ; }
public static Symbol allocSymbol(String base, String shortName) { return Symbol.create(base + shortName) ; } }
private static Symbol createSymbol(String localName) { return Symbol.create(SYMBOLS_NS + localName); } /**
public RDFFormatVariant(String name) { symbol = Symbol.create(name) ; }
@Override public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException { context.set(Symbol.create(attribute.getName()), attribute.getValue()) ; }
public static Symbol allocSymbol(String shortName) { if ( shortName.startsWith(ARQ.arqParamNS) ) throw new ARQInternalErrorException("Symbol short name begins with the ARQ namespace name: "+shortName) ; return Symbol.create(ARQ.arqParamNS+shortName) ; }
@Override public Object setProperty(String propName, Object propValue) { Symbol sym = Symbol.create(basename + propName) ; Object oldObj = context.get(sym) ; return oldObj ; }
public static Symbol allocSymbol(String shortName) { if ( shortName.matches("^[a-zA-Z]*:") ) throw new SDBException("Symbol short name begins URI scheme") ; return Symbol.create(SDB.symbolSpace+shortName) ; } }
private Object getAsString(String name) { return context.getAsString(Symbol.create(name)) ; }
@Override public Object setProperty(String propName, Object propValue) { Symbol sym = Symbol.create(basename + "#" + propName); Object oldObj = context.get(sym); context.set(sym, propValue); properties.put(propName, propValue) ; // These are added to any Jena RDFWriter (old-style, e.g. RDF/XML) in AdapterRDFWriter return oldObj; }
public static Context processProperties(Properties properties) { Context context = new Context() ; Set<Object> keys = properties.keySet() ; for ( Object key : keys ) { if ( key instanceof String ) { String keyStr = (String)key ; if ( keyStr.startsWith(prefix) ) keyStr = SystemTDB.symbolNamespace+keyStr.substring(prefix.length()) ; if ( ! keyStr.startsWith(SystemTDB.symbolNamespace) ) continue ; Object value = properties.get(key) ; Symbol symbol = Symbol.create(keyStr) ; context.set(symbol, value) ; } } return context ; } }
public static Context processProperties(Properties properties) { Context context = new Context() ; Set<Object> keys = properties.keySet() ; for ( Object key : keys ) { if ( key instanceof String ) { String keyStr = (String)key ; if ( keyStr.startsWith(prefix) ) keyStr = SystemTDB.symbolNamespace+keyStr.substring(prefix.length()) ; if ( ! keyStr.startsWith(SystemTDB.symbolNamespace) ) continue ; Object value = properties.get(key) ; Symbol symbol = Symbol.create(keyStr) ; context.set(symbol, value) ; } } return 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); }
@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); }
public static Syntax make(String uri) { if ( uri == null ) return null ; Symbol sym = Symbol.create(uri) ; if ( sym.equals(syntaxARQ) ) return syntaxARQ ; if ( sym.equals(syntaxSPARQL) ) return syntaxSPARQL ; if ( sym.equals(syntaxSPARQL_10) ) return syntaxSPARQL_10 ; if ( sym.equals(syntaxSPARQL_11) ) return syntaxSPARQL_11 ; if ( sym.equals(syntaxAlgebra) ) return syntaxAlgebra ; return null ; }
public Object open(Assembler a, Resource root, Mode mode) { Resource r = getResourceValue(root, pSetting ) ; String k = getAsStringValue(r, pName) ; String v = getAsStringValue(r, pValue) ; Symbol symbol = Symbol.create(k) ; ARQ.getContext().set(symbol, v) ; return r ; } }
String value = soln.getLiteral("value").getLexicalForm() ; // Works for numbers as well! name = MappingRegistry.mapPrefixName(name) ; Symbol symbol = Symbol.create(name) ; if ( "undef".equalsIgnoreCase(value) ) context.remove(symbol) ;