|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.rubato.base.Repository
public class Repository
A repository of forms and denotators, retrievable by their names. There is a global repository, that should contain all forms and named denotators used troughout the Rubato system.
Method Summary | |
---|---|
ColimitForm |
autogenColimitForm(java.util.ArrayList<Form> factors)
Returns a colimit form with the given factors. |
LimitForm |
autogenLimitForm(java.util.ArrayList<Form> factors)
Returns a limit form with the given factors. |
ListForm |
autogenListForm(Form baseForm)
Returns a list form with the given base form. |
PowerForm |
autogenPowerForm(Form baseForm)
Returns a power form with the given base form. |
SimpleForm |
autogenSimpleForm(Module module)
Returns a simple form with the given module. |
void |
clear()
Removes all content from the repository. |
void |
display()
Prints a tabular representation of the repository on stdout. |
void |
display(java.io.PrintStream out)
Prints a tabular representation of the repository. |
NameEntry |
getCurrentNamespace()
|
Denotator |
getDenotator(NameDenotator name)
Returns denotator with the given name if it exists, otherwise null. |
Denotator |
getDenotator(NameEntry name)
Returns denotator with the given name if it exists, otherwise null. |
Denotator |
getDenotator(java.lang.String name)
Returns denotator with the given name if it exists, otherwise null. |
java.util.List<Denotator> |
getDenotators()
Returns a list of all denotators. |
Form |
getForm(NameDenotator name)
Returns the form with the given name if it exists, otherwise null. |
Form |
getForm(NameEntry name)
Returns the form with the given name if it exists, otherwise null. |
Form |
getForm(java.lang.String name)
Returns the form with the given name if it exists, otherwise null. |
java.util.List<Form> |
getForms()
Returns a list of all forms. |
Module |
getModule(java.lang.String name)
Returns the module for the given name . |
ModuleElement |
getModuleElement(java.lang.String name)
Returns the module element for the given name . |
java.util.List<java.lang.String> |
getModuleElementNames()
|
ModuleMorphism |
getModuleMorphism(java.lang.String name)
Returns the module morphism for the given name . |
java.util.List<java.lang.String> |
getModuleMorphismNames()
|
java.util.List<java.lang.String> |
getModuleMorphismNames(Module domain,
Module codomain)
|
java.util.List<java.lang.String> |
getModuleNames()
|
java.lang.String |
getSchemeCode()
Returns the Scheme code. |
Env |
getSchemeEnvironment()
Returns the system Scheme environment. |
void |
initGlobalRepository()
|
boolean |
isBuiltin(Denotator denotator)
Returns true iff the given denotator is a builtin. |
boolean |
isBuiltin(Form form)
Returns true iff the given form is a builtin. |
boolean |
register(java.util.Collection<Form> formSet,
java.util.Collection<Denotator> denotatorSet)
Registers a collection of forms and a collection of denotators. |
Denotator |
register(Denotator d)
Registers a denotator with repository. |
Form |
register(Form form)
Registers a form with repository. |
Form |
register(Form form,
boolean builtin)
Registers a form. |
Denotator |
registerBuiltin(Denotator denotator)
Registers a denotator as builtin with repository. |
Form |
registerBuiltin(Form form)
Registers a form as builtin with repository. |
void |
registerBuiltinModule(java.lang.String name,
Module module)
|
void |
registerDenotexFile(java.lang.String filename)
|
void |
registerDenotexResource(java.lang.String denotex)
|
void |
registerModule(java.lang.String name,
Module module)
|
void |
registerModuleElement(java.lang.String name,
ModuleElement element)
|
void |
registerModuleMorphism(java.lang.String name,
ModuleMorphism morphism)
|
boolean |
registerXML(java.io.Reader reader)
Registers the objects in the XML file of the reader. |
boolean |
registerXMLFile(java.lang.String filename)
Registers the objects in the XML file with the specified file name. |
void |
removeDenotator(Denotator d)
Removes the given denotator from the repository. |
void |
removeDenotator(NameDenotator name)
Remove the denotator with the given name from the repository. |
void |
removeForm(Form form)
Removes the given form from the repository. |
void |
removeForm(NameDenotator name)
Removes the form with given name in the repository. |
void |
rollback()
Removes all temporary forms and denotators from the repository. |
void |
setNamespace(NameEntry ns)
|
java.lang.String |
setSchemeCode(java.lang.String s)
Sets the Scheme code. |
static Repository |
systemRepository()
Returns the global system-wide repository. |
void |
toXML(XMLWriter writer)
|
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Form register(Form form)
public Form registerBuiltin(Form form)
public boolean isBuiltin(Form form)
public Denotator register(Denotator d)
d
- register d only if it has a non-null name
public Denotator registerBuiltin(Denotator denotator)
public boolean isBuiltin(Denotator denotator)
public boolean registerXML(java.io.Reader reader)
public boolean registerXMLFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public void registerDenotexResource(java.lang.String denotex) throws RubatoException
RubatoException
public void registerDenotexFile(java.lang.String filename) throws RubatoException, java.io.IOException
RubatoException
java.io.IOException
public boolean register(java.util.Collection<Form> formSet, java.util.Collection<Denotator> denotatorSet)
formSet
- a collection of formsdenotatorSet
- a collection of denotators
public Form register(Form form, boolean builtin)
not
perform a rollback, if the registration fails
public Form getForm(NameDenotator name)
public Form getForm(java.lang.String name)
getForm
in interface RubatoDictionary
public Form getForm(NameEntry name)
public java.util.List<Form> getForms()
RubatoDictionary
getForms
in interface RubatoDictionary
public PowerForm autogenPowerForm(Form baseForm)
public ListForm autogenListForm(Form baseForm)
public LimitForm autogenLimitForm(java.util.ArrayList<Form> factors)
public ColimitForm autogenColimitForm(java.util.ArrayList<Form> factors)
public SimpleForm autogenSimpleForm(Module module)
public void removeForm(NameDenotator name)
public void removeForm(Form form)
form
- the form to be removedpublic void removeDenotator(NameDenotator name)
name
- the name for the denotator to be removedpublic void removeDenotator(Denotator d)
d
- the denotator to be removedpublic void rollback()
public Env getSchemeEnvironment()
public java.lang.String getSchemeCode()
public java.lang.String setSchemeCode(java.lang.String s)
public void clear()
public Denotator getDenotator(NameDenotator name)
name
- the name of the denotator to be returnedpublic Denotator getDenotator(NameEntry name)
name
- the name of the denotator to be returnedpublic Denotator getDenotator(java.lang.String name)
getDenotator
in interface RubatoDictionary
name
- the name of the denotator to be returned
public java.util.List<Denotator> getDenotators()
RubatoDictionary
getDenotators
in interface RubatoDictionary
public void setNamespace(NameEntry ns)
public NameEntry getCurrentNamespace()
public void registerBuiltinModule(java.lang.String name, Module module)
public void registerModule(java.lang.String name, Module module)
public Module getModule(java.lang.String name)
RubatoDictionary
name
.
getModule
in interface RubatoDictionary
public java.util.List<java.lang.String> getModuleNames()
public void registerModuleElement(java.lang.String name, ModuleElement element)
public ModuleElement getModuleElement(java.lang.String name)
RubatoDictionary
name
.
getModuleElement
in interface RubatoDictionary
public java.util.List<java.lang.String> getModuleElementNames()
public void registerModuleMorphism(java.lang.String name, ModuleMorphism morphism)
public ModuleMorphism getModuleMorphism(java.lang.String name)
RubatoDictionary
name
.
getModuleMorphism
in interface RubatoDictionary
public java.util.List<java.lang.String> getModuleMorphismNames()
public java.util.List<java.lang.String> getModuleMorphismNames(Module domain, Module codomain)
public void toXML(XMLWriter writer)
public void display()
public void display(java.io.PrintStream out)
out
- print to this PrintStreampublic static Repository systemRepository()
public void initGlobalRepository()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |