public abstract class Protocol extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Protocol.Action
Defines the action a particular transaction update is executing.
|
static class |
Protocol.TIMEOUT
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
static String |
ACCEPT_PARAM_NAME
Parameter name for the Accept parameter (may also be used as the name of the Accept HTTP header).
|
static String |
ACTION_PARAM_NAME
Parameter name for the action parameter used in transactions.
|
static String |
BASEURI_PARAM_NAME
Parameter name for the base-URI parameter.
|
static String |
BINDING_PREFIX
Parameter prefix for query-external variable bindings.
|
static String |
CACHE_TIMEOUT_PROPERTY
Configurable system property
rdf4j.server.txn.registry.timeout for specifying the transaction cache
timeout (in seconds). |
static String |
CONFIG
Relative location of the config resource.
|
static String |
CONTEXT_PARAM_NAME
Parameter name for the context parameter.
|
static String |
CONTEXTS
Relative location of the context list resource of a repository.
|
static String |
DEFAULT_GRAPH_PARAM_NAME
Parameter name for the default graph URI parameter.
|
static int |
DEFAULT_TIMEOUT
Default timeout setting for transaction cache entries (in seconds).
|
static String |
DISTINCT_PARAM_NAME
Parameter name for the distinct parameter.
|
static String |
FORM_MIME_TYPE
MIME type for www forms: application/x-www-form-urlencoded.
|
static String |
GRAPH_PARAM_NAME
Parameter name for the graph parameter.
|
static String |
INCLUDE_INFERRED_PARAM_NAME
Parameter name for the 'includeInferred' parameter.
|
static String |
INSERT_GRAPH_PARAM_NAME
Parameter name for the default insert graph URI parameter.
|
static String |
ISOLATION_LEVEL_PARAM_NAME
Parameter name for the isolation level used in transactions.
|
static String |
LIMIT_PARAM_NAME |
static String |
NAMED_GRAPH_PARAM_NAME
Parameter name for the named graph URI parameter.
|
static String |
NAMESPACES
Relative location of the namespaces list resource of a repository.
|
static String |
NULL_PARAM_VALUE
Parameter value for the NULL context.
|
static String |
OBJECT_PARAM_NAME
Parameter name for the 'object' parameter of statement query.
|
static String |
OFFSET_PARAM_NAME |
static String |
PREDICATE_PARAM_NAME
Parameter name for the 'predicate' parameter of a statement query.
|
static String |
PRESERVE_BNODE_ID_PARAM_NAME
Parameter for server instruction to preserve blank node ids when parsing request data.
|
static String |
PROTOCOL
Relative location of the protocol resource.
|
static String |
QUERY_LANGUAGE_PARAM_NAME
Parameter name for the query language parameter.
|
static String |
QUERY_PARAM_NAME
Parameter name for the query parameter.
|
static String |
REMOVE_GRAPH_PARAM_NAME
Parameter name for the default remove graph URI parameter.
|
static String |
REPOSITORIES
Relative location of the repository list resource.
|
static String |
SIZE
Relative location of the 'size' resource of a repository.
|
static String |
SPARQL_QUERY_MIME_TYPE
MIME type for SPARQL update: application/sparql-query.
|
static String |
SPARQL_UPDATE_MIME_TYPE
MIME type for SPARQL update: application/sparql-update.
|
static String |
STATEMENTS
Relative location of the statement list resource of a repository.
|
static String |
SUBJECT_PARAM_NAME
Parameter name for the 'subject' parameter of a statement query.
|
static String |
TIMEOUT_PARAM_NAME |
static String |
TRANSACTIONS
Relative location of the transaction resources of a repository.
|
static String |
TXN_MIME_TYPE
MIME type for transactions: application/x-rdftransaction.
|
static String |
UPDATE_PARAM_NAME
Parameter name for the update parameter.
|
static String |
USING_GRAPH_PARAM_NAME
Parameter name for the default graph URI parameter for update.
|
static String |
USING_NAMED_GRAPH_PARAM_NAME
Parameter name for the named graph URI parameter for update.
|
static String |
VERSION
Protocol version.
|
Constructor and Description |
---|
Protocol() |
Modifier and Type | Method and Description |
---|---|
static Resource |
decodeContext(String encodedValue,
ValueFactory valueFactory)
Decode a previously encoded context Resource.
|
static Resource[] |
decodeContexts(String[] encodedValues,
ValueFactory valueFactory)
Decode previously encoded contexts.
|
static Resource |
decodeResource(String encodedValue,
ValueFactory valueFactory)
Decode a previously encoded Resource.
|
static IRI |
decodeURI(String encodedValue,
ValueFactory valueFactory)
Decode a previously encoded URI.
|
static Value |
decodeValue(String encodedValue,
ValueFactory valueFactory)
Decode a previously encoded value.
|
static String |
encodeContext(Resource context)
Encodes a context resource for use in a URL.
|
static String[] |
encodeContexts(Resource... contexts)
Encode context resources for use in a URL.
|
static String |
encodeValue(Value value)
Encodes a value in a canonical serialized string format, for use in a URL query parameter.
|
static String |
getConfigLocation(String serverLocation)
Get the location of the server configuration resource on the specified server.
|
static String |
getContextsLocation(String repositoryLocation)
Get the location of the contexts lists resource for a specific repository.
|
static String |
getNamespacePrefixLocation(String repositoryLocation,
String prefix)
Get the location of the namespace with the specified prefix for a specific repository on the specified server.
|
static String |
getNamespacesLocation(String repositoryLocation)
Get the location of the namespaces lists resource for a specific repository on the specified server.
|
static String |
getProtocolLocation(String serverLocation)
Get the location of the protocol resource on the specified server.
|
static String |
getRepositoriesLocation(String serverLocation)
Get the location of the repository list resource on the specified server.
|
static String |
getRepositoryID(String repositoryLocation)
Extracts the repository ID from the repository location.
|
static String |
getRepositoryLocation(String serverLocation,
String repositoryID)
Get the location of a specific repository resource on the specified server.
|
static String |
getServerLocation(String repositoryLocation)
Extracts the server location from the repository location.
|
static String |
getSizeLocation(String repositoryLocation)
Get the location of the 'size' resource for a specific repository on the specified server.
|
static String |
getStatementsLocation(String repositoryLocation)
Get the location of the statements resource for a specific repository.
|
static String |
getTransactionsLocation(String repositoryLocation)
Get the location of the transaction resources for a specific repository.
|
public static final String CACHE_TIMEOUT_PROPERTY
rdf4j.server.txn.registry.timeout
for specifying the transaction cache
timeout (in seconds).public static final int DEFAULT_TIMEOUT
public static final String VERSION
public static final String SUBJECT_PARAM_NAME
public static final String PREDICATE_PARAM_NAME
public static final String OBJECT_PARAM_NAME
public static final String INCLUDE_INFERRED_PARAM_NAME
public static final String CONTEXT_PARAM_NAME
public static final String NULL_PARAM_VALUE
public static final String GRAPH_PARAM_NAME
public static final String UPDATE_PARAM_NAME
public static final String BASEURI_PARAM_NAME
public static final String QUERY_PARAM_NAME
public static final String LIMIT_PARAM_NAME
public static final String OFFSET_PARAM_NAME
public static final String QUERY_LANGUAGE_PARAM_NAME
public static final String TIMEOUT_PARAM_NAME
public static final String REMOVE_GRAPH_PARAM_NAME
public static final String INSERT_GRAPH_PARAM_NAME
public static final String USING_GRAPH_PARAM_NAME
public static final String USING_NAMED_GRAPH_PARAM_NAME
public static final String DEFAULT_GRAPH_PARAM_NAME
public static final String NAMED_GRAPH_PARAM_NAME
public static final String ACCEPT_PARAM_NAME
public static final String ISOLATION_LEVEL_PARAM_NAME
public static final String ACTION_PARAM_NAME
public static final String DISTINCT_PARAM_NAME
public static final String PROTOCOL
public static final String CONFIG
public static final String REPOSITORIES
public static final String STATEMENTS
public static final String TRANSACTIONS
public static final String CONTEXTS
public static final String NAMESPACES
public static final String BINDING_PREFIX
public static final String SIZE
public static final String TXN_MIME_TYPE
public static final String FORM_MIME_TYPE
public static final String SPARQL_QUERY_MIME_TYPE
public static final String SPARQL_UPDATE_MIME_TYPE
public static final String PRESERVE_BNODE_ID_PARAM_NAME
public static final String getProtocolLocation(String serverLocation)
serverLocation
- the base location of a server implementing this REST protocol.public static final String getConfigLocation(String serverLocation)
serverLocation
- the base location of a server implementing this REST protocol.public static final String getRepositoriesLocation(String serverLocation)
serverLocation
- the base location of a server implementing this REST protocol.public static final String getRepositoryLocation(String serverLocation, String repositoryID)
serverLocation
- the base location of a server implementing this REST protocol.repositoryID
- the ID of the repositorypublic static final String getStatementsLocation(String repositoryLocation)
repositoryLocation
- the location of a repository implementing this REST protocol.public static final String getTransactionsLocation(String repositoryLocation)
repositoryLocation
- the location of a repository implementing this REST protocol.public static final String getServerLocation(String repositoryLocation)
repositoryLocation
- the location of a repository implementing this REST protocol.public static final String getRepositoryID(String repositoryLocation)
repositoryLocation
- the location of a repository implementing this REST protocol.public static final String getContextsLocation(String repositoryLocation)
repositoryLocation
- the location of a repository implementing this REST protocol.public static final String getNamespacesLocation(String repositoryLocation)
repositoryLocation
- the base location of a server implementing this REST protocol.public static final String getNamespacePrefixLocation(String repositoryLocation, String prefix)
repositoryLocation
- the location of a repository implementing this REST protocol.prefix
- the namespace prefixpublic static final String getSizeLocation(String repositoryLocation)
repositoryLocation
- the location of a repository implementing this REST protocol.public static String encodeValue(Value value)
value
- The value to encode, possibly null.NULL_PARAM_VALUE
if the
supplied value was null.public static Value decodeValue(String encodedValue, ValueFactory valueFactory)
encodedValue
- the encoded valuevalueFactory
- the factory to use for constructing the ValueencodeValue(Value)
public static Resource decodeResource(String encodedValue, ValueFactory valueFactory)
encodedValue
- the encoded valuevalueFactory
- the factory to use for constructing the ResourceencodeValue(Value)
public static IRI decodeURI(String encodedValue, ValueFactory valueFactory)
encodedValue
- the encoded valuevalueFactory
- the factory to use for constructing the URIencodeValue(Value)
public static String encodeContext(Resource context)
context
- The context to encode, possibly null.NULL_PARAM_VALUE
if the
supplied value was null.public static Resource decodeContext(String encodedValue, ValueFactory valueFactory)
encodedValue
- the encoded valuevalueFactory
- the factory to use for constructing the ResourceNULL_PARAM_VALUE
public static String[] encodeContexts(Resource... contexts)
contexts
- the contexts to encode, must not be null.IllegalArgumentException
- If the contexts is null.public static Resource[] decodeContexts(String[] encodedValues, ValueFactory valueFactory)
encodedValues
- the encoded valuesvalueFactory
- the factory to use for constructing the ResourcesCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.