|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.franz.ag.AllegroGraph
Each instance of this class implements access to one AllegroGraph triple store.
There is no public constructor. Instances of this class are created by calls to methods in the AllegroGraphConnection class:
AllegroGraph is a triple store implementations that allows triples to be identified by an additional component that may be a literal or a URI. This component is sometimes called a context and sometimes a graph specifier. If this component is not specifed, triples are added to the null context, or the default graph. The terms null context and default graph are used interchangeably in the method descriptions.
In search operations, if the context is not specifed, then the search examines only the null context. If the context is specifed, then a null value is wild and matches any context, the empty string denotes the null context, any other value must be a valid Value reference.
The components of triples may be specfied as strings in ntriple notation, Value instances, and UPI instances. In some cases null and the empty string may be used to denote wild card or the null context.
| Constructor Summary | |
protected |
AllegroGraph(AllegroGraphConnection sv,
java.lang.String access,
java.lang.String name,
java.lang.String directory)
|
| Method Summary | |
void |
addDataMapping(java.lang.String[] map)
Add to the table of datatype and property mappings in the triple store. |
void |
addIndexFlavors(java.lang.String[] flavors)
Add some indexing options to the triple store. |
Literal |
addLiteral(boolean value)
Create a typed Literal instance from a Java boolean value and add the Literal to the triple store registry. |
Literal |
addLiteral(byte value)
Create a typed Literal instance from a Java byte value and add the Literal to the triple store registry. |
Literal |
addLiteral(double value)
Create a typed Literal instance from a Java double value and add the Literal to the triple store registry. |
Literal |
addLiteral(float value)
Create a typed Literal instance from a Java float value and add the Literal to the triple store registry. |
Literal |
addLiteral(int value)
Create a typed Literal instance from a Java int value and add the Literal to the triple store registry. |
Literal |
addLiteral(long value)
Create a typed Literal instance from a Java long value and add the Literal to the triple store registry. |
Literal |
addLiteral(short value)
Create a typed Literal instance from a Java short value and add the Literal to the triple store registry. |
Literal |
addLiteral(java.lang.String value)
Create a literal instance and add the Literal to the triple store registry. |
Literal |
addLiteral(java.lang.String value,
java.lang.String language)
Create a literal instance with a language tag and add the Literal to the triple store registry. |
Literal |
addLiteral(java.lang.String value,
URI datatype)
Create a literal instance with a datatype tag and add the Literal to the triple store registry. |
UPI[] |
addLiteralIds(java.lang.String[] values,
java.lang.String[] datatypes,
java.lang.String[] languages)
Add a set of literal instances to the triple store registry. |
Literal[] |
addLiterals(java.lang.String[] values,
java.lang.String[] datatypes,
java.lang.String[] languages)
Create a set of Literal instances and add the literals to the triple store registry. |
ValueNode |
addPart(java.lang.String part)
Add a Literal, Node or BlankNode to the triple store. |
void |
addStatement(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Add a Statement in the null context to the triple store. |
void |
addStatement(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object context)
Add a Statement to the triple store. |
void |
addStatements(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Add several null context Statements to the triple store. |
void |
addStatements(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object contexts)
Add several Statements to the triple store. |
Literal |
addTypedLiteral(java.lang.String text,
java.lang.String type)
Create a typed Literal instance from a string and add the Literal to the triple store registry. |
Literal |
addTypedLiteral(java.lang.String text,
UPI type)
Create a typed Literal instance from a string and add the literal to the triple store registry. |
Literal |
addTypedLiteral(java.lang.String text,
URI type)
Create a typed Literal instance from a string and add the literal to the triple store registry. |
Node |
addURI(java.lang.String uri)
Create a resource node with a URI label and add the resource to the triple store registry. |
UPI[] |
addURIIds(java.lang.String[] uri)
Create a set of resource nodes in the triple store registry. |
URI[] |
addURIs(java.lang.String[] uri)
Create a set of resource Node instances and add the resources to the triple store registry. |
void |
clear()
Delete all the statements in the triple store (one-by-one). |
void |
closeDatabase()
Deprecated. Use closeTripleStore() instead. |
void |
closeTripleStore()
Close an AllegroGraph triple store. |
BNode |
createBNode()
Create a BlankNode instance. |
BNode |
createBNode(java.lang.String nodeId)
Create a BlankNode instance. |
UPI[] |
createBNodeIds(int n)
Allocate a set of BlankNode ID numbers. |
BlankNode[] |
createBNodes(int n)
Allocate a set of BlankNodes. |
EncodedLiteral |
createEncodedLiteral(double v,
java.lang.String encoding)
Create an AllegroGraph EncodedLiteral instance from a Java double value. |
EncodedLiteral |
createEncodedLiteral(long v,
java.lang.String encoding)
Create an AllegroGraph EncodedLiteral instance from a Java long value. |
EncodedLiteral |
createEncodedLiteral(java.lang.String v,
java.lang.String encoding)
Create an AllegroGraph EncodedLiteral instance from a Java string value. |
Literal |
createLiteral(boolean value)
Create a typed Literal instance from a Java boolean value but do not modify the triple store. |
Literal |
createLiteral(byte value)
Create a typed Literal instance from a Java byte value but do not modify the triple store. |
Literal |
createLiteral(double value)
Create a typed Literal instance from a Java double value but do not modify the triple store. |
Literal |
createLiteral(float value)
Create a typed Literal instance from a Java float value but do not modify the triple store. |
Literal |
createLiteral(int value)
Create a typed Literal instance from a Java int value but do not modify the triple store. |
Literal |
createLiteral(long value)
Create a typed Literal instance from a Java long value but do not modify the triple store. |
Literal |
createLiteral(short value)
Create a typed Literal instance from a Java short value but do not modify the triple store. |
Literal |
createLiteral(java.lang.String value)
Create a literal instance without updating the triple store. |
Literal |
createLiteral(java.lang.String value,
java.lang.String language)
Create a literal instance with a language tag but do not modify the triple store. |
Literal |
createLiteral(java.lang.String value,
URI datatype)
Create a literal instance with a datatype tag but do not modify the triple store. |
Statement |
createStatement(Resource subject,
URI predicate,
Value object)
Create a Null Context Statement instance but do not update the triple store. |
Statement |
createStatement(Resource subject,
URI predicate,
Value object,
Resource context)
Create a Statement instance but do not update the triple store. |
Literal |
createTypedLiteral(java.lang.String text,
java.lang.String type)
Create a typed Literal instance from a string but do not modify the triple store. |
Literal |
createTypedLiteral(java.lang.String text,
UPI type)
Create a typed Literal instance from a string but do not modify the triple store. |
URI |
createURI(java.lang.String uri)
Create a resource node with a URI label but do not modify the triple store. |
URI |
createURI(java.lang.String namespace,
java.lang.String localName)
Create a resource node with a URI label but do not modify the triple store. |
void |
dropIndexFlavors(java.lang.String[] flavors)
Delete some indexing options from the triple store. |
java.lang.Object[] |
evalInServer(java.lang.String expression)
Evaluate a Lisp expression in the AllegroGraph server. |
java.lang.Object[] |
evalInServer(java.lang.String expression,
java.lang.String environment)
Evaluate a Lisp expression in the AllegroGraph server. |
java.lang.String[] |
getDataMapping()
Query the current table of datatype and property mappings in the triple store. |
java.lang.String[] |
getFreetextPredicates()
Retrieve the URI labels of the registered freetext predicates. |
Cursor |
getFreetextStatements(java.lang.String pattern)
Find triples that match a text pattern. |
ValueObject[] |
getFreetextUniqueSubjects(java.lang.String pattern)
Collect the unique subjects from triples that match a text pattern. |
java.lang.String[] |
getIndexFlavors()
Query the range of indexing that is applied to this triple store. |
int |
getLookAhead()
Query the look-ahead value. |
java.lang.String[] |
getNamespaces()
Query the namespace definitions specific to this triple store. |
java.lang.String[] |
getParts(UPI id)
Retrieve the components of an AllegroGraph Value instance given the id number. |
void |
getParts(UPI[] ids,
java.lang.String[] types,
java.lang.String[] vals,
java.lang.String[] mods)
Like getParts(long) but operates on an array of UPI instances. |
int |
getSelectLimit()
Get the current value of the select limit parameter. |
Cursor |
getStatements(boolean includeInferred,
java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Retrieve null context statements from the triple store. |
Cursor |
getStatements(boolean includeInferred,
java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object context)
Retrieve statements from the triple store. |
Cursor |
getStatements(boolean includeInferred,
java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object obEnd,
java.lang.Object context,
java.lang.Object contextEnd)
Retrieve statements from the triple store and specify a range of values for the object and/or context components of the triples. |
Cursor |
getStatements(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Retrieve null context statements from the triple store. |
Cursor |
getStatements(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object context)
Retrieve statements from the triple store . |
Cursor |
getStatements(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object obEnd,
java.lang.Object context,
java.lang.Object contextEnd)
Retrieve statements from the triple store and specify a range of values for the object and/or context components of the triples. |
boolean |
getSyncEveryTime()
Query the synchronization mode for this AllegroGraph instance. |
UPI[] |
getTripleParts(long id)
Return an array of 4 UPI instances for subject, predicate, object, and context. |
int |
getUnindexedThreshold()
Query the threshold for automatic indexing of the triple store. |
int |
getUnindexedTripleCount()
Query the number of unindexed triples in the triple store. |
int |
getUnmergedCount()
Query the number of unmerged index chunks in the triple store. |
int |
getUnmergedThreshold()
Query the threshold for automatic re-indexing of the triple store. |
boolean |
hasStatement(boolean includeInferred,
java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Find out if null-context statements matching the arguments are in the triple store. |
boolean |
hasStatement(boolean includeInferred,
java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object context)
Find out if any statements matching the arguments are in the triple store. |
boolean |
hasStatement(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Find out if null-context statements matching the arguments are in the triple store. |
boolean |
hasStatement(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object context)
Find out if any statements matching the arguments are in the triple store. |
void |
indexAll()
Deprecated. Use indexAllTriples() instead |
void |
indexAllTriples()
Index all the triples in the triple store. |
void |
indexAllTriples(boolean wait)
Index all triples immediately or in the background. |
void |
indexNewTriples()
Index new triples. |
void |
indexNewTriples(boolean wait)
Index new triples immediately or in the background. |
void |
indexTriples()
Deprecated. Use indexNewTriples() instead |
long |
loadNTriples(java.lang.String name)
Load a file of triple declarations. |
long |
loadNTriples(java.lang.String[] names)
Load several files of triple declarations. |
long |
loadNTriples(java.lang.String[] names,
java.lang.Object context)
|
long |
loadNTriples(java.lang.String name,
java.lang.Object context)
|
long |
loadRDF(java.lang.String filePath)
Parse an XML file of RDF triple definitions and add the triples to the triple store. |
long |
loadRDF(java.lang.String filePath,
java.lang.Object context)
|
static void |
main(java.lang.String[] args)
|
int |
moreValues(java.lang.Object x)
Determine if more results are available for a selectValues(String) result. |
Triple |
newTriple(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Add a new triple to the triple store. |
Triple |
newTriple(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
|
long |
newTripleId(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
|
long |
newTripleId(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
|
long[] |
newTripleIds(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
|
long[] |
newTripleIds(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
|
Triple[] |
newTriples(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Add new triples to the triple store. |
Triple[] |
newTriples(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
|
ValueObject |
newValue(UPI id)
Convert a UPI instance into a ValueObject instance. |
long |
numberOfTriples()
Query the number of triples in the triple store. |
long |
parseNTriples(java.lang.String from)
Parse a string and add triples to the null context of triple store. |
long |
parseNTriples(java.lang.String from,
java.lang.Object context)
Parse a string and add triples to the specified context of the triple store. |
void |
registerFreetextPredicate(java.lang.Object predicate)
Register a predicate for freetext indexing. |
void |
registerNamespace(java.lang.String prefix,
java.lang.String full)
Register one namespace definition for this triple store. |
void |
registerNamespaces(java.lang.String[] defs)
Register several namespace definitions for this triple store. |
void |
removeStatement(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Remove one null-context statement from the triple store. |
void |
removeStatement(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
Remove one statement from the triple store. |
void |
removeStatements(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Remove all statement that match a pattern from the triple store. |
void |
removeStatements(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
Remove all statement that match a pattern from the triple store. |
Cursor |
select(java.lang.String query)
Deprecated. Use selectStatements(String) instead |
Cursor |
select(java.lang.String query,
java.lang.Object arg)
Deprecated. Use selectStatements(String,Object) instead |
Cursor |
select(java.lang.String query,
java.lang.Object arg,
java.lang.String svar)
Deprecated. Use selectStatements(String,Object,String) instead |
ValueObject[] |
selectMore(ValueObject[] sr)
Get more results from a previous selectSingleValues query. |
ValueObject[][] |
selectMore(ValueObject[][] sr)
Get more results from a previous selectValues query. |
ValueObject[] |
selectSingleValues(java.lang.String query,
java.lang.Object[] invals,
java.lang.String invars)
Evaluate a Prolog query that retrieves a single value in each success. |
Cursor |
selectStatements(java.lang.String query)
Search the AllegroGraph triple store with a Prolog query. |
Cursor |
selectStatements(java.lang.String query,
java.lang.Object arg)
Search the AllegroGraph triple store with a Prolog query. |
Cursor |
selectStatements(java.lang.String query,
java.lang.Object arg,
java.lang.String svars)
Search the AllegroGraph triple store with a Prolog query. |
ValueObject[][] |
selectValues(java.lang.String query)
Evaluate a Prolog query that retrieves triples, resources, or literals from the triple store. |
ValueObject[][] |
selectValues(java.lang.String query,
java.lang.Object[] invals,
java.lang.String invars)
Evaluate a Prolog query that retrieves triples, resources, or literals from the triple store. |
int |
serverTrace(boolean onoff)
Change the trace state in the AllegroGraph server. |
int |
serverTrace(java.lang.String outFile)
Start tracing calls from Java in the AllegroGraph server. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
|
void |
setDataMapping(java.lang.String[] map)
Replace the current table of datatype and property mappings in the triple store. |
void |
setIndexFlavors(java.lang.String[] flavors)
Replace the indexing options of the triple store. |
void |
setLookAhead(int n)
Set the look-ahead value for subsequent Statement search operations. |
void |
setSelectLimit(int v)
Set the value of the select limit parameter. |
void |
setSyncEveryTime(boolean s)
Set the synchronization mode for this AllegroGraph instance. |
void |
setUnindexedThreshold(int val)
Set the threshold for automatic indexing of the triple store. |
void |
setUnmergedThreshold(int val)
Set the threshold for automatic re-indexing of the triple store. |
void |
syncDatabase()
Deprecated. Use syncTripleStore() instead. |
void |
syncTripleStore()
Sync an AllegroGraph triple store. |
boolean |
twinqlAsk(boolean includeInferred,
java.lang.String query)
|
boolean |
twinqlAsk(java.lang.String query)
Send a SPARQL ASK query to AllegroGraph. |
long |
twinqlCount(boolean includeInferred,
java.lang.String query,
java.lang.String vars,
int limit,
int offset)
|
long |
twinqlCount(java.lang.String query,
java.lang.String vars,
int limit,
int offset)
Send a SPARQL SELECT query to AllegroGraph and return only the number of results. |
Cursor |
twinqlFind(boolean includeInferred,
java.lang.String query,
int limit,
int offset)
|
Cursor |
twinqlFind(java.lang.String query,
int limit,
int offset)
Send a SPARQL DESCRIBE or CONSTRUCT query to AllegroGraph. |
java.lang.String |
twinqlQuery(boolean includeInferred,
java.lang.String query,
java.lang.String format,
int limit,
int offset)
|
java.lang.String |
twinqlQuery(java.lang.String query,
java.lang.String format,
int limit,
int offset)
Send a SPARQL query to AllegroGraph and retrieve a serialized XML reply. |
ValueObject[][] |
twinqlSelect(boolean includeInferred,
java.lang.String query,
java.lang.String vars,
int limit,
int offset)
|
ValueObject[][] |
twinqlSelect(java.lang.String query,
java.lang.String vars,
int limit,
int offset)
Send a SPARQL SELECT query to AllegroGraph. |
java.lang.String[] |
valueNames(java.lang.Object x)
|
int |
valuesLength(ValueObject[][] x)
Return the number of result sets in the array returned by selectValues(String). |
static java.lang.String |
version()
Query the current AllegroGraph version. |
static java.lang.String[] |
versions()
Query the current AllegroGraph and component versions. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected AllegroGraph(AllegroGraphConnection sv,
java.lang.String access,
java.lang.String name,
java.lang.String directory)
throws AllegroGraphException
| Method Detail |
public static java.lang.String version()
public static java.lang.String[] versions()
public static void main(java.lang.String[] args)
public void setLookAhead(int n)
n - an integer look-ahead value - must be positive.
A zero value specifies that the defaultLookAhead value in the
Cursor class should be used.
The look-ahead value determines how many Statements will be pre-loaded into a Cursor instance when it is created or advanced. The pre-loaded Statements in the Cursor are retrieved immediately in Java without a round-trip to the AllegroGraph server.
Cursor.setLookAhead(int)public int getLookAhead()
setLookAhead(int)
public void setAttribute(java.lang.String name,
java.lang.Object value)
public void syncDatabase()
throws AllegroGraphException
syncTripleStore() instead.
AllegroGraphExceptionsyncTripleStore()
public void syncTripleStore()
throws AllegroGraphException
AllegroGraphException
public void closeDatabase()
throws AllegroGraphException
closeTripleStore() instead.
AllegroGraphExceptioncloseTripleStore()
public void closeTripleStore()
throws AllegroGraphException
AllegroGraphException
public long loadNTriples(java.lang.String name)
throws AllegroGraphException
name - -
a pathname string. The file must be in the ntriples format
expected by the AllegroGraph server.
If a file is very large, the operation may take a long time. During that time, the calling thread, and the interface to the AllegroGraph server are blocked. On Windows, it is possible to see progress messages in the server console window which is normally hidden. On Unix, the server progress messages may be seen if the server is running with a log file; in that case the log file will grow as progress messages are added.
AllegroGraphException
public long loadNTriples(java.lang.String name,
java.lang.Object context)
throws AllegroGraphException
AllegroGraphException
public long loadNTriples(java.lang.String[] names)
throws AllegroGraphException
names - -
an array of pathname string. The files must be in the ntriples
format expected by the AllegroGraph server.
See the note about progress messages in the description of
AllegroGraphExceptionloadNTriples(String)
public long loadNTriples(java.lang.String[] names,
java.lang.Object context)
throws AllegroGraphException
AllegroGraphException
public long parseNTriples(java.lang.String from)
throws AllegroGraphException
from - a string in ntriples format
AllegroGraphException
public long parseNTriples(java.lang.String from,
java.lang.Object context)
throws AllegroGraphException
from - a string in ntriples formatcontext - a string, UPI instance, Value instance or null.
AllegroGraphException
public long loadRDF(java.lang.String filePath)
throws AllegroGraphException
filePath - A string that points to the file. The file must be in the RDF
format expected by the AllegroGraph server.
See the note about progress messages in the description of loadNTriples.
AllegroGraphException
public long loadRDF(java.lang.String filePath,
java.lang.Object context)
throws AllegroGraphException
AllegroGraphException
public long numberOfTriples()
throws AllegroGraphException
AllegroGraphException
public void indexTriples()
throws AllegroGraphException
indexNewTriples() instead
AllegroGraphException - if an error occurs during indexing.
If the current indexing chunk size is too small, it can cause too many files to be opened during indexing; in that case the AllegroGraphException exception with the string "too-many-index-chunks-error: will create nnn files" is thrown; nnn is the number of chunks. At this point, the triple store has not been indexed, but the server is in a stable state. The Application can adjust the chunk size with AllegroGraphConnection.setChunkSize() and try the indexing call again.
If the current indexing chunk size is too large, the server may run out of memory during indexing; in that case, the thrown exception will depend on where and when the out-of-memory condition occurred. The triple store may be in a partially indexed state.
public void indexNewTriples()
throws AllegroGraphException
AllegroGraphException - if an error occurs during indexing.
If the current indexing chunk size is too small, it can cause too many files to be opened during indexing; in that case the AllegroGraphException exception with the string "too-many-index-chunks-error: will create nnn files" is thrown; nnn is the number of chunks. At this point, the triple store has not been indexed, but the server is in a stable state. The Application can adjust the chunk size with AllegroGraphConnection.setChunkSize() and try the indexing call again.
If the current indexing chunk size is too large, the server may run out of memory during indexing; in that case, the thrown exception will depend on where and when the out-of-memory condition occurred. The triple store may be in a partially indexed state.
public void indexNewTriples(boolean wait)
throws AllegroGraphException
wait - If true, then return only after indexing is completed.
If false, schedule an indexing task to run in the background
and return immediately.
AllegroGraphException
public void indexAll()
throws AllegroGraphException
indexAllTriples() instead
AllegroGraphException - if an error occurs during indexing.
See the discussion of chunk size at indexTriples().
public void indexAllTriples()
throws AllegroGraphException
AllegroGraphException - if an error occurs during indexing.
See the discussion of chunk size at indexNewTriples().
public void indexAllTriples(boolean wait)
throws AllegroGraphException
wait - If true, then return only after indexing is completed.
If false, schedule an indexing task to run in the background
and return immediately.
AllegroGraphExceptionpublic ValueObject newValue(UPI id)
id - A UPI instance that denotes a Resource or Literal object
java.lang.IllegalStateException - if the object could not be created.
public java.lang.String[] getParts(UPI id)
throws AllegroGraphException
id - A UPI instance.
AllegroGraphException
public UPI[] getTripleParts(long id)
throws AllegroGraphException
AllegroGraphException
public void getParts(UPI[] ids,
java.lang.String[] types,
java.lang.String[] vals,
java.lang.String[] mods)
throws AllegroGraphException
ids - an array of UPI instancestypes - a String array of the same length as ids.vals - a String array of the same length as ids.mods - a String array of the same length as ids.
The arrays types, vals, mods are modified to hold the string values corresponding to the id number in the ids array.
AllegroGraphExceptionpublic int getSelectLimit()
This number determines the number of values transmitted in one set of results from the AllegroGraph server to the Java client. If the number of expected results is very large, but the application is interested in only a few, then a small number may improve performance. If the number is very large, there may be a long delay as the large array of results is prepared and transmitted to the client. The total numer of actual values returned depends on the number of free variables in the query.
The built-in initial value is 1000.
public void setSelectLimit(int v)
v - A positive integer.getSelectLimit()public BNode createBNode()
createBNode in interface ValueFactoryBlankNode
java.lang.IllegalStateException - if the creation fails.
It does not make sense to create a BNode that is not registered in the triple store becuse two instances of apparently identical unregistered BNodes would map to distinct BNodes in the triple store.
public BNode createBNode(java.lang.String nodeId)
createBNode in interface ValueFactorynodeId - the bnode identifier
BlankNode
java.lang.IllegalStateException - if the creation fails.
See note on createBNode().
public BlankNode[] createBNodes(int n)
throws AllegroGraphException
n - the number of nodes to allocate.
AllegroGraphException - if there is a problem during creation.
See note on createBNode().
public EncodedLiteral createEncodedLiteral(long v,
java.lang.String encoding)
v - The Java long value.encoding - A string that specifies the AllegroGraph encoding desired.
The available encodings are described in the AllegroGraph Introduction document.
public EncodedLiteral createEncodedLiteral(double v,
java.lang.String encoding)
v - The Java double value.encoding - A string that specifies the AllegroGraph encoding desired.
The available encodings are described in the AllegroGraph Introduction document.
public EncodedLiteral createEncodedLiteral(java.lang.String v,
java.lang.String encoding)
v - The Java string value.encoding - A string that specifies the AllegroGraph encoding desired.
The available encodings are described in the AllegroGraph Introduction document.
public Literal createLiteral(java.lang.String value)
createLiteral in interface ValueFactoryvalue - The literal's value.
Literal
The literal instance will have a null UPI.
public Literal addLiteral(java.lang.String value)
java.lang.IllegalStateException - if the creation fails.
public Literal createLiteral(java.lang.String value,
java.lang.String language)
createLiteral in interface ValueFactoryvalue - The literal's value.language - The literal's language attribute, or null if the
literal doesn't have a language.
Literal
The literal instance will have a null UPI.
public Literal addLiteral(java.lang.String value,
java.lang.String language)
java.lang.IllegalStateException - if the creation fails.
public Literal createTypedLiteral(java.lang.String text,
java.lang.String type)
text - A string URI.type - A string URI that denotes the type.
public Literal addTypedLiteral(java.lang.String text,
java.lang.String type)
text - A string URI.type - A string URI that denotes the type.
java.lang.IllegalStateException - if the creation fails.
public Literal createTypedLiteral(java.lang.String text,
UPI type)
text - A string.type - A UPI instance that identifie a Node
public Literal addTypedLiteral(java.lang.String text,
UPI type)
text - A string.type - A UPI instance that identifies the datatype resource.
java.lang.IllegalStateException - if the creation fails.
public Literal addTypedLiteral(java.lang.String text,
URI type)
text - A string.type - A URI instance that identifies the datatype resource.
java.lang.IllegalStateException - if the creation fails.
public Literal createLiteral(java.lang.String value,
URI datatype)
createLiteral in interface ValueFactoryvalue - The literal's value.datatype - The literal's datatype, or null if the literal
doesn't have a datatype.
Literal
The literal instance will have a null UPI.
public Literal addLiteral(java.lang.String value,
URI datatype)
throws AllegroGraphException
java.lang.IllegalStateException - if the creation fails.
AllegroGraphException
public Literal[] addLiterals(java.lang.String[] values,
java.lang.String[] datatypes,
java.lang.String[] languages)
throws AllegroGraphException
values - An array of string literal values (of length n).datatypes - null, or an array of datatype URIs. If null, none of
the new Literal instances will have a datatype qualifier. If an array,
the first n elements will be used as datatype labels for the
corresponding Literal. A null element specifies a Literal without
a datatype label. If the length of the array is less than n, the
last element is repeated as often as necessary. If a non-null value
is specified in an array element, the corresponding element in the
languages array is ignored.languages - null, or an array of language labels. If null, none of
the new Literal instances will have a language qualifier. If an array,
the first n elements will be used as language labels for the
corresponding Literal. A null element specifies a Literal without
a language label. If the length of the array is less than n, the
last element is repeated as often as necessary.
AllegroGraphExceptionpublic URI createURI(java.lang.String uri)
createURI in interface ValueFactoryuri -
Node
public Node addURI(java.lang.String uri)
throws