Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.franz.agbase
Class AllegroGraph

    java.lang.Object
      AGInternals
          com.franz.agbase.AllegroGraph

    public class AllegroGraph

extends AGInternals

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.

If attributes need to be set to control the behavior of the store, the application creates an AllegroGraph instance, sets attributes with `setAttribute(StoreAttribute, Object)`, and then accesses the store with `AllegroGraphConnection.access(AllegroGraph)` or the other single-argument forms of the above methods.

#### Triple Component Specification

The components of triples in update and search methods are usually declared as Object. In that case the argument may be:

- A string in NTriples notation or a !-notation.
  `"<http://franz.com/example#label>"`
  `"\"an explicit literal\""`
  `"!franz:label"`
- An instance of a class that implements the `ValueNode` interface.
  `ag.createLiteral("some label")`
- A `UPI` instance.
- In some operations, a null value or an empty string may be allowed.

When a method argument may be an array, it must be an array of one of the above types.

#### The Context or Graph Component

AllegroGraph is a triple store implementations that allows triples to be identified by an additional component that may be a literal, a URI or a blank node. This component is sometimes called a context and sometimes a graph specifier. If this component is not specified, 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 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.

#### AllegroGraph Jena and OpenRDF Sesame implementations

AllegroGraph is internally a quad store that accepts any AllegroGraph part value in any one of the 4 parts of a quad. This definition is more liberal than the RDF definitions implemented in Jena and in Sesame 1.2 and 2.

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

### AllegroGraph

    public AllegroGraph(java.lang.String name)

  Create an unconnected AllegroGraph instance. This constructor is useful if attributes need to be set before the triple store is opened or created. See also `setAttribute(String, Object)`.

  Parameters:
    `name` - the pathname string for the triple store.

Method Detail

### version

    public static java.lang.String version()

  Query the current AllegroGraph version.

  Returns:
    a version string.

### versions

    public static java.lang.String[] versions()

  Query the current AllegroGraph and component versions.

  Returns:
    An array of strings for the AllegroGraph version, and the server protocol level.

### main

    public static void main(java.lang.String[] args)

  Print AllegroGraph version information.

### setLookAhead

    public void setLookAhead(int n)

  Set the look-ahead value for subsequent Statement search operations.

  Parameters:
    `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)`.

### getLookAhead

    public int getLookAhead()

  Query the look-ahead value.

  Returns:
    an integer See also `setLookAhead(int)`.

### setAttribute

    public 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. These attributes must be set before one of the connection methods is called since they only take effect during the creation or opening of a triple store.

  Parameters:
    `name` - The name of the attribute.
    `value` - The value of the attribute.

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object value)

  Deprecated. Use `setAttribute(com.franz.agbase.AllegroGraph.StoreAttribute, Object)`

### syncTripleStore

    public void syncTripleStore()
                         throws AllegroGraphException

  Sync an AllegroGraph triple store.

  Throws:
    `AllegroGraphException`

### closeTripleStore

    public boolean closeTripleStore()
                             throws AllegroGraphException

  Close an AllegroGraph instance. Since many other users may be using this same triple store, closing the AllegroGraph instance does not actually close the triple store but only synchronizes the store and invalidates this access instance unless this is the only instance accessing the store.

  Throws:
    `AllegroGraphException`

### closeTripleStore

    public boolean closeTripleStore(boolean doClose)
                             throws AllegroGraphException

  Close an AllegroGraph instance and optionally close the triple store if this is the only reference.

  Parameters:
    `doClose` - when true, close the triple-store if this is the only reference.
  Returns:
    true if the triple store is known to be closed.
  Throws:
    `AllegroGraphException`

### loadNTriples

    public long loadNTriples(java.lang.String name)
                      throws AllegroGraphException

  Load a file of triple declarations. The triples are added in the null context of the triple store.

  Parameters:
    `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.

  Throws:
    `AllegroGraphException`

### loadNTriples

    public long loadNTriples(java.lang.String name,
                             java.lang.Object context)
                      throws AllegroGraphException

  Load a file of triple declarations. The triples are added in the specified context.

  Parameters:
    `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)`.

  Throws:
    `AllegroGraphException`

### loadNTriples

    public long loadNTriples(java.lang.String[] names)
                      throws AllegroGraphException

  Load several files of triple declarations. The triples are added in the null context of the triple store.

  Parameters:
    `names` - an array of strings specifying several data sources.

    See the notes about source specifiers and progress messages in the description of `loadNTriples(String)`.

  Throws:
    `AllegroGraphException`

### loadNTriples

    public long loadNTriples(java.lang.String[] names,
                             java.lang.Object context)
                      throws AllegroGraphException

  Load several files of triple declarations. The triples are added in the specified context.

  Parameters:
    `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)`.

  Throws:
    `AllegroGraphException`

### loadNTriples

    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

  Load one or more files of triple declarations. The triples are added in the specified context.

  Parameters:
    `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)`.

  Throws:
    `AllegroGraphException`

### loadNTriples

    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

  Load one compressed file of triple declarations. The triples are added in the specified context.

  Parameters:
    `name` -
    `context` -
    `save` -
    `ext` -
    `place` -
    `unzip` - When true, the input file is expected to be in gzip compression normally with a .gz extension.
  Returns:
    the number of triples added to the store
  Throws:
    `AllegroGraphException`

### parseNTriples

    public long parseNTriples(java.lang.String from)
                       throws AllegroGraphException

  Parse a string and add triples to the null context of triple store. The string must be in the Ntriples format expected by the AllegroGraph server.

  Parameters:
    `from` - a string in Ntriples format
  Throws:
    `AllegroGraphException`

### parseNTriples

    public long parseNTriples(java.lang.String from,
                              java.lang.Object context)
                       throws AllegroGraphException

  Parse a string and add triples to the specified context of the triple store. The string must be in the Ntriples format expected by the AllegroGraph server.

  Parameters:
    `from` - a string in Ntriples format
    `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.
  Throws:
    `AllegroGraphException`

### parseNTriples

    public long parseNTriples(java.lang.String from,
                              java.lang.Object context,
                              boolean save,
                              java.lang.Object[] place)
                       throws AllegroGraphException

  Parse a string and add triples to the specified context of the triple store. The string must be in the Ntriples format expected by the AllegroGraph server.

  Parameters:
    `from` - from a string in Ntriples format
    `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.
    `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.
  Returns:
    the number of triples added.
  Throws:
    `AllegroGraphException`

### loadRDFXML

    public long loadRDFXML(java.lang.String filePath)
                    throws AllegroGraphException

  Parse a file of triple definitions in RDF/XML notation and add the triples to the null context of the triple store.

  Parameters:
    `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.
  Returns:
    the number of triples added to the store

    See the note about progress messages in the description of `loadNTriples(String)`.

  Throws:
    `AllegroGraphException`

### loadRDFXML

    public long loadRDFXML(java.lang.String filePath,
                           java.lang.Object context)
                    throws AllegroGraphException

  Parse a file of triple definitions in RDF/XML notation and add the triples to the specified context of the triple store.

  Parameters:
    `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.
  Returns:
    the number of triples added to the store

    See the note about progress messages in the description of `loadNTriples(String)`.

  Throws:
    `AllegroGraphException`

### loadRDFXML

    public long loadRDFXML(java.lang.String filePath,
                           java.lang.Object context,
                           java.lang.String baseURI)
                    throws AllegroGraphException

  Parse a file of triple definitions in RDF/XML notation and add the triples to the specified context of the triple store.

  Parameters:
    `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.
  Returns:
    the number of triples added to the store

    See the note about progress messages in the description of `loadNTriples(String)`.

  Throws:
    `AllegroGraphException`

### loadRDFXML

    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

  Parse a file of triple definitions in RDF/XML notation and add the triples to the specified context of the triple store.

  Parameters:
    `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).
  Returns:
    the number of triples added to the store
  Throws:
    `AllegroGraphException`

### loadRDFXML

    public long loadRDFXML(java.lang.String[] filePaths)
                    throws AllegroGraphException

  Parse files of triple definitions in RDF/XML notation and add the triples to the null context of the triple store.

  Parameters:
    `filePaths` - an array of file specifier strings. The files are loaded in the order specified.
  Returns:
    the number of triples added to the store
  Throws:
    `AllegroGraphException`

### parseRDFXML

    public long parseRDFXML(java.lang.String data,
                            java.lang.Object context,
                            java.lang.String baseURI)
                     throws AllegroGraphException

  Parse a string containing RDF/XML definitions of triples and add the triples to the specified context of the triple store.

  Parameters:
    `data` - the string
    `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.
  Returns:
    the number of triples added to the store
  Throws:
    `AllegroGraphException`

### parseRDFXML

    public long parseRDFXML(java.lang.String data,
                            java.lang.Object context,
                            java.lang.String baseURI,
                            java.lang.Boolean save)
                     throws AllegroGraphException

  Parse a string containing RDF/XML definitions of triples and add the triples to the specified context of the triple store.

  Parameters:
    `data` - the string
    `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.
    `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).
  Returns:
    the number of triples added to the store
  Throws:
    `AllegroGraphException`

### numberOfTriples

    public long numberOfTriples()
                         throws AllegroGraphException

  Query the number of triples in the triple store.

  Returns:
    the number of triples in the triple store.
  Throws:
    `AllegroGraphException`

### indexNewTriples

    public void indexNewTriples()
                         throws AllegroGraphException

  Index new triples.

  Throws:
    `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.

### indexNewTriples

    public void indexNewTriples(boolean wait)
                         throws AllegroGraphException

  Index new triples immediately or in the background.

  Parameters:
    `wait` - If true, then return only after indexing is completed. If false, schedule an indexing task to run in the background and return immediately.
  Throws:
    `AllegroGraphException`

### mergeNewTriples

    public void mergeNewTriples(boolean wait)
                         throws AllegroGraphException

  Throws:
    `AllegroGraphException`

### indexAllTriples

    public void indexAllTriples()
                         throws AllegroGraphException

  Index all the triples in the triple store.

  Throws:
    `AllegroGraphException` - if an error occurs during indexing.

    See the discussion of chunk size at indexNewTriples().

### indexAllTriples

    public void indexAllTriples(boolean wait)
                         throws AllegroGraphException

  Index all triples immediately or in the background.

  Parameters:
    `wait` - If true, then return only after indexing is completed. If false, schedule an indexing task to run in the background and return immediately.
  Throws:
    `AllegroGraphException`

### newValue

    public ValueObject newValue(UPI id)

  Convert a UPI instance into a ValueObject instance.

  Parameters:
    `id` - A UPI instance that denotes a Resource or Literal object
  Returns:
    The Resource or Literal object instance.
  Throws:
    `java.lang.IllegalStateException` - if the object could not be created.

### getParts

    public java.lang.String[] getParts(UPI id)
                                throws AllegroGraphException

  Retrieve the string and type information associated with a triple store part.

  Parameters:
    `id` - A UPI instance that identifies a triple store part.
  Returns:
    An array of three strings:
    - A string that identifies the type of the object:
      - "anon" - A blank node
      - "node" - A resource node
      - "literal" - A literal node
      - "literal/lang" - A literal node with a language tag
      - "typed-literal" - A literal node with a type tag
      - "unknown" - The id is not in the triple store
    - A string that contains the URI or literal data associated with the object
    - A string that contains additional data, ie a language or a type tag
    If the object does not have the component, then the array element is null.
  Throws:
    `AllegroGraphException`

### getTripleParts

    public UPIImpl[] getTripleParts(long id)
                             throws AllegroGraphException

  Return an array of 4 UPI instances for subject, predicate, object, and context.

  Throws:
    `AllegroGraphException`

### getParts

    public void getParts(UPI[] ids,
                         java.lang.String[] types,
                         java.lang.String[] vals,
                         java.lang.String[] mods)
                  throws AllegroGraphException

  Like getParts(UPI) but operates on an array of UPI instances.

  Parameters:
    `ids` - an array of UPI instances
    `types` - 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.

  Throws:
    `AllegroGraphException`

### getSelectLimit

    public int getSelectLimit()

  Get the current value of the select limit parameter.

  Returns:
    an integer value.

    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.

### setSelectLimit

    public void setSelectLimit(int v)

  Set the value of the select limit parameter.

  Parameters:
    `v` - A positive integer, as in `getSelectLimit()`

### createBNode

    public BlankNode createBNode()

  Create a BlankNode instance.

  Returns:
    the BlankNode
  Throws:
    `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.

### createBNode

    public BlankNode createBNode(java.lang.String nodeId)

  Create a BlankNode instance.

  Parameters:
    `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.
  Returns:
    the BlankNode
  Throws:
    `java.lang.IllegalStateException` - if the creation fails.

    See note on createBNode().

### createBNodes

    public BlankNode[] createBNodes(int n)
                             throws AllegroGraphException

  Allocate a set of BlankNodes.

  Parameters:
    `n` - the number of nodes to allocate.
  Returns:
    an array of BlankNode instances.
  Throws:
    `AllegroGraphException` - if there is a problem during creation.

    See note on createBNode().

### createEncodedLiteral

    public EncodedLiteral createEncodedLiteral(long v,
                                               java.lang.String encoding)

  Create an AllegroGraph EncodedLiteral instance from a Java long value.

  Parameters:
    `v` - The Java long value.
    `encoding` - A string that specifies the AllegroGraph encoding desired. The available encodings are described in the AllegroGraph Introduction document.
  Returns:
    an EncodedLiteral instance that can be used in query ir update operations.

### createEncodedLiteral

    public EncodedLiteral createEncodedLiteral(double v,
                                               java.lang.String encoding)

  Create an AllegroGraph EncodedLiteral instance from a Java double value.

  Parameters:
    `v` - The Java double value.
    `encoding` - A string that specifies the AllegroGraph encoding desired. The available encodings are described in the AllegroGraph Introduction document.
  Returns:
    an EncodedLiteral instance that can be used in query ir update operations.

### createEncodedLiteral

    public EncodedLiteral createEncodedLiteral(java.lang.String v,
                                               java.lang.String encoding)

  Create an AllegroGraph EncodedLiteral instance from a Java string value.

  Parameters:
    `v` - The Java string value.
    `encoding` - A string that specifies the AllegroGraph encoding desired. The available encodings are described in the AllegroGraph Introduction document.
  Returns:
    an EncodedLiteral instance that can be used in query ir update operations.

### createLiteral

    public LiteralNode createLiteral(java.lang.String value)

  Create a LiteralNode instance without updating the triple store.

  Returns:
    a LiteralNode instance.

    The literal instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(java.lang.String value)

  Create a literal instance and add the LiteralNode to the triple store registry.

  Throws:
    `java.lang.IllegalStateException` - if the creation fails.

### createLiteral

    public 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.

  Returns:
    a LiteralNode instance.

    The literal instance will have a null UPI.

### addLiteral

    public 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.

  Returns:
    a LiteralNode instance.
  Throws:
    `java.lang.IllegalStateException` - if the creation fails.

### createTypedLiteral

    public 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.

  Parameters:
    `text` - A string URI.
    `type` - A string URI that denotes the type.
  Returns:
    a Literal instance.

### addTypedLiteral

    public 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.

  Parameters:
    `text` - A string URI.
    `type` - A string URI that denotes the type.
  Returns:
    a Literal instance.
  Throws:
    `java.lang.IllegalStateException` - if the creation fails.

### createTypedLiteral

    public LiteralNode createTypedLiteral(java.lang.String text,
                                          UPI type)

  Create a typed Literal instance from a string but do not modify the triple store.

  Parameters:
    `text` - A string.
    `type` - A UPI instance that identifies a ValueNode
  Returns:
    a Literal instance.

### addTypedLiteral

    public 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.

  Parameters:
    `text` - A string.
    `type` - A UPI instance that identifies the datatype resource.
  Returns:
    a Literal instance.
  Throws:
    `java.lang.IllegalStateException` - if the creation fails.

### addTypedLiteral

    public 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.

  Parameters:
    `text` - A string.
    `type` - A URI instance that identifies the datatype resource.
  Returns:
    a Literal instance.
  Throws:
    `java.lang.IllegalStateException` - if the creation fails.

### createLiteral

    public LiteralNode createLiteral(java.lang.String value,
                                     URINode datatype)

  Create a LiteralNode instance with a datatype tag but do not modify the triple store.

  Returns:
    a LiteralNode instance.

    The literal instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(java.lang.String value,
                                  URINode datatype)
                           throws AllegroGraphException

  Create a literal instance with a datatype tag and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode instance.
  Throws:
    `java.lang.IllegalStateException` - if the creation fails.
    `AllegroGraphException`

### addLiterals

    public LiteralNode[] addLiterals(java.lang.String[] values,
                                     java.lang.String[] datatypes,
                                     java.lang.String[] languages)
                              throws AllegroGraphException

  Create a set of Literal instances and add the literals to the triple store registry.

  Parameters:
    `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.
  Returns:
    An array of Literal instances of the same size as the first argument array.
  Throws:
    `AllegroGraphException`

### createURI

    public URINode createURI(java.lang.String uri)

  Create a resource node with a URI label but do not modify the triple store.

  Parameters:
    `uri` -
  Returns:
    a URINode instance

### addURI

    public URINode addURI(java.lang.String uri)
                   throws AllegroGraphException

  Create a resource node with a URI label and add the resource to the triple store registry.

  Parameters:
    `uri` -
  Returns:
    a Node instance.
  Throws:
    `AllegroGraphException` - if the creation fails.

### addURIIds

    public UPI[] addURIIds(java.lang.String[] uri)
                    throws AllegroGraphException

  Create a set of resource nodes in the triple store registry.

  Parameters:
    `uri` - An array of URI strings.
  Returns:
    an array of UPIs for the new nodes.
  Throws:
    `AllegroGraphException`

### addURIs

    public URINode[] addURIs(java.lang.String[] uri)
                      throws AllegroGraphException

  Create a set of resource Node instances and add the resources to the triple store registry.

  Parameters:
    `uri` - An array of URI strings.
  Returns:
    an array of Node instances.
  Throws:
    `AllegroGraphException`

### createURI

    public 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.

  Returns:
    a URINode instance
  Throws:
    `java.lang.IllegalStateException` - if the creation fails.

### getStatements

    public TriplesIterator getStatements(java.lang.Object subject,
                                         java.lang.Object predicate,
                                         java.lang.Object object)
                                  throws AllegroGraphException

  Retrieve null context statements from the triple store.

  Returns:
    a TriplesIterator instance
  Throws:
    `AllegroGraphException` - if there is a problem.

### getStatements

    public TriplesIterator getStatements(boolean includeInferred,
                                         java.lang.Object subject,
                                         java.lang.Object predicate,
                                         java.lang.Object object)
                                  throws AllegroGraphException

  Retrieve null context statements from the triple store.

  Parameters:
    `includeInferred` - if true, include inferred triples in the result. If false, return only triples that are actually present in the triple store.
  Returns:
    a TriplesIterator instance
  Throws:
    `AllegroGraphException` - if there is a problem.

### getStatements

    public TriplesIterator getStatements(java.lang.Object subject,
                                         java.lang.Object predicate,
                                         java.lang.Object object,
                                         java.lang.Object context)
                                  throws AllegroGraphException

  Retrieve statements from the triple store .

  Returns:
    a TriplesIterator instance
  Throws:
    `AllegroGraphException` - if there is a problem.

### getStatements

    public TriplesIterator getStatements(boolean includeInferred,
                                         java.lang.Object subject,
                                         java.lang.Object predicate,
                                         java.lang.Object object,
                                         java.lang.Object context)
                                  throws AllegroGraphException

  Retrieve statements from the triple store.

  Parameters:
    `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.
  Returns:
    a TriplesIterator instance
  Throws:
    `AllegroGraphException` - if there is a problem.

### getStatements

    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

  Retrieve statements from the triple store and specify a range of values for the object and/or context components of the triples.

  Parameters:
    `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.
  Returns:
    a TriplesIterator instance
  Throws:
    `AllegroGraphException` - if there is a problem.

### getStatements

    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

  Retrieve statements from the triple store and specify a range of values for the object and/or context components of the triples.

  Parameters:
    `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.
  Returns:
    a TriplesIterator instance
  Throws:
    `AllegroGraphException` - if there is a problem.

### getStatements

    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

  Retrieve statements from the triple store and specify a range of values for any of the components of the triples. See also `getStatements(boolean, Object, Object, Object, Object, Object, Object)`

  Parameters:
    `includeInferred` -
    `subject` -
    `subEnd` -
    `predicate` -
    `predEnd` -
    `object` -
    `obEnd` -
    `context` -
    `contextEnd` -
  Returns:
    an iterator that delivers all the triples found
  Throws:
    `AllegroGraphException`

### hasStatement

    public boolean hasStatement(java.lang.Object subject,
                                java.lang.Object predicate,
                                java.lang.Object object)
                         throws AllegroGraphException

  Find out if null-context statements matching the arguments are in the triple store.

  Throws:
    `AllegroGraphException`

### hasStatement

    public boolean hasStatement(boolean includeInferred,
                                java.lang.Object subject,
                                java.lang.Object predicate,
                                java.lang.Object object)
                         throws AllegroGraphException

  Find out if null-context statements matching the arguments are in the triple store.

  Parameters:
    `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.
  Throws:
    `AllegroGraphException`

### hasStatement

    public boolean hasStatement(java.lang.Object subject,
                                java.lang.Object predicate,
                                java.lang.Object object,
                                java.lang.Object context)
                         throws AllegroGraphException

  Find out if any statements matching the arguments are in the triple store.

  Throws:
    `AllegroGraphException`

### hasStatement

    public boolean hasStatement(boolean includeInferred,
                                java.lang.Object subject,
                                java.lang.Object predicate,
                                java.lang.Object object,
                                java.lang.Object context)
                         throws AllegroGraphException

  Find out if any statements matching the arguments are in the triple store.

  Parameters:
    `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.
  Throws:
    `AllegroGraphException`

### addStatement

    public void addStatement(java.lang.Object subject,
                             java.lang.Object predicate,
                             java.lang.Object object)
                      throws AllegroGraphException

  Add a Statement in the null context to the triple store.

  Throws:
    `AllegroGraphException`

### addStatement

    public void addStatement(java.lang.Object subject,
                             java.lang.Object predicate,
                             java.lang.Object object,
                             java.lang.Object context)
                      throws AllegroGraphException

  Add a Statement to the triple store.

  Throws:
    `AllegroGraphException`

### addStatements

    public void addStatements(java.lang.Object subject,
                              java.lang.Object predicate,
                              java.lang.Object object)
                       throws AllegroGraphException

  Add several null context Statements to the triple store.

  Parameters:
    `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.

  Throws:
    `AllegroGraphException`

### addStatements

    public void addStatements(java.lang.Object subject,
                              java.lang.Object predicate,
                              java.lang.Object object,
                              java.lang.Object contexts)
                       throws AllegroGraphException

  Add several Statements to the triple store.

  Parameters:
    `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.

  Throws:
    `AllegroGraphException`

### clear

    public long clear()
               throws AllegroGraphException

  Delete all the statements in the triple store (one-by-one).

  Returns:
    The number of triples deleted.
  Throws:
    `AllegroGraphException`

### createLiteral

    public LiteralNode createLiteral(boolean value)

  Create a typed LiteralNode instance from a Java boolean value but do not modify the triple store.

  Returns:
    a LiteralNode instance.

    The LiteralNode instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(boolean value)
                           throws AllegroGraphException

  Create a typed LiteralNode instance from a Java boolean value and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode
  Throws:
    `AllegroGraphException`

### createLiteral

    public LiteralNode createLiteral(long value)

  Create a typed LiteralNode instance from a Java long value but do not modify the triple store.

  Returns:
    a LiteralNode instance.

    The LiteralNode instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(long value)
                           throws AllegroGraphException

  Create a typed LiteralNode instance from a Java long value and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode
  Throws:
    `AllegroGraphException`

### createLiteral

    public LiteralNode createLiteral(int value)

  Create a typed LiteralNode instance from a Java int value but do not modify the triple store.

  Returns:
    a LiteralNode

    The literal instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(int value)
                           throws AllegroGraphException

  Create a typed LiteralNode instance from a Java int value and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode
  Throws:
    `AllegroGraphException`

### createLiteral

    public LiteralNode createLiteral(short value)

  Create a typed LiteralNode instance from a Java short value but do not modify the triple store.

  Returns:
    a LiteralNode instance.

    The LiteralNode instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(short value)
                           throws AllegroGraphException

  Create a typed LiteralNode instance from a Java short value and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode instance.
  Throws:
    `AllegroGraphException`

### createLiteral

    public LiteralNode createLiteral(byte value)

  Create a typed LiteralNode instance from a Java byte value but do not modify the triple store.

  Returns:
    a LiteralNode instance.

    The LiteralNode instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(byte value)
                           throws AllegroGraphException

  Create a typed LiteralNode instance from a Java byte value and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode
  Throws:
    `AllegroGraphException`

### createLiteral

    public LiteralNode createLiteral(double value)

  Create a typed LiteralNode instance from a Java double value but do not modify the triple store.

  Returns:
    a LiteralNode instance

    The LiteralNode instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(double value)
                           throws AllegroGraphException

  Create a typed LiteralNode instance from a Java double value and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode
  Throws:
    `AllegroGraphException`

### createLiteral

    public LiteralNode createLiteral(float value)

  Create a typed LiteralNode instance from a Java float value but do not modify the triple store.

  Returns:
    a LiteralNode instance.

    The LiteralNode instance will have a null UPI.

### addLiteral

    public LiteralNode addLiteral(float value)
                           throws AllegroGraphException

  Create a typed LiteralNode instance from a Java float value and add the LiteralNode to the triple store registry.

  Returns:
    a LiteralNode
  Throws:
    `AllegroGraphException`

### createStatement

    public Triple createStatement(ResourceNode subject,
                                  URINode predicate,
                                  ValueNode object,
                                  ResourceNode context)

  Create a Triple instance but do not update the triple store.

  Returns:
    a Triple instance.

### newTriple

    public Triple newTriple(java.lang.Object s,
                            java.lang.Object p,
                            java.lang.Object o)
                     throws AllegroGraphException

  Add a new triple to the triple store.

  Parameters:
    `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.
  Returns:
    a Triple instance for the new triple. All the string arguments must be in Ntriples syntax.
  Throws:
    `AllegroGraphException`

### newTripleId

    public long newTripleId(java.lang.Object s,
                            java.lang.Object p,
                            java.lang.Object o)
                     throws AllegroGraphException

  Add a new triple to the triple store.

  Parameters:
    `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.
  Returns:
    the integer id of the new triple
  Throws:
    `AllegroGraphException`

### newTriple

    public Triple newTriple(java.lang.Object s,
                            java.lang.Object p,
                            java.lang.Object o,
                            java.lang.Object c)
                     throws AllegroGraphException

  Add a new triple to the triple store.

  Parameters:
    `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.
  Returns:
    a Triple instance for the new triple. All the string arguments must be in Ntriples syntax.
  Throws:
    `AllegroGraphException`

### newTripleId

    public long newTripleId(java.lang.Object s,
                            java.lang.Object p,
                            java.lang.Object o,
                            java.lang.Object c)
                     throws AllegroGraphException

  Add a new triple to the triple store.

  Parameters:
    `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.
  Returns:
    the integer id of the new triple
  Throws:
    `AllegroGraphException`

### newTriples

    public Triple[] newTriples(java.lang.Object s,
                               java.lang.Object p,
                               java.lang.Object o)
                        throws AllegroGraphException

  Add new triples to the triple store.

  Parameters:
    `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.
  Returns:
    an array of Triple instances. All the string arguments must be in Ntriples syntax.

    The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.

  Throws:
    `AllegroGraphException`

### newTriples

    public Triple[] newTriples(java.lang.Object s,
                               java.lang.Object p,
                               java.lang.Object o,
                               java.lang.Object c)
                        throws AllegroGraphException

  Add new triples to the triple store.

  Parameters:
    `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.
  Returns:
    an array of Triple instances. All the string arguments must be in Ntriples syntax.

    The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.

  Throws:
    `AllegroGraphException`

### newTripleIds

    public long[] newTripleIds(java.lang.Object s,
                               java.lang.Object p,
                               java.lang.Object o)
                        throws AllegroGraphException

  Add new triples to the triple store.

  Parameters:
    `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.
  Returns:
    an array of Triple id integers

    The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.

  Throws:
    `AllegroGraphException`

### newTripleIds

    public long[] newTripleIds(java.lang.Object s,
                               java.lang.Object p,
                               java.lang.Object o,
                               java.lang.Object c)
                        throws AllegroGraphException

  Add new triples to the triple store.

  Parameters:
    `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.
  Returns:
    an array of Triple id integers

    The number of triples added is determined by the longest array argument. The last element in short arrays is extended to the required length.

  Throws:
    `AllegroGraphException`

### removeStatements

    public long removeStatements(java.lang.Object s,
                                 java.lang.Object p,
                                 java.lang.Object o)
                          throws AllegroGraphException

  Remove all statement that match a pattern in the bull context of the triple store.

  Parameters:
    `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.

  Returns:
    The number of triples deleted.
  Throws:
    `AllegroGraphException`

### removeStatements

    public long removeStatements(java.lang.Object s,
                                 java.lang.Object p,
                                 java.lang.Object o,
                                 java.lang.Object c)
                          throws AllegroGraphException

  Remove all statement that match a pattern from the triple store.

  Parameters:
    `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.

  Returns:
    The number of triples deleted.
  Throws:
    `AllegroGraphException`

### createBNodeIds

    public UPI[] createBNodeIds(int n)
                         throws AllegroGraphException

  Allocate a set of BlankNode ID numbers.

  Parameters:
    `n` - the number of nodes to allocate.
  Returns:
    an array of intege ID numbers
  Throws:
    `AllegroGraphException` - if there is a problem during creation.

### removeStatement

    public long removeStatement(java.lang.Object s,
                                java.lang.Object p,
                                java.lang.Object o)
                         throws AllegroGraphException

  Remove one null-context statement from the triple store.

  Parameters:
    `s` - A Resource, a string in triples format, or a UPI
    `p` - A Node, a string in triples format, or a UPI
    `o` - A Value, a string in triples format, or a UPI
  Returns:
    The number of triples deleted (ie 0 or 1).
  Throws:
    `AllegroGraphException`

### removeStatement

    public long removeStatement(java.lang.Object s,
                                java.lang.Object p,
                                java.lang.Object o,
                                java.lang.Object c)
                         throws AllegroGraphException

  Remove one statement from the triple store.

  Parameters:
    `s` - the subject of the Statement in question
    `p` - the predicate of the Statement in question
    `o` - the object of the Statement in question
    `c` - 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).

  Returns:
    The number of triples deleted (ie 0 or 1).
  Throws:
    `AllegroGraphException`

### addLiteralIds

    public UPI[] addLiteralIds(java.lang.String[] values,
                               java.lang.String[] datatypes,
                               java.lang.String[] languages)
                        throws AllegroGraphException

  Add a set of literal instances to the triple store registry.

  Parameters:
    `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.

  Returns:
    an array of UPIs for the new literals.
  Throws:
    `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.

### getFreetextUniqueSubjects

    public ValueSetIterator getFreetextUniqueSubjects(java.lang.String pattern)
                                               throws AllegroGraphException

  Collect the unique subjects from triples that match a text pattern. Search the triple store for triples where the object was indexed as freetext and the text matches the specified pattern.

  Parameters:
    `pattern` - A text pattern as described in `getFreetextStatements(String)`
  Returns:
    An iterator that will generate all the subjects. Each result set is a single subject.
  Throws:
    `AllegroGraphException`

### getFreetextStatements

    public TriplesIterator getFreetextStatements(java.lang.String pattern)
                                          throws AllegroGraphException

  Find triples that match a text pattern. Search the triple store for triples where the object was indexed as freetext and the text matches the specified pattern.

  Parameters:
    `pattern` - A text pattern as described below.
  Returns:
    A TriplesIterator instance that iterates over the results.
  Throws:
    `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

### getFreetextPredicates

    public java.lang.String[] getFreetextPredicates()
                                             throws AllegroGraphException

  Retrieve the URI labels of the registered freetext predicates.

  Returns:
    an array of strings - these are the URI labels of the registered predicates.
  Throws:
    `AllegroGraphException`

### registerFreetextPredicate

    public void registerFreetextPredicate(java.lang.Object predicate)
                                   throws AllegroGraphException

  Register a predicate for free text indexing. The text in literal objects of triples with registered predicates are indexed so that they can be searched with text patterns with `getFreetextStatements(String)` or with `getFreetextUniqueSubjects(String)`. Free text indexing predicates must be registered before any triples are added to the triple store.

  Parameters:
    `predicate` - The predicate may be specified as a string in Ntriples syntax or !-notation, a UPI instance, or a URI instance.
  Throws:
    `AllegroGraphException`

### createStatement

    public Triple createStatement(ResourceNode subject,
                                  URINode predicate,
                                  ValueNode object)

  Create a Null Context Statement instance but do not update the triple store.

  Returns:
    a Triple instance.

### getUnmergedCount

    public int getUnmergedCount()
                         throws AllegroGraphException

  Query the number of unmerged index chunks in the triple store. The indexTriples() method builds a new index chunk each time it is called. It takes less time to build a partial index, but when too many index chunks are present, query performance suffers. The indexAll() method builds a single unified index for the entire triple store.

  Returns:
    the number of index chunks in the triple store.
  Throws:
    `AllegroGraphException`

### getUnindexedTripleCount

    public int getUnindexedTripleCount()
                                throws AllegroGraphException

  Query the number of unindexed triples in the triple store. Indexed triples can be searched more efficiently.

  Returns:
    the number of unindexed triples in the triple store.
  Throws:
    `AllegroGraphException`

### getUnindexedThreshold

    public int getUnindexedThreshold()
                              throws AllegroGraphException

  Query the threshold for automatic indexing of the triple store. The built-in default value is zero to suppress automatic indexing.

  Returns:
    the integer value of the threshold for automatic indexing of the triple store.
  Throws:
    `AllegroGraphException`

### setUnindexedThreshold

    public void setUnindexedThreshold(int val)
                               throws AllegroGraphException

  Set the threshold for automatic indexing of the triple store. When the number of unindexed triples in the triple store exceeds this number, then the new triples are automatically indexed into a new index chunk. A value of zero suppresses automatic indexing.

  Parameters:
    `val` - The new value for this parameter.
  Throws:
    `AllegroGraphException`

### getUnmergedThreshold

    public int getUnmergedThreshold()
                             throws AllegroGraphException

  Query the threshold for automatic re-indexing of the triple store. The built-in default value is zero to suppress automatic re-indexing.

  Returns:
    the integer value of the threshold for automatic re-indexing of the triple store.
  Throws:
    `AllegroGraphException`

### setUnmergedThreshold

    public void setUnmergedThreshold(int val)
                              throws AllegroGraphException

  Set the threshold for automatic re-indexing of the triple store. When the number of index chunks in the triple store exceeds this number, then the new triples are automatically re-indexed into a new single unified index. A value of zero suppresses automatic re-indexing.

  Parameters:
    `val` - The new value for this parameter.
  Throws:
    `AllegroGraphException`

### getIndexFlavors

    public java.lang.String[] getIndexFlavors()
                                       throws AllegroGraphException

  Query the range of indexing that is applied to this triple store.

  Returns:
    an array of strings that describe the indexing flavors.
  Throws:
    `AllegroGraphException`

### setIndexFlavors

    public void setIndexFlavors(java.lang.String[] flavors)
                         throws AllegroGraphException

  Replace the set of indexing flavors in the triple store. The changes take effect the next time an indexing operation is initiated.

  Parameters:
    `flavors` - An array of strings specifying the desired indexing flavors. Any existing flavors are discarded. Each string is a permutation of the letters "spog".
  Throws:
    `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.

### addIndexFlavors

    public void addIndexFlavors(java.lang.String[] flavors)
                         throws AllegroGraphException

  Add some index flavors to the triple store. The changes take effect the next time an indexing operation is initiated.

  Parameters:
    `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".
  Throws:
    `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.

### dropIndexFlavors

    public void dropIndexFlavors(java.lang.String[] flavors)
                          throws AllegroGraphException

  Delete some indexing flavors from the triple store. The changes take effect the next time an indexing operation is initiated.

  Parameters:
    `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".
  Throws:
    `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.

### addDataMapping

    public void addDataMapping(java.lang.String[] map)
                        throws AllegroGraphException

  Add to the table of datatype and property mappings in the triple store. These mappings are in effect only during bulk loading with loadNtriple() loadNtriples() or loadRDFXML(). Data converted to internal data types can be queried with range queries.

  Parameters:
    `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.

  Throws:
    `AllegroGraphException`

### setDataMapping

    public void setDataMapping(java.lang.String[] map)
                        throws AllegroGraphException

  Replace the current table of datatype and property mappings in the triple store. These mappings are in effect only during bulk loading with loadNtriples().

  Parameters:
    `map` - An array of strings similar to the array returned by getDataMapping(). See also `addDataMapping(String[])` and `getDataMapping()`.
  Throws:
    `AllegroGraphException`

### getDataMapping

    public java.lang.String[] getDataMapping()
                                      throws AllegroGraphException

  Query the current table of datatype and property mappings in the triple store. These mappings are in effect only during bulk loading with loadNtriple() loadNtriples() or loadRDFXML().

  Returns:
    An array of strings that describe the mappings. The length of the array is a multiple of 3. The contents of the array is a sequence of strings u1, d1, k1, u2, d2, k2, ... where ui is a URI string that identifies a predicate or Schema type, di is a string that identifies an internal AllegroGraph data type of the mapped value, and ki is the string "predicate" or "datatype" to identify the kind of mapping.
  Throws:
    `AllegroGraphException` - See also `addDataMapping(String[])`.

### evalInServer

    public java.lang.Object[] evalInServer(java.lang.String expression)
                                    throws AllegroGraphException

  Evaluate a Lisp expression in the AllegroGraph server. During the evaluation, the default triple store is the one associated with this AllegroGraph instance. The access to this triple store will be through the same interlocks used by other client operations.

  Parameters:
    `expression` - The expression.
  Returns:
    An array of values returned by the call.
  Throws:
    `AllegroGraphException` -

    The proper usage of this method is fully described in
    `AllegroGraphConnection.evalInServer(String)`.

### serverTrace

    public int serverTrace(boolean onoff)

  Change the trace state in the AllegroGraph server.

  Parameters:
    `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.

  Returns:
    -1 if the call failed for some reason, 0 otherwise.

### serverTrace

    public int serverTrace(java.lang.String outFile)

  Start tracing calls from Java in the AllegroGraph server.

  Parameters:
    `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.

  Returns:
    -1 if the call failed for some reason, 0 otherwise.

### getNamespaces

    public java.lang.String[] getNamespaces()

  Query the namespace definitions specific to this triple store. The definitions are not persistent, and apply only to this AllegroGraph instance.

  Returns:
    An array of strings. The even numbered elements are prefixes and the following odd numbered element is the full namespace text.

### getNamespaceRegistry

    public NamespaceRegistry getNamespaceRegistry()

  Query the namespace definitions specific to this triple store. The definitions are not persistent, and apply only to this AllegroGraph instance.

  Returns:
    the current definitions.

### registerNamespace

    public void registerNamespace(java.lang.String prefix,
                                  java.lang.String full)
                           throws AllegroGraphException

  Register one namespace definition for this triple store. The new definition overrides an existing definition.

  Parameters:
    `prefix` - the prefix
    `full` - The full namespace text. If the full text is null or "", then the prefix is removed from the table.
  Throws:
    `AllegroGraphException`

### registerNamespaces

    public void registerNamespaces(java.lang.String[] defs)
                            throws AllegroGraphException

  Register several namespace definitions for this triple store. The new definitions overrides any existing definitions.

  Parameters:
    `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.
  Throws:
    `AllegroGraphException`

### registerNamespaces

    public void registerNamespaces(NamespaceRegistry ns)
                            throws AllegroGraphException

  Register several namespace definitions for this triple store. The new definitions overrides any existing definitions.

  Parameters:
    `ns` - the new definitions.
  Throws:
    `AllegroGraphException`

### setNamespaceRegistry

    public void setNamespaceRegistry(NamespaceRegistry ns)
                              throws AllegroGraphException

  Register several namespace definitions for this triple store. The new definitions replace any existing definitions entirely.

  Parameters:
    `ns` - the new definitions.
  Throws:
    `AllegroGraphException`

### setNamespaceRegistry

    public void setNamespaceRegistry()
                              throws AllegroGraphException

  Reset the namespace definition in this AllefroGraph instance to the initial default.

  Throws:
    `AllegroGraphException`

### addPart

    public ValueNode addPart(java.lang.String part)
                      throws AllegroGraphException

  Add a Literal, Node or BlankNode to the triple store.

  Parameters:
    `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.

  Returns:
    a ValueObject instance that represents the data.
  Throws:
    `AllegroGraphException`

### getStores

    public AllegroGraph[] getStores()
                             throws AllegroGraphException

  Retrieve the components of a federated triple store.

  Returns:
    null if this is not a federated triple store; otherwise, return an array of the component stores. The result array is composed of new AllegroGraph instances, one for each component.
  Throws:
    `AllegroGraphException`

### getSyncEveryTime

    public boolean getSyncEveryTime()

  Query the synchronization mode for this AllegroGraph instance.

  Returns:
    true if this AllegroGraph instance is configured to synchronize automatically after every update call from Java. Return false if it the responsibility of the application to synchronize.

### setSyncEveryTime

    public void setSyncEveryTime(boolean s)

  Set the synchronization mode for this AllegroGraph instance. By default, each addStatement() or addStatements() call triggers a synchronization to update the persistent store. Some applications can save time by synchronizing explicitly at suitable times.

  Parameters:
    `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.

### toString

    public java.lang.String toString()

  Display some details about the AllegroGraph instance.

### getSNAExtension

    public SNAExtension getSNAExtension()

  Get the SNAExtension instance of this AllegroGraph instance.

  Returns:
    the `SNAExtension` instance

### getGeoExtension

    public GeoExtension getGeoExtension()

  Get the GeoExtension instance of this AllegroGraph instance.

  Returns:
    the `GeoExtension` instance

### isSPOGICacheEnabled

    public boolean isSPOGICacheEnabled()
                                throws AllegroGraphException

  Query the state of SPOGI caching in this triple store.

  Returns:
    true if caching is enabled.
  Throws:
    `AllegroGraphException`

### setSPOGICacheEnabled

    public void setSPOGICacheEnabled(boolean onoff)
                              throws AllegroGraphException

  Modify the state of SPOGI caching in this triple store.

  Parameters:
    `onoff` - if true, enable caching; if false, disable.
  Throws:
    `AllegroGraphException` -

    Note: This state is visible to and affects all applications and all users connected to this triple store.

### getSPOGICacheSize

    public long getSPOGICacheSize()
                           throws AllegroGraphException

  Query the size of the SPOGI cache on this triple store.

  Returns:
    the size of the cache.
  Throws:
    `AllegroGraphException`

### setSPOGICacheSize

    public void setSPOGICacheSize(long size)
                           throws AllegroGraphException

  Modify the size of the SPOGI cache on this triple store.

  Parameters:
    `size` - must be positive.
  Throws:
    `AllegroGraphException` -

    Note: This value is visible to and affects all applications and all users connected to this triple store.

### getUPIMapDirectory

    public java.lang.String getUPIMapDirectory()
                                        throws AllegroGraphException

  Query the directory where AllegroGraph will search for UPI maps for this triple-store.

  Returns:
    a string containing the pathname of the directory, or null if this property is not set.
  Throws:
    `AllegroGraphException`

### setUPIMapDirectory

    public void setUPIMapDirectory(java.lang.String dir)
                            throws AllegroGraphException

  Specify a directory where AllegroGraph will search for UPI maps for this triple-store. A non-null value can be used to allow maps to be created for a read-only triple store.

  Parameters:
    `dir` - a string containing the pathname of the directory where the maps will be stored, or null to look in the triple store directory.
  Throws:
    `AllegroGraphException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD