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 top-level class for interacting with an AllegroGraph server.


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()
           
 AGVirtualRepository federate(AGAbstractRepository... 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.
 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)
           
 
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.

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)

federate

public AGVirtualRepository federate(AGAbstractRepository... repositories)

close

public void close()
Specified by:
close in interface Closeable

Copyright © 2008-2010 Franz Inc.