Franz Inc, AllegroGraph

com.franz.agraph.repository
Class AGServer

java.lang.Object
  extended by com.franz.agraph.repository.AGServer
All Implemented Interfaces:
Closeable

public class AGServer
extends Object
implements Closeable

The starting point for interacting with an AllegroGraph server. An AGServer references AGCatalogs, which reference AGRepositories, from which connections may be obtained, on which data is manipulated and queried. AGServer also provides federated repositories.


Constructor Summary
AGServer(String serverURL, String username, String password)
          Creates an AGServer instance for interacting with an AllegroGraph server at serverURL.
 
Method Summary
 void close()
          Close the HTTP connection resources to the AllegroGraph server.
 AGVirtualRepository federate(AGAbstractRepository... repositories)
          Create a federated view of multiple repositories.
 String getBuildDate()
          Returns the server's build date.
 AGCatalog getCatalog()
          Returns the unnamed root catalog for this AllegroGraph server.
 AGCatalog getCatalog(String catalogID)
          Gets the catalog instance for a given catalog id.
 com.franz.agraph.http.AGHTTPClient getHTTPClient()
           
 String getRevision()
          Returns the server's revision info.
 AGCatalog getRootCatalog()
          Returns the unnamed root catalog for this AllegroGraph server.
 String getServerURL()
          Returns the URL of this AllegroGraph server.
 String getVersion()
          Returns the server version.
 List<String> listCatalogs()
          Returns a List of catalog ids known to this AllegroGraph server.
 AGVirtualRepository virtualRepository(String spec)
          Used by AllegroGraph Jena implementation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AGServer

public AGServer(String serverURL,
                String username,
                String password)
Creates an AGServer instance for interacting with an AllegroGraph server at serverURL.

Parameters:
serverURL - the URL of the server.
username - a user id for authenticating with the server
password - a password for authenticating with the server
Method Detail

getServerURL

public String getServerURL()
Returns the URL of this AllegroGraph server.

Returns:
the URL of this AllegroGraph server.

getHTTPClient

public com.franz.agraph.http.AGHTTPClient getHTTPClient()

getVersion

public String getVersion()
                  throws com.franz.agraph.http.AGHttpException
Returns the server version.

Throws:
com.franz.agraph.http.AGHttpException

getBuildDate

public String getBuildDate()
                    throws com.franz.agraph.http.AGHttpException
Returns the server's build date.

Throws:
com.franz.agraph.http.AGHttpException

getRevision

public String getRevision()
                   throws com.franz.agraph.http.AGHttpException
Returns the server's revision info.

Throws:
com.franz.agraph.http.AGHttpException

getRootCatalog

public AGCatalog getRootCatalog()
Returns the unnamed root catalog for this AllegroGraph server. Note: this method may be deprecated in an upcoming release.

Returns:
the root catalog.
See Also:
getCatalog()

listCatalogs

public List<String> listCatalogs()
                          throws OpenRDFException
Returns a List of catalog ids known to this AllegroGraph server.

Returns:
List of catalog ids.
Throws:
OpenRDFException

getCatalog

public AGCatalog getCatalog(String catalogID)
Gets the catalog instance for a given catalog id. Returns the root catalog if the id is a root id.

Parameters:
catalogID - a catalog id.
Returns:
the corresponding catalog instance.

getCatalog

public AGCatalog getCatalog()
Returns the unnamed root catalog for this AllegroGraph server.

Returns:
the root catalog.

virtualRepository

public AGVirtualRepository virtualRepository(String spec)
Used by AllegroGraph Jena implementation.


federate

public AGVirtualRepository federate(AGAbstractRepository... repositories)
Create a federated view of multiple repositories. See Managing Massive Data - Federation.

Returns:
a virtual repository that federates queries across multiple physical repositories

close

public void close()
Close the HTTP connection resources to the AllegroGraph server.

Specified by:
close in interface Closeable
See Also:
Closeable.close()

Copyright © 2008-2011 Franz Inc.