public final class Contexts extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.openrdf.model.IRI |
ALL
Special URI representing all contexts in Stardog, including the default (no) context graph.
|
static org.openrdf.model.IRI |
DEFAULT
Special URI representing the default (no) context in Stardog.
|
static org.openrdf.model.IRI |
NAMED
Special URI representing all named graphs in stardog, excluding the default graph.
|
| Modifier and Type | Method and Description |
|---|---|
static org.openrdf.model.Resource |
defaultToNull(org.openrdf.model.Resource theResource)
Takes a Resource identifying a named graph, and if it is the constant for the
DEFAULT graph,
it will return null, otherwise it returns the parameter as-is. |
static boolean |
isAll(org.openrdf.model.Resource theContext)
Return whether or not the resource represents the meta-context
ALL |
static <T extends org.openrdf.model.Value> |
isDefaultGraph() |
static boolean |
isDefaultGraph(org.openrdf.model.Resource theContext)
Return whether or not the resource represents the meta-context
DEFAULT |
static boolean |
isDefaultGraphOrWildcard(org.openrdf.model.Resource theContext) |
static boolean |
isNamed(org.openrdf.model.Resource theContext)
Return whether or not the resource represents the meta-context
NAMED |
static boolean |
isSingleton(Set<org.openrdf.model.Resource> theContexts)
Returns true if the set of contexts is a singleton
|
static boolean |
isWildcard(org.openrdf.model.Resource theContext)
|
static org.openrdf.model.Resource |
nullToDefault(org.openrdf.model.Resource theResource)
Takes a Resource identifying a named graph, and if it is null, returns the constant for the
DEFAULT
graph. |
public static final org.openrdf.model.IRI DEFAULT
public static final org.openrdf.model.IRI ALL
public static final org.openrdf.model.IRI NAMED
public static boolean isDefaultGraph(org.openrdf.model.Resource theContext)
DEFAULTtheContext - the contextDEFAULT, false otherwisepublic static boolean isAll(org.openrdf.model.Resource theContext)
ALLtheContext - the contextALL, false otherwisepublic static boolean isNamed(org.openrdf.model.Resource theContext)
NAMEDtheContext - the contextNAMED, false otherwisepublic static org.openrdf.model.Resource nullToDefault(org.openrdf.model.Resource theResource)
DEFAULT
graph. Otherwise, returns the parameter as-is.theResource - the named graphDEFAULT if the parameter is null.public static org.openrdf.model.Resource defaultToNull(org.openrdf.model.Resource theResource)
DEFAULT graph,
it will return null, otherwise it returns the parameter as-is.theResource - the named graphpublic static <T extends org.openrdf.model.Value> Predicate<T> isDefaultGraph()
public static boolean isWildcard(org.openrdf.model.Resource theContext)
theContext - public static boolean isDefaultGraphOrWildcard(org.openrdf.model.Resource theContext)
public static boolean isSingleton(Set<org.openrdf.model.Resource> theContexts)
theContexts - Copyright © 2010-2016 Stardog Union. All Rights Reserved.