org.openrdf.sesame.config
Class RepositoryListImpl

java.lang.Object
  extended byorg.openrdf.sesame.config.RepositoryListImpl
All Implemented Interfaces:
RepositoryList

public class RepositoryListImpl
extends Object
implements RepositoryList

A list for repository information. This list is provided for those who do not want to use the streaming approach provided by the RepositoryListListener. The RepositoryListBuilder can be used to build the lists.

See Also:
RepositoryListBuilder

Constructor Summary
RepositoryListImpl()
          Creates a new and empty RepositoryListImpl.
RepositoryListImpl(List repInfoList)
          Creates a new RepositoryListImpl that is initialized with the RepositoryInfo objects from the supplied list.
 
Method Summary
 void addRepository(RepositoryInfo repInfo)
          Adds info about a repository to this list.
 void addRepository(String id, String title, boolean readable, boolean writeable)
          Adds info about a repository to this list.
 List getReadableRepositories()
          Gets a list of the repositories that are marked as being readable.
 List getReadWriteRepositories()
          Gets a list of the repositories that are marked as being both readable and writable.
 List getRepositories()
          Gets a list of RepositoryInfo objects containing info about all available repositories.
 RepositoryInfo getRepository(String repositoryId)
          Gets the information about the repository with the specified ID.
 int getRepositoryCount()
          Gets the number of repositories in this list.
 List getWritableRepositories()
          Gets a list of the repositories that are marked as being writable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryListImpl

public RepositoryListImpl()
Creates a new and empty RepositoryListImpl.


RepositoryListImpl

public RepositoryListImpl(List repInfoList)
Creates a new RepositoryListImpl that is initialized with the RepositoryInfo objects from the supplied list.

Parameters:
repInfoList - A List containing RepositoryInfo objects.
Method Detail

getRepositoryCount

public int getRepositoryCount()
Gets the number of repositories in this list.

Specified by:
getRepositoryCount in interface RepositoryList

getRepositories

public List getRepositories()
Gets a list of RepositoryInfo objects containing info about all available repositories.

Specified by:
getRepositories in interface RepositoryList
Returns:
A List of RepositoryInfo objects.
See Also:
RepositoryInfo

getReadableRepositories

public List getReadableRepositories()
Gets a list of the repositories that are marked as being readable.

Specified by:
getReadableRepositories in interface RepositoryList
Returns:
A List of RepositoryInfo objects.
See Also:
RepositoryInfo

getWritableRepositories

public List getWritableRepositories()
Gets a list of the repositories that are marked as being writable.

Specified by:
getWritableRepositories in interface RepositoryList
Returns:
A List of RepositoryInfo objects.
See Also:
RepositoryInfo

getReadWriteRepositories

public List getReadWriteRepositories()
Gets a list of the repositories that are marked as being both readable and writable.

Specified by:
getReadWriteRepositories in interface RepositoryList
Returns:
A List of RepositoryInfo objects.
See Also:
RepositoryInfo

getRepository

public RepositoryInfo getRepository(String repositoryId)
Gets the information about the repository with the specified ID.

Specified by:
getRepository in interface RepositoryList
Returns:
A RepositoryInfo object describing the requested repository, or null if no such repository is in this list.

addRepository

public void addRepository(String id,
                          String title,
                          boolean readable,
                          boolean writeable)
Adds info about a repository to this list.

Specified by:
addRepository in interface RepositoryList
Parameters:
id - The repository's ID.
title - The repository's title.
readable - Flag indicating whether the repository is readable.
writeable - Flag indicating whether the repository is writeable.

addRepository

public void addRepository(RepositoryInfo repInfo)
Adds info about a repository to this list.

Specified by:
addRepository in interface RepositoryList
Parameters:
repInfo - A RepositoryInfo object.


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.