|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAGInternals
com.franz.agbase.AllegroGraph
public class 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:
AllegroGraphConnection.open(String, String)
to open an existing triple store.
AllegroGraphConnection.create(String, String)
to create a new triple store when
one did not exist before.
AllegroGraphConnection.access(String, String)
to open or create a triple store.
AllegroGraphConnection.renew(String, String)
) to open a new triple store or
replace an existing one with a new empty triple store.
AllegroGraphConnection.replace(String, String)
to replace an existing triple store
with a new empty one.
AllegroGraphConnection.federate(String, AllegroGraph[], boolean)
to create a federated store composed of several
open triple stores.
setAttribute(StoreAttribute, Object)
,
and then accesses the store with AllegroGraphConnection.access(AllegroGraph)
or the other
single-argument forms of the above methods.
"<http://franz.com/example#label>"
"\"an explicit literal\""
"!franz:label"
ValueNode
interface.
ag.createLiteral("some label")
UPI
instance.
In search operations, if the context is not specified, then the search examines only the null context. If the context is specified, 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.
We provide a complete Sesame 2 Sail implementation in AllegroSail
and a Repository implementation in AGRepository
.
We provide a Jena adapter in class AllegroGraphModel
and friends.
Nested Class Summary | |
---|---|
static class |
AllegroGraph.StoreAttribute
Enumerate the attributes that can be set with setAttribute(com.franz.agbase.AllegroGraph.StoreAttribute, Object) . |
static class |
AllegroGraph.V3_3BaseSep28
The name of this class identifies the version of the AllegroGraph Java implementation. |
Constructor Summary | |
---|---|
AllegroGraph(java.lang.String name)
Create an unconnected AllegroGraph instance. |
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 index flavors to the triple store. |
LiteralNode |
addLiteral(boolean value)
Create a typed LiteralNode instance from a Java boolean value and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(byte value)
Create a typed LiteralNode instance from a Java byte value and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(double value)
Create a typed LiteralNode instance from a Java double value and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(float value)
Create a typed LiteralNode instance from a Java float value and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(int value)
Create a typed LiteralNode instance from a Java int value and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(long value)
Create a typed LiteralNode instance from a Java long value and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(short value)
Create a typed LiteralNode instance from a Java short value and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(java.lang.String value)
Create a literal instance and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(java.lang.String value,
java.lang.String language)
Create a literal instance with a language tag and add the LiteralNode to the triple store registry. |
LiteralNode |
addLiteral(java.lang.String value,
URINode datatype)
Create a literal instance with a datatype tag and add the LiteralNode 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. |
LiteralNode[] |
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. |
LiteralNode |
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. |
LiteralNode |
addTypedLiteral(java.lang.String text,
UPI type)
Create a typed Literal instance from a string and add the literal to the triple store registry. |
LiteralNode |
addTypedLiteral(java.lang.String text,
URINode type)
Create a typed Literal instance from a string and add the literal to the triple store registry. |
URINode |
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. |
URINode[] |
addURIs(java.lang.String[] uri)
Create a set of resource Node instances and add the resources to the triple store registry. |
long |
clear()
Delete all the statements in the triple store (one-by-one). |
boolean |
closeTripleStore()
Close an AllegroGraph instance. |
boolean |
closeTripleStore(boolean doClose)
Close an AllegroGraph instance and optionally close the triple store if this is the only reference. |
BlankNode |
createBNode()
Create a BlankNode instance. |
BlankNode |
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. |
LiteralNode |
createLiteral(boolean value)
Create a typed LiteralNode instance from a Java boolean value but do not modify the triple store. |
LiteralNode |
createLiteral(byte value)
Create a typed LiteralNode instance from a Java byte value but do not modify the triple store. |
LiteralNode |
createLiteral(double value)
Create a typed LiteralNode instance from a Java double value but do not modify the triple store. |
LiteralNode |
createLiteral(float value)
Create a typed LiteralNode instance from a Java float value but do not modify the triple store. |
LiteralNode |
createLiteral(int value)
Create a typed LiteralNode instance from a Java int value but do not modify the triple store. |
LiteralNode |
createLiteral(long value)
Create a typed LiteralNode instance from a Java long value but do not modify the triple store. |
LiteralNode |
createLiteral(short value)
Create a typed LiteralNode instance from a Java short value but do not modify the triple store. |
LiteralNode |
createLiteral(java.lang.String value)
Create a LiteralNode instance without updating the triple store. |
LiteralNode |
createLiteral(java.lang.String value,
java.lang.String language)
Create a LiteralNode instance with a language tag but do not modify the triple store. |
LiteralNode |
createLiteral(java.lang.String value,
URINode datatype)
Create a LiteralNode instance with a datatype tag but do not modify the triple store. |
Triple |
createStatement(ResourceNode subject,
URINode predicate,
ValueNode object)
Create a Null Context Statement instance but do not update the triple store. |
Triple |
createStatement(ResourceNode subject,
URINode predicate,
ValueNode object,
ResourceNode context)
Create a Triple instance but do not update the triple store. |
LiteralNode |
createTypedLiteral(java.lang.String text,
java.lang.String type)
Create a typed Literal instance from a string but do not modify the triple store. |
LiteralNode |
createTypedLiteral(java.lang.String text,
UPI type)
Create a typed Literal instance from a string but do not modify the triple store. |
URINode |
createURI(java.lang.String uri)
Create a resource node with a URI label but do not modify the triple store. |
URINode |
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 flavors from the triple store. |
java.lang.Object[] |
evalInServer(java.lang.String expression)
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. |
TriplesIterator |
getFreetextStatements(java.lang.String pattern)
Find triples that match a text pattern. |
ValueSetIterator |
getFreetextUniqueSubjects(java.lang.String pattern)
Collect the unique subjects from triples that match a text pattern. |
GeoExtension |
getGeoExtension()
Get the GeoExtension instance of this AllegroGraph instance. |
java.lang.String[] |
getIndexFlavors()
Query the range of indexing that is applied to this triple store. |
int |
getLookAhead()
Query the look-ahead value. |
NamespaceRegistry |
getNamespaceRegistry()
Query the namespace definitions specific to this triple store. |
java.lang.String[] |
getNamespaces()
Query the namespace definitions specific to this triple store. |
java.lang.String[] |
getParts(UPI id)
Retrieve the string and type information associated with a triple store part. |
void |
getParts(UPI[] ids,
java.lang.String[] types,
java.lang.String[] vals,
java.lang.String[] mods)
Like getParts(UPI) but operates on an array of UPI instances. |
int |
getSelectLimit()
Get the current value of the select limit parameter. |
SNAExtension |
getSNAExtension()
Get the SNAExtension instance of this AllegroGraph instance. |
long |
getSPOGICacheSize()
Query the size of the SPOGI cache on this triple store. |
TriplesIterator |
getStatements(boolean includeInferred,
java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Retrieve null context statements from the triple store. |
TriplesIterator |
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. |
TriplesIterator |
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. |
TriplesIterator |
getStatements(boolean includeInferred,
java.lang.Object subject,
java.lang.Object subEnd,
java.lang.Object predicate,
java.lang.Object predEnd,
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 any of the components of the triples. |
TriplesIterator |
getStatements(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object)
Retrieve null context statements from the triple store. |
TriplesIterator |
getStatements(java.lang.Object subject,
java.lang.Object predicate,
java.lang.Object object,
java.lang.Object context)
Retrieve statements from the triple store . |
TriplesIterator |
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. |
AllegroGraph[] |
getStores()
Retrieve the components of a federated triple store. |
boolean |
getSyncEveryTime()
Query the synchronization mode for this AllegroGraph instance. |
UPIImpl[] |
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. |
java.lang.String |
getUPIMapDirectory()
Query the directory where AllegroGraph will search for UPI maps for this 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 |
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. |
boolean |
isSPOGICacheEnabled()
Query the state of SPOGI caching in this triple store. |
long |
loadNTriples(java.lang.Object names,
java.lang.Object context,
java.lang.Boolean save,
java.lang.String ext,
java.lang.Object[] place)
Load one or more files of triple declarations. |
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)
Load several files of triple declarations. |
long |
loadNTriples(java.lang.String name,
java.lang.Object context)
Load a file of triple declarations. |
long |
loadNTriples(java.lang.String name,
java.lang.Object context,
java.lang.Boolean save,
java.lang.String ext,
java.lang.Object[] place,
boolean unzip)
Load one compressed file of triple declarations. |
long |
loadRDFXML(java.lang.Object filePath,
java.lang.Object context,
java.lang.String baseURI,
java.lang.Object useRapper,
java.lang.Boolean save)
Parse a file of triple definitions in RDF/XML notation and add the triples to the specified context of the triple store. |
long |
loadRDFXML(java.lang.String filePath)
Parse a file of triple definitions in RDF/XML notation and add the triples to the null context of the triple store. |
long |
loadRDFXML(java.lang.String[] filePaths)
Parse files of triple definitions in RDF/XML notation and add the triples to the null context of the triple store. |
long |
loadRDFXML(java.lang.String filePath,
java.lang.Object context)
Parse a file of triple definitions in RDF/XML notation and add the triples to the specified context of the triple store. |
long |
loadRDFXML(java.lang.String filePath,
java.lang.Object context,
java.lang.String baseURI)
Parse a file of triple definitions in RDF/XML notation and add the triples to the specified context of the triple store. |
static void |
main(java.lang.String[] args)
Print AllegroGraph version information. |
void |
mergeNewTriples(boolean wait)
|
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)
Add a new triple to the triple store. |
long |
newTripleId(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Add a new triple to the triple store. |
long |
newTripleId(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
Add a new triple to the triple store. |
long[] |
newTripleIds(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Add new triples to the triple store. |
long[] |
newTripleIds(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
Add new triples to the triple store. |
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)
Add new triples to the triple store. |
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. |
long |
parseNTriples(java.lang.String from,
java.lang.Object context,
boolean save,
java.lang.Object[] place)
Parse a string and add triples to the specified context of the triple store. |
long |
parseRDFXML(java.lang.String data,
java.lang.Object context,
java.lang.String baseURI)
Parse a string containing RDF/XML definitions of triples and add the triples to the specified context of the triple store. |
long |
parseRDFXML(java.lang.String data,
java.lang.Object context,
java.lang.String baseURI,
java.lang.Boolean save)
Parse a string containing RDF/XML definitions of triples and add the triples to the specified context of the triple store. |
void |
registerFreetextPredicate(java.lang.Object predicate)
Register a predicate for free text indexing. |
void |
registerNamespace(java.lang.String prefix,
java.lang.String full)
Register one namespace definition for this triple store. |
void |
registerNamespaces(NamespaceRegistry ns)
Register several namespace definitions for this triple store. |
void |
registerNamespaces(java.lang.String[] defs)
Register several namespace definitions for this triple store. |
long |
removeStatement(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Remove one null-context statement from the triple store. |
long |
removeStatement(java.lang.Object s,
java.lang.Object p,
java.lang.Object o,
java.lang.Object c)
Remove one statement from the triple store. |
long |
removeStatements(java.lang.Object s,
java.lang.Object p,
java.lang.Object o)
Remove all statement that match a pattern in the bull context of the triple store. |
long |
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. |
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(AllegroGraph.StoreAttribute name,
java.lang.Object value)
Set attributes that affect the creation of new triple stores or the accessing of existing ones. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Deprecated. Use setAttribute(com.franz.agbase.AllegroGraph.StoreAttribute, Object) |
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 set of indexing flavors in the triple store. |
void |
setLookAhead(int n)
Set the look-ahead value for subsequent Statement search operations. |
void |
setNamespaceRegistry()
Reset the namespace definition in this AllefroGraph instance to the initial default. |
void |
setNamespaceRegistry(NamespaceRegistry ns)
Register several namespace definitions for this triple store. |
void |
setSelectLimit(int v)
Set the value of the select limit parameter. |
void |
setSPOGICacheEnabled(boolean onoff)
Modify the state of SPOGI caching in this triple store. |
void |
setSPOGICacheSize(long size)
Modify the size of the SPOGI cache on this triple store. |
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 |
setUPIMapDirectory(java.lang.String dir)
Specify a directory where AllegroGraph will search for UPI maps for this triple-store. |
void |
syncTripleStore()
Sync an AllegroGraph triple store. |
java.lang.String |
toString()
Display some details about the AllegroGraph instance. |
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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AllegroGraph(java.lang.String name)
setAttribute(String, Object)
.
name
- the pathname string for the triple store.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
TriplesIterator class should be used.
The look-ahead value determines how many Statements will be
pre-loaded into a TriplesIterator instance when it is created or advanced.
The pre-loaded Statements in the TriplesIterator are retrieved
immediately in Java without a round-trip to the
AllegroGraph server.
See also TriplesIterator.setLookAhead(int)
.
public int getLookAhead()
setLookAhead(int)
.public void setAttribute(AllegroGraph.StoreAttribute name, java.lang.Object value)
name
- The name of the attribute.value
- The value of the attribute.public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute(com.franz.agbase.AllegroGraph.StoreAttribute, Object)
public void syncTripleStore() throws AllegroGraphException
AllegroGraphException
public boolean closeTripleStore() throws AllegroGraphException
AllegroGraphException
public boolean closeTripleStore(boolean doClose) throws AllegroGraphException
doClose
- when true, close the triple-store if this is the
only reference.
AllegroGraphException
public long loadNTriples(java.lang.String name) throws AllegroGraphException
name
- A string that specifies the source of the triple declarations.
This can be a file pathname or a file URI or a web URI.
The data must be in the Ntriples format
expected by the AllegroGraph server.
All file pathnames are relative to the pathname defaults in the server.
The file environment of the client application is irrelevant.
If a file is very large, the operation may take a long time. During that time, the calling thread, and the AllegroGraphConnection instance 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.
If other AllegroGraph instances of different stores are connected through different AllegroGraphConnection instances, they may continue to make queries or add triples.
AllegroGraphException
public long loadNTriples(java.lang.String name, java.lang.Object context) throws AllegroGraphException
name
- a string pointing to the source file.context
- a triple part reference for the graph component of the new triples.
If the context is specified
as "source", a URI is constructed from the source file path.
See the note about progress messages in the description of
loadNTriples(String)
.
AllegroGraphException
public long loadNTriples(java.lang.String[] names) throws AllegroGraphException
names
- an array of strings specifying several data sources.
See the notes about source specifiers and progress messages in the description of
loadNTriples(String)
.
AllegroGraphException
public long loadNTriples(java.lang.String[] names, java.lang.Object context) throws AllegroGraphException
names
- an array of strings specifying several data sources.context
- a triple part reference for the graph component of the new triples.
If the context is specified
as "source", a URI is constructed from the source file path.
See the notes about source specifiers and progress messages in the description of
loadNTriples(String)
.
AllegroGraphException
public long loadNTriples(java.lang.Object names, java.lang.Object context, java.lang.Boolean save, java.lang.String ext, java.lang.Object[] place) throws AllegroGraphException
names
- A string pointing to one file, or
an array of such strings. The files must be in the Ntriples
format expected by the AllegroGraph server.context
- A triple part reference for the graph component of the new triples.
If the context is specified
as "source", a URI is constructed from the source file path.save
- This argument controls how encoded literals are stored in the store.
When true, if a triple triggers an encoding of a literal, two triples are added
to the store, one with the encoded literal and one with the string literal.
When false, only the encoded triple is added.
When null, allow the default behavior (currently to add both).ext
- A string that names the external-format used to translate octets into
characters. The server default is determined by the locale of the server.
Valid values are
"1250" "1251" "1252" "1253" "1254" "1255" "1256" "1257" "1258" "874" "932" "936" "949" "950" "big5" "emacs-mule" "euc" "euc-jp" "fat" "fat-le" "gb2312" "gbk" "iso-2022-jp" "iso8859-1" "iso8859-14" "iso8859-15" "iso8859-2" "iso8859-3" "iso8859-4" "iso8859-5" "iso8859-6" "iso8859-7" "iso8859-8" "iso8859-9" "jis" "jvm-utf8" "koi8-r" "latin-14" "latin-15" "latin-2" "latin-3" "latin-4" "latin-5" "latin-6" "latin-7" "latin-8" "latin-9" "latin1" "latin14" "latin15" "latin2" "latin3" "latin4" "latin5" "latin6" "latin7" "latin8" "latin9" "shiftjis" "ujis" "unicode" "utf8"The numeric strings refer to Windows Code Page encodings.
place
- When non-null, must be an array of at least one Object. The array element
zero is updated with the UPI of the graph component of all the triples added
by the bulk load.
See the note about progress messages in the description of
loadNTriples(String)
.
AllegroGraphException
public long loadNTriples(java.lang.String name, java.lang.Object context, java.lang.Boolean save, java.lang.String ext, java.lang.Object[] place, boolean unzip) throws AllegroGraphException
name
- context
- save
- ext
- place
- unzip
- When true, the input file is expected to be in gzip compression normally
with a .gz extension.
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 or instance that identifies a triple part to be used
as the context marker for all the triples. If the context is specified
as "source", a URI is constructed from the source file path.
AllegroGraphException
public long parseNTriples(java.lang.String from, java.lang.Object context, boolean save, java.lang.Object[] place) throws AllegroGraphException
from
- from a string in Ntriples formatcontext
- a String or instance that identifies a triple part to be used
as the context marker for all the triples. If the context is specified
as "source", a URI is constructed from the source file path.save
- This argument controls how encoded literals are stored in the store.
When true, if a triple triggers an encoding of a literal, two triples are added
to the store, one with the encoded literal and one with the string literal.
When false, only the encoded triple is added.
When null, allow the default behavior (currently to add both).place
- null or an Object array of length at least one.
The array (if present) element zero is updated with the UPI of the actual
context marker used.
AllegroGraphException
public long loadRDFXML(java.lang.String filePath) throws AllegroGraphException
filePath
- A string that specifies the source of the triple declarations.
This can be a file pathname or a file URI or a web URI.
The data must be in the RDF/XML format
expected by the AllegroGraph server.
All file pathnames are relative to the pathname defaults in the server.
The file environment of the client application is irrelevant.
See the note about progress messages in the description
of loadNTriples(String)
.
AllegroGraphException
public long loadRDFXML(java.lang.String filePath, java.lang.Object context) throws AllegroGraphException
filePath
- A string that specifies the source of the triple declarations.
This can be a file pathname or a file URI or a web URI.
The data must be in the RDF/XML format
expected by the AllegroGraph server.
All file pathnames are relative to the pathname defaults in the server.
The file environment of the client application is irrelevant.context
- a String or instance that identifies a triple part to be used
as the context marker for all the triples. If the context is specified
as "source", a URI is constructed from the source file path.
See the note about progress messages in the description
of loadNTriples(String)
.
AllegroGraphException
public long loadRDFXML(java.lang.String filePath, java.lang.Object context, java.lang.String baseURI) throws AllegroGraphException
filePath
- A string that specifies the source of the triple declarations.
This can be a file pathname or a file URI or a web URI.
The data must be in the RDF/XML format
expected by the AllegroGraph server.
All file pathnames are relative to the pathname defaults in the server.
The file environment of the client application is irrelevant.context
- a String or instance that identifies a triple part to be used
as the context marker for all the triples. If the context is specified
as "source", a URI is constructed from the source file path.baseURI
- a string that specifies a base URI for the file.
See the note about progress messages in the description
of loadNTriples(String)
.
AllegroGraphException
public long loadRDFXML(java.lang.Object filePath, java.lang.Object context, java.lang.String baseURI, java.lang.Object useRapper, java.lang.Boolean save) throws AllegroGraphException
filePath
- A string or array of strings.
Each string can be a pathname in the server's file system, or a file or web URL
visible to the server.context
- a String or instance that identifies a triple part to be used
as the context marker for all the triples. If the context is specified
as "source", a URI is constructed from the source file path.baseURI
- a string that specifies a base URI for the file.useRapper
- if not null or false, then the RDF/XML file will be
piped through the open source tool rapper.
A string can specify the path to the rapper command.
All the source arguments must specify files visible to the server.save
- This argument controls how encoded literals are stored in the store.
When true, if a triple triggers an encoding of a literal, two triples are added
to the store, one with the encoded literal and one with the string literal.
When false, only the encoded triple is added.
When null, allow the default behavior (currently to add both).
AllegroGraphException
public long loadRDFXML(java.lang.String[] filePaths) throws AllegroGraphException
filePaths
- an array of file specifier strings. The files are loaded in the
order specified.
AllegroGraphException
public long parseRDFXML(java.lang.String data, java.lang.Object context, java.lang.String baseURI) throws AllegroGraphException
data
- the stringcontext
- a String or instance that identifies a triple part to be used
as the context marker for all the triples. If the context is specified
as "source", a URI is constructed from the source file path.baseURI
- a string that specifies a base URI for the file.
AllegroGraphException
public long parseRDFXML(java.lang.String data, java.lang.Object context, java.lang.String baseURI, java.lang.Boolean save) throws AllegroGraphException
data
- the stringcontext
- a String or instance that identifies a triple part to be used
as the context marker for all the triples. If the context is specified
as "source", a URI is constructed from the source file path.baseURI
- a string that specifies a base URI for the file.save
- This argument controls how encoded literals are stored in the store.
When true, if a triple triggers an encoding of a literal, two triples are added
to the store, one with the encoded literal and one with the string literal.
When false, only the encoded triple is added.
When null, allow the default behavior (currently to add both).
AllegroGraphException
public long numberOfTriples() throws AllegroGraphException
AllegroGraphException
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 mergeNewTriples(boolean wait) throws AllegroGraphException
AllegroGraphException
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.
AllegroGraphException
public 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 that identifies a triple store part.
AllegroGraphException
public UPIImpl[] 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.
AllegroGraphException
public 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 number 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, as in getSelectLimit()
public BlankNode createBNode()
java.lang.IllegalStateException
- if the creation fails.
It does not make sense to create a BlankNode that is not registered in the triple store because two instances of apparently identical unregistered BlankNodes would map to distinct BlankNodes in the triple store.
public BlankNode createBNode(java.lang.String nodeId)
nodeId
- A string used in the toString representation of this
blank node. This representation applies only to this particular Java
instance. If the same blank node is retrieved from the store in a
query, the retrieved blank node will not be associated with this name.
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 LiteralNode createLiteral(java.lang.String value)
The literal instance will have a null UPI.
public LiteralNode addLiteral(java.lang.String value)
java.lang.IllegalStateException
- if the creation fails.public LiteralNode createLiteral(java.lang.String value, java.lang.String language)
The literal instance will have a null UPI.
public LiteralNode addLiteral(java.lang.String value, java.lang.String language)
java.lang.IllegalStateException
- if the creation fails.public LiteralNode createTypedLiteral(java.lang.String text, java.lang.String type)
text
- A string URI.type
- A string URI that denotes the type.
public LiteralNode 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 LiteralNode createTypedLiteral(java.lang.String text, UPI type)
text
- A string.type
- A UPI instance that identifies a ValueNode
public LiteralNode 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 LiteralNode addTypedLiteral(java.lang.String text, URINode type)
text
- A string.type
- A URI instance that identifies the datatype resource.
java.lang.IllegalStateException
- if the creation fails.public LiteralNode createLiteral(java.lang.String value, URINode datatype)
The literal instance will have a null UPI.
public LiteralNode addLiteral(java.lang.String value, URINode datatype) throws AllegroGraphException
java.lang.IllegalStateException
- if the creation fails.
AllegroGraphException
public LiteralNode[] 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.
AllegroGraphException
public URINode createURI(java.lang.String uri)
uri
-
public URINode addURI(java.lang.String uri) throws AllegroGraphException
uri
-
AllegroGraphException
- if the creation fails.public UPI[] addURIIds(java.lang.String[] uri) throws AllegroGraphException
uri
- An array of URI strings.
AllegroGraphException
public URINode[] addURIs(java.lang.String[] uri) throws AllegroGraphException
uri
- An array of URI strings.
AllegroGraphException
public URINode createURI(java.lang.String namespace, java.lang.String localName)
java.lang.IllegalStateException
- if the creation fails.public TriplesIterator getStatements(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object) throws AllegroGraphException
AllegroGraphException
- if there is
a problem.public TriplesIterator getStatements(boolean includeInferred, java.lang.Object subject, java.lang.Object predicate, java.lang.Object object) throws AllegroGraphException
includeInferred
- if true, include inferred triples in the result.
If false, return only triples that are actually present in the
triple store.
AllegroGraphException
- if there is
a problem.public TriplesIterator getStatements(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object, java.lang.Object context) throws AllegroGraphException
AllegroGraphException
- if there is
a problem.public TriplesIterator getStatements(boolean includeInferred, java.lang.Object subject, java.lang.Object predicate, java.lang.Object object, java.lang.Object context) throws AllegroGraphException
includeInferred
- if true, include inferred triples in the result.
If false, return only triples that are actually present in the
triple store.context
- Specifies the context or graph of the statements. Null is wild
and matches any context; the empty string denotes the Null Context.
AllegroGraphException
- if there is
a problem.public TriplesIterator 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) throws AllegroGraphException
subject
- predicate
- object
- obEnd
- a non-null value specifies the end of a range of values
for the object component of the triples. A null value specifies
that only the object argument will be used to match triples.context
- a null value is a wild card, the empty string specifies
the null context, any other value must specify a resource that will
match the context component.contextEnd
- a non-null value specifies the end of a range of values
for the context component of the triples. A null value specifies
that only the context argument will be used to match triples.
AllegroGraphException
- if there is
a problem.public TriplesIterator 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) throws AllegroGraphException
includeInferred
- if true, include inferred triples in the result.
If false, return only triples that are actually present in the
triple store.subject
- predicate
- object
- obEnd
- a non-null value specifies the end of a range of values
for the object component of the triples. A null value specifies
that only the object argument will be used to match triples.
The strings "min" and "max" may be used to specify the minimum and maximum
va;ue of the corresponding datatype.context
- a null value is a wild card, the empty string specifies
the null context, any other value must specify a resource that will
match the context component.contextEnd
- a non-null value specifies the end of a range of values
for the context component of the triples. A null value specifies
that only the context argument will be used to match triples.
AllegroGraphException
- if there is
a problem.public TriplesIterator getStatements(boolean includeInferred, java.lang.Object subject, java.lang.Object subEnd, java.lang.Object predicate, java.lang.Object predEnd, java.lang.Object object, java.lang.Object obEnd, java.lang.Object context, java.lang.Object contextEnd) throws AllegroGraphException
getStatements(boolean, Object, Object, Object, Object, Object, Object)
includeInferred
- subject
- subEnd
- predicate
- predEnd
- object
- obEnd
- context
- contextEnd
-
AllegroGraphException
public boolean hasStatement(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object) throws AllegroGraphException
AllegroGraphException
public boolean hasStatement(boolean includeInferred, java.lang.Object subject, java.lang.Object predicate, java.lang.Object object) throws AllegroGraphException
includeInferred
- If false, only ground triples (triples directly stored
in the triple store) are included in the search. If true, the search
includes triples derived by reasoning.
AllegroGraphException
public boolean hasStatement(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object, java.lang.Object context) throws AllegroGraphException
AllegroGraphException
public boolean hasStatement(boolean includeInferred, java.lang.Object subject, java.lang.Object predicate, java.lang.Object object, java.lang.Object context) throws AllegroGraphException
includeInferred
- If false, only ground triples (triples directly stored
in the triple store) are included in the search. If true, the search
includes triples derived by reasoning.
AllegroGraphException
public void addStatement(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object) throws AllegroGraphException
AllegroGraphException
public void addStatement(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object, java.lang.Object context) throws AllegroGraphException
AllegroGraphException
public void addStatements(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object) throws AllegroGraphException
subject
- An array of Resource instances.predicate
- An array of URI instances.object
- An array of Value instances.
The number of Statements added is determined by the longest array argument. The last element in short arrays is extended to the required length. A single (not array) argument is treated as an array of one element.
AllegroGraphException
public void addStatements(java.lang.Object subject, java.lang.Object predicate, java.lang.Object object, java.lang.Object contexts) throws AllegroGraphException
subject
- An array of Resource instances.predicate
- An array of URI instances.object
- An array of Value instances.contexts
- An array of URI instances.
The number of Statements added is determined by the longest array argument. The last element in short arrays is extended to the required length. A single (not array) argument is treated as an array of one element.
AllegroGraphException
public long clear() throws AllegroGraphException
AllegroGraphException
public LiteralNode createLiteral(boolean value)
The LiteralNode instance will have a null UPI.
public LiteralNode addLiteral(boolean value) throws AllegroGraphException
AllegroGraphException
public LiteralNode createLiteral(long value)
The LiteralNode instance will have a null UPI.
public LiteralNode addLiteral(long value) throws AllegroGraphException
AllegroGraphException
public LiteralNode createLiteral(int value)
The literal instance will have a null UPI.
public LiteralNode addLiteral(int value) throws AllegroGraphException
AllegroGraphException
public LiteralNode createLiteral(short value)
The LiteralNode instance will have a null UPI.
public LiteralNode addLiteral(short value) throws AllegroGraphException
AllegroGraphException
public LiteralNode createLiteral(byte value)
The LiteralNode instance will have a null UPI.
public LiteralNode addLiteral(byte value) throws AllegroGraphException
AllegroGraphException
public LiteralNode createLiteral(double value)
The LiteralNode instance will have a null UPI.
public LiteralNode addLiteral(double value) throws AllegroGraphException
AllegroGraphException
public LiteralNode createLiteral(float value)
The LiteralNode instance will have a null UPI.
public LiteralNode addLiteral(float value) throws AllegroGraphException
AllegroGraphException
public Triple createStatement(ResourceNode subject, URINode predicate, ValueNode object, ResourceNode context)
public Triple newTriple(java.lang.Object s, java.lang.Object p, java.lang.Object o) throws AllegroGraphException
s
- A String, UPI, or Value specifying a subject.p
- A String, UPI, or Value specifying a predicate.o
- A String, UPI, or Value specifying an object.
AllegroGraphException
public long newTripleId(java.lang.Object s, java.lang.Object p, java.lang.Object o) throws AllegroGraphException
s
- A String, UPI, or Value specifying a subject.p
- A String, UPI, or Value specifying a predicate.o
- A String, UPI, or Value specifying an object.
AllegroGraphException
public Triple newTriple(java.lang.Object s, java.lang.Object p, java.lang.Object o, java.lang.Object c) throws AllegroGraphException
s
- A String, UPI, or Value specifying a subject.p
- A String, UPI, or Value specifying a predicate.o
- A String, UPI, or Value specifying an object.c
- A String, UPI, or Value specifying a context.
AllegroGraphException
public long newTripleId(java.lang.Object s, java.lang.Object p, java.lang.Object o, java.lang.Object c) throws AllegroGraphException
s
- A String, UPI, or Value specifying a subject.p
- A String, UPI, or Value specifying a predicate.o
- A String, UPI, or Value specifying an object.c
- A String, UPI, or Value specifying a context.
AllegroGraphException
public Triple[] newTriples(java.lang.Object s, java.lang.Object p, java.lang.Object o) throws AllegroGraphException
s
- An array of Strings UPIs or Value instances specifying subjects.p
- An array of Strings UPIs or Value instances specifying predicates.o
- An array of Strings UPIs or Value instances specifying objects.
The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.
AllegroGraphException
public Triple[] newTriples(java.lang.Object s, java.lang.Object p, java.lang.Object o, java.lang.Object c) throws AllegroGraphException
s
- An array of Strings UPIs or Value instances specifying subjects.p
- An array of Strings UPIs or Value instances specifying predicates.o
- An array of Strings UPIs or Value instances specifying objects.c
- An array of Strings UPIs or Value instances specifying contexts.
The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.
AllegroGraphException
public long[] newTripleIds(java.lang.Object s, java.lang.Object p, java.lang.Object o) throws AllegroGraphException
s
- An array of Strings UPIs or Value instances specifying subjects.p
- An array of Strings UPIs or Value instances specifying predicates.o
- An array of Strings UPIs or Value instances specifying objects.
The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.
AllegroGraphException
public long[] newTripleIds(java.lang.Object s, java.lang.Object p, java.lang.Object o, java.lang.Object c) throws AllegroGraphException
s
- An array of Strings UPIs or Value instances specifying subjects.p
- An array of Strings UPIs or Value instances specifying predicates.o
- An array of Strings UPIs or Value instances specifying objects.c
- An array of Strings UPIs or Value instances specifying contexts.
The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.
AllegroGraphException
public long removeStatements(java.lang.Object s, java.lang.Object p, java.lang.Object o) throws AllegroGraphException
s
- the subject pattern (Value, UPI, string, or array of same)p
- the predicate pattern (Value, UPI, string, or array of same)o
- the object pattern (Value, UPI, string, or array of same)
The s, p, or o, arguments may also be null or an empty string to denote a wild card.
AllegroGraphException
public long removeStatements(java.lang.Object s, java.lang.Object p, java.lang.Object o, java.lang.Object c) throws AllegroGraphException
s
- the subject pattern (Value, UPI, string, or array of same)p
- the predicate pattern (Value, UPI, string, or array of same)o
- the object pattern (Value, UPI, string, or array of same)c
- the context pattern (Value, UPI, string, or array of same); null denotes all contexts,
the empty string denotes the null context.
The s, p, or o, arguments may also be null or an empty string to denote a wild card.
AllegroGraphException
public UPI[] createBNodeIds(int n) throws AllegroGraphException
n
- the number of nodes to allocate.
AllegroGraphException
- if there is a problem during creation.public long removeStatement(java.lang.Object s, java.lang.Object p, java.lang.Object o) throws AllegroGraphException
s
- A Resource, a string in triples format, or a UPIp
- A Node, a string in triples format, or a UPIo
- A Value, a string in triples format, or a UPI
AllegroGraphException
public long removeStatement(java.lang.Object s, java.lang.Object p, java.lang.Object o, java.lang.Object c) throws AllegroGraphException
s
- the subject of the Statement in questionp
- the predicate of the Statement in questiono
- the object of the Statement in questionc
- the context (or graph) of the Statement in question
Each of the parameters may be a Value instance, or a UPI instance, or a string containing an ntriple format reference.
The context argument may be null to denote the Null Context (Default Graph).
AllegroGraphException
public UPI[] addLiteralIds(java.lang.String[] values, java.lang.String[] datatypes, java.lang.String[] languages) throws AllegroGraphException
values
- an array of string literal values.datatypes
- an array of string URIs for datatypes. If an array element is
null, the corresponding literal does not have a datatype qualifier. If the
array argument is null, then none of the literals have datatype qualifiers.languages
- an array of strings language qualifiers. If an array element is
null, the corresponding literal does not have a language qualifier. If
the array argument is null, then none of the literals have language
qualifiers.
If an element of the datatypes array is not null, the corresponding element in the languages array is ignored.
AllegroGraphException
- The result array is the same length as the values array. The other two argument arrays may be shorter. If shorter, the last element in each array is repeated as often as necessary.
public ValueSetIterator getFreetextUniqueSubjects(java.lang.String pattern) throws AllegroGraphException
pattern
- A text pattern as described in getFreetextStatements(String)
AllegroGraphException
public TriplesIterator getFreetextStatements(java.lang.String pattern) throws AllegroGraphException
pattern
- A text pattern as described below.
AllegroGraphException
- The text pattern is a string containing a well-formed pattern expression defines as follows:
pattern := atomic_pattern | composite_pattern composite_pattern := ( and pattern* ) | ( or pattern* ) atomic_pattern := word_pattern | phrase_pattern word_pattern := 'char*' phrase pattern := [char*] char := /( denotes the character [ char := /) denotes the character ] char := /! denotes the character ' char := // denotes the character / char := /# denotes the character " char := ? denotes a wild card that matches any single character char := * denotes a wild card that matches any sequence of characters char := any any other character denotes itself
public java.lang.String[] getFreetextPredicates() throws AllegroGraphException
AllegroGraphException
public void registerFreetextPredicate(java.lang.Object predicate) throws AllegroGraphException
getFreetextStatements(String)
or with
getFreetextUniqueSubjects(String)
.
Free text indexing predicates must be registered before any triples
are added to the triple store.
predicate
- The predicate may be specified as a string in Ntriples syntax
or !-notation, a UPI instance, or a URI instance.
AllegroGraphException
public Triple createStatement(ResourceNode subject, URINode predicate, ValueNode object)
public int getUnmergedCount() throws AllegroGraphException
AllegroGraphException
public int getUnindexedTripleCount() throws AllegroGraphException
AllegroGraphException
public int getUnindexedThreshold() throws AllegroGraphException
AllegroGraphException
public void setUnindexedThreshold(int val) throws AllegroGraphException
val
- The new value for this parameter.
AllegroGraphException
public int getUnmergedThreshold() throws AllegroGraphException
AllegroGraphException
public void setUnmergedThreshold(int val) throws AllegroGraphException
val
- The new value for this parameter.
AllegroGraphException
public java.lang.String[] getIndexFlavors() throws AllegroGraphException
AllegroGraphException
public void setIndexFlavors(java.lang.String[] flavors) throws AllegroGraphException
flavors
- An array of strings specifying the desired indexing
flavors. Any existing flavors are discarded.
Each string is a permutation of the letters "spog".
AllegroGraphException
- Multi-user Note: The set of index flavors is a persistent property of the persistent triple store. If several users are accessing the same triple store, any changes to the index flavors are seen by all users.
public void addIndexFlavors(java.lang.String[] flavors) throws AllegroGraphException
flavors
- An array of strings specifying the desired indexing
flavors. These flavors are added to the existing flavors.
Each string is a permutation of the letters "spogi".
AllegroGraphException
- Multi-user Note: The set of index flavors is a persistent property of the persistent triple store. If several users are accessing the same triple store, any changes to the index flavors are seen by all users.
public void dropIndexFlavors(java.lang.String[] flavors) throws AllegroGraphException
flavors
- An array of strings specifying the indexing
flavors to delete. These flavors are deleted from the existing flavors.
Each string is a permutation of the letters "spog".
AllegroGraphException
- Multi-user Note: The set of index flavors is a persistent property of the persistent triple store. If several users are accessing the same triple store, any changes to the index flavors are seen by all users.
public void addDataMapping(java.lang.String[] map) throws AllegroGraphException
map
- An array of strings of a length that is a multiple of 3.
Each group of 3 consecutive elements defines one mapping:
the first element is string URI of a datatype or predicate;
the second element is a string naming an internal representation type
of AllegroGraph (the valid types are listed in the AllegroGraph
introduction); the third element is the string "datatype" or
"predicate" to identify the kind of mapping.
The entries in the array are added to the table in the triple store. An existing entry is superseded by the new definition.
When a triple is created with a predicate matching a defined URI, then the object of the triple is parsed and converted to the internal data type.
When a literal is created with a datatype modifier that matches a defined URI, then the content of the literal is parsed and converted to the internal data type.
AllegroGraphException
public void setDataMapping(java.lang.String[] map) throws AllegroGraphException
map
- An array of strings similar to the array returned by getDataMapping().
See also addDataMapping(String[])
and
getDataMapping()
.
AllegroGraphException
public java.lang.String[] getDataMapping() throws AllegroGraphException
AllegroGraphException
- See also addDataMapping(String[])
.public java.lang.Object[] evalInServer(java.lang.String expression) throws AllegroGraphException
expression
- The expression.
AllegroGraphException
-
The proper usage of this method is fully described in
AllegroGraphConnection.evalInServer(String)
.
public int serverTrace(boolean onoff)
onoff
- true to turn on tracing.
When tracing is turned on in the AllegroGraph server, every call from Java to the server causes some output on the server console. This output may be useful in diagnosing some problems. Since tracing may produce large quantities of output it should be used with caution and only around critical sections of code.
The trace state applies only to operations on this triple store.
public int serverTrace(java.lang.String outFile)
outFile
- the name and path for a file where the trace output will go.
When tracing is turned on in the AllegroGraph server, every call from Java to the server causes some output on the server console. This output may be useful in diagnosing some problems. Since tracing may produce large quantities of output it should be used with caution and only around critical sections of code.
The trace state applies only to operations on this triple store.
public java.lang.String[] getNamespaces()
public NamespaceRegistry getNamespaceRegistry()
public void registerNamespace(java.lang.String prefix, java.lang.String full) throws AllegroGraphException
prefix
- the prefixfull
- The full namespace text. If the full text is null
or "", then the prefix is removed from the table.
AllegroGraphException
public void registerNamespaces(java.lang.String[] defs) throws AllegroGraphException
defs
- An array of strings. The even numbered elements are prefixes
and the following odd numbered element is the full namespace text.
If the full text is null or "", then the prefix is removed
from the table.
AllegroGraphException
public void registerNamespaces(NamespaceRegistry ns) throws AllegroGraphException
ns
- the new definitions.
AllegroGraphException
public void setNamespaceRegistry(NamespaceRegistry ns) throws AllegroGraphException
ns
- the new definitions.
AllegroGraphException
public void setNamespaceRegistry() throws AllegroGraphException
AllegroGraphException
public ValueNode addPart(java.lang.String part) throws AllegroGraphException
part
- A string in Ntriples syntax or !-notation that denotes
a Literal, a Node, or a blank node.
NOTE: mentioning a blank node twice with the same string will still create two distinct blank node instances.
AllegroGraphException
public AllegroGraph[] getStores() throws AllegroGraphException
AllegroGraphException
public boolean getSyncEveryTime()
public void setSyncEveryTime(boolean s)
s
- if true, the triple store will be synchronized after every
update call from Java. If false, the application must call
syncTripleStore()
every now and then
in order to force a persistent store update.
NOTE: If the synchronization mode is false, and the application
terminates abruptly, any updates since the last synchronization
call will be lost.public java.lang.String toString()
public SNAExtension getSNAExtension()
SNAExtension
instancepublic GeoExtension getGeoExtension()
GeoExtension
instancepublic boolean isSPOGICacheEnabled() throws AllegroGraphException
AllegroGraphException
public void setSPOGICacheEnabled(boolean onoff) throws AllegroGraphException
onoff
- if true, enable caching; if false, disable.
AllegroGraphException
- Note: This state is visible to and affects all applications and all users connected to this triple store.
public long getSPOGICacheSize() throws AllegroGraphException
AllegroGraphException
public void setSPOGICacheSize(long size) throws AllegroGraphException
size
- must be positive.
AllegroGraphException
- Note: This value is visible to and affects all applications and all users connected to this triple store.
public java.lang.String getUPIMapDirectory() throws AllegroGraphException
AllegroGraphException
public void setUPIMapDirectory(java.lang.String dir) throws AllegroGraphException
dir
- a string containing the pathname of the directory where the maps
will be stored, or null to look in the triple store directory.
AllegroGraphException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |