public final class Contexts extends Object
Modifier and Type | Field and Description |
---|---|
static IRI |
ALL
Special URI representing all local and virtual graphs
|
static IRI |
DEFAULT
Special URI representing the default (no) context in Stardog.
|
static IRI |
LOCAL
Special URI representing all contexts in Stardog, including the default (no) context graph.
|
static IRI |
NAMED
Special URI representing all local named graphs in Stardog, excluding the default graph.
|
static IRI |
VIRTUAL
Special URI representing all virtual graphs
|
Modifier and Type | Method and Description |
---|---|
static Resource |
defaultToNull(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(Resource theContext)
Return whether or not the resource represents the meta-context
ALL |
static boolean |
isAllOrLocal(Collection<? extends Resource> theContexts)
|
static boolean |
isAllOrLocal(Resource theContext)
|
static <T extends Value> |
isDefaultGraph() |
static boolean |
isDefaultGraphOrWildcard(Resource theContext) |
static boolean |
isLocal(Resource theContext)
Return whether or not the resource represents the meta-context
LOCAL |
static boolean |
isNamed(Resource theContext)
Return whether or not the resource represents the meta-context
NAMED |
static boolean |
isSingleton(Set<Resource> theContexts)
Returns true if the set of contexts is a singleton
|
static boolean |
isVirtual(Resource theContext)
Return whether or not the resource represents the meta-context
VIRTUAL |
static boolean |
isWildcard(Resource theContext)
|
static Resource |
nullToDefault(Resource theResource)
Takes a Resource identifying a named graph, and if it is null, returns the constant for the
DEFAULT
graph. |
static long |
toID(IRI iri)
If the IRI represents a meta-graph, then return its ID.
|
public static final IRI DEFAULT
public static final IRI LOCAL
public static final IRI NAMED
public static final IRI VIRTUAL
public static final IRI ALL
public static boolean isAllOrLocal(Resource theContext)
public static boolean isAllOrLocal(Collection<? extends Resource> theContexts)
public static boolean isAll(Resource theContext)
ALL
public static boolean isLocal(Resource theContext)
LOCAL
public static boolean isNamed(Resource theContext)
NAMED
theContext
- the contextNAMED
, false otherwisepublic static boolean isVirtual(Resource theContext)
VIRTUAL
public static Resource nullToDefault(Resource theResource)
DEFAULT
graph. Otherwise, returns the parameter as-is.theResource
- the named graphDEFAULT
if the parameter is null.public static Resource defaultToNull(Resource theResource)
DEFAULT
graph,
it will return null, otherwise it returns the parameter as-is.theResource
- the named graphpublic static boolean isWildcard(Resource theContext)
public static boolean isDefaultGraphOrWildcard(Resource theContext)
public static boolean isSingleton(Set<Resource> theContexts)
theContexts
- public static long toID(IRI iri)
iri
- the IRICopyright © 2010-2016 Stardog Union. All Rights Reserved.