gov.llnl.babel.repository
Class WebRepository
java.lang.Object
gov.llnl.babel.repository.WebRepository
- Repository, SymbolResolver, SymbolWriter
public class WebRepository
extends java.lang.Object
The WebRepository
class implements an interface to the
Alexandria web repository for sidl symbols in XML. The URI in the class
constructor points to the Alexandria database and must use either the
HTTP or HTTPS (if supported by the JVM) protocols. The username and
password of the account must be passed as arguments in the URI as
follows: https://www.machine.org?username=USERNAME&password=PASSWORD.
WebRepository(String repository, Context context) - The constructor takes a web repository URI with the username and
password specified as arguments.
|
Symbol | lookupSymbol(String fqn) - Look up a symbol based on the fully qualified name and retrieve the
most recent version that matches the symbol name.
|
Symbol | lookupSymbol(SymbolID id) - Look up the symbol based on the fully qualified name and version in
the web repository.
|
void | writeSymbols(Set symbol_names) - Write the symbols in the
Set from the symbol table to
the web repository.
|
WebRepository
public WebRepository(String repository,
Context context)
throws RepositoryException
The constructor takes a web repository URI with the username and
password specified as arguments.
lookupSymbol
public Symbol lookupSymbol(String fqn)
Look up a symbol based on the fully qualified name and retrieve the
most recent version that matches the symbol name. If the symbol name
is not found or the XML file is invalid, then null is returned.
- lookupSymbol in interface SymbolResolver
lookupSymbol
public Symbol lookupSymbol(SymbolID id)
Look up the symbol based on the fully qualified name and version in
the web repository. If the symbol name is not found, the versions
do not match, or there is a problem with the XML format, then null
is returned.
- lookupSymbol in interface SymbolResolver
writeSymbols
public void writeSymbols(Set symbol_names)
throws RepositoryException
Write the symbols in the Set
from the symbol table to
the web repository. Each set entry is a SymbolID
of
the symbol to be written.
- writeSymbols in interface SymbolWriter