|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.repository.FileRepository
public class FileRepository
The FileRepository
class implements a simple repository
for sidl symbols using XML files stored in a single root directory.
Each symbol is mapped to a file in that directory of the generic form
NAME-vVERSION.xml, where NAME and VERSION are taken from the symbol
identifier. This class does not cache the symbols in the file repository
directory because external writers may change the repository.
Constructor Summary | |
---|---|
FileRepository(java.lang.String repository,
Context context)
The constructor takes a file directory path to the repository. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.util.Set |
getAllSymbols()
Retrieve all symbols currently in the repository. |
Symbol |
lookupSymbol(java.lang.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 file repository. |
void |
writeSymbols(java.util.Set symbol_names)
Write the symbols in the Set from the symbol table to
the file repository. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileRepository(java.lang.String repository, Context context) throws RepositoryException
RepositoryException
Method Detail |
---|
public Symbol lookupSymbol(SymbolID id)
lookupSymbol
in interface SymbolResolver
public Symbol lookupSymbol(java.lang.String fqn)
lookupSymbol
in interface SymbolResolver
public java.util.Set getAllSymbols()
Set
in which each set element is an object
of type SymbolID
. The return argument will not be null
but may contain no objects.
public void writeSymbols(java.util.Set symbol_names) throws RepositoryException
Set
from the symbol table to
the file repository. Each set entry is a SymbolID
of
the symbol to be written.
writeSymbols
in interface SymbolWriter
RepositoryException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |