public class AGCatalog extends Object
Catalogs are created by the catalog server configuration.
A catalog is a grouping of repositories. The root catalog is the default, unnamed catalog that is available with every server. It is also possible to create any number of named catalogs.
AGServer.getCatalog(String)
Modifier and Type | Field and Description |
---|---|
static int |
NAMED_CATALOG |
static int |
ROOT_CATALOG |
Constructor and Description |
---|
AGCatalog(AGServer server,
int catalogType)
Creates an AGCatalog instance for a special catalog in the given server,
such as the root catalog.
|
AGCatalog(AGServer server,
String catalogName)
Creates an AGCatalog instance for a named catalog having catalogName
in the given server.
|
Modifier and Type | Method and Description |
---|---|
AGRepository |
createRepository(String repositoryID)
Returns an
uninitialized
AGRepository instance for the given
repository id . |
AGRepository |
createRepository(String repositoryID,
boolean strict)
Returns an
uninitialized
AGRepository instance for the given
repository id . |
void |
deleteRepository(String repositoryID)
Deletes the repository with the given
repository id . |
String |
getCatalogName()
The name of this catalog.
|
int |
getCatalogType()
The type of this catalog.
|
String |
getCatalogURL()
URL of this catalog.
|
com.franz.agraph.http.AGHTTPClient |
getHTTPClient() |
String |
getRepositoriesURL()
URL for accessing the repositories of this catalog.
|
String |
getRepositoryURL(String repositoryID) |
AGServer |
getServer()
The AGServer instance for this catalog.
|
boolean |
hasRepository(String repoId)
Returns true if the repository id is contained in this catalog.
|
static boolean |
isRootID(String catalogID)
Returns true iff the id identifies the root catalog.
|
List<String> |
listRepositories()
Returns a List of repository ids contained in this catalog.
|
AGRepository |
openRepository(String repositoryID)
Returns an uninitialized AGRepository instance for the given
repository id . |
public static final int ROOT_CATALOG
getCatalogType()
,
Constant Field Valuespublic static final int NAMED_CATALOG
getCatalogType()
,
Constant Field Valuespublic AGCatalog(AGServer server, String catalogName)
server
- the server housing this named catalog.catalogName
- the name for this named catalog.AGServer.getCatalog(String)
public AGCatalog(AGServer server, int catalogType)
server
- the server housing the catalog.catalogType
- the type of the special catalog.AGServer.getCatalog()
public AGServer getServer()
public String getCatalogName()
public int getCatalogType()
ROOT_CATALOG
or NAMED_CATALOG
public String getCatalogURL()
public String getRepositoriesURL()
public com.franz.agraph.http.AGHTTPClient getHTTPClient()
public List<String> listRepositories() throws org.openrdf.OpenRDFException
org.openrdf.OpenRDFException
public boolean hasRepository(String repoId) throws org.openrdf.OpenRDFException
org.openrdf.OpenRDFException
public AGRepository createRepository(String repositoryID) throws org.openrdf.repository.RepositoryException
uninitialized
AGRepository instance for the given
repository id
.
The repository is created if it does not exist. If the
repository already exists, it is simply opened.repositoryID
- the id (the name) of the repository.org.openrdf.repository.RepositoryException
createRepository(String, boolean)
public AGRepository createRepository(String repositoryID, boolean strict) throws org.openrdf.repository.RepositoryException
uninitialized
AGRepository instance for the given
repository id
.
The repository is created if it does not exist. If the
repository already exists, it is simply opened, or an exception
is thrown if strict=true.repositoryID
- the id (the name) of the repositorystrict
- if true and the repository already exists, throw an exceptionorg.openrdf.repository.RepositoryException
createRepository(String)
,
listRepositories()
,
openRepository(String)
public AGRepository openRepository(String repositoryID) throws org.openrdf.repository.RepositoryException
repository id
.
If the repository already exists, it is simply opened.repositoryID
- the id (the name) of the repository.org.openrdf.repository.RepositoryException
- if the repositoryID does not existcreateRepository(String, boolean)
public void deleteRepository(String repositoryID) throws org.openrdf.repository.RepositoryException
repository id
.repositoryID
- the name of the repository to delete.org.openrdf.repository.RepositoryException
listRepositories()
public static boolean isRootID(String catalogID)