Class ServiceOpts
java.lang.Object
org.apache.jena.sparql.service.enhancer.impl.ServiceOpts
Utilities to exploit url scheme pattern to represent key value pairs.
RFC3986 only
allows for a very limited set of characters:
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )For this reason '+' is used where usually '=' would be used. Separator is ':'. Examples:
SERVICE <cache:> {} Trailing colon is needed to discriminate from relative IRIs. Resulting map: {cache=null}
SERVICE <cache:bulk+20> {cache=null, bulk=20}
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServiceOpts(org.apache.jena.sparql.algebra.op.OpService opService, List<Map.Entry<String, String>> options) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancontainsKey(Object key) copy()static Stringstatic ServiceOptsgetEffectiveService(org.apache.jena.sparql.algebra.op.OpService opService) getFirstValue(Object key, String valueIfNull, String valueIfAbsent) Find a key's first value in the list of optionsorg.apache.jena.sparql.algebra.op.OpServicestatic booleanisKnownOption(String key) parseAsOptions(String iri) Split an iri by ':' and attempt to parse the splits as key=value pairs.parseAsOptions(org.apache.jena.graph.Node node) voidRemoves all occurrences of a keyorg.apache.jena.sparql.algebra.op.OpServiceEncode the options as a OpServicetoString()static StringConvert a list of options back into an escaped string
-
Field Details
-
SO_OPTIMIZE
- See Also:
-
SO_CACHE
- See Also:
-
SO_BULK
- See Also:
-
SO_LOOP
- See Also:
-
-
Constructor Details
-
ServiceOpts
-
-
Method Details
-
getTargetService
public org.apache.jena.sparql.algebra.op.OpService getTargetService() -
copy
-
add
-
removeKey
Removes all occurrences of a key -
getOptions
-
containsKey
-
getFirstValue
Find a key's first value in the list of options- Parameters:
key- The key to find in the optionsvalueIfNull- The value to return if the key is present with a null valuevalueIfAbsent- The value to return if the key is absent
-
toService
public org.apache.jena.sparql.algebra.op.OpService toService()Encode the options as a OpService -
toString
-
parseAsOptions
-
parseAsOptions
Split an iri by ':' and attempt to parse the splits as key=value pairs. -
escape
-
unparse
Convert a list of options back into an escaped string -
isKnownOption
-
getEffectiveService
public static ServiceOpts getEffectiveService(org.apache.jena.sparql.algebra.op.OpService opService)
-