Hilbert II - Version 0.03.08

org.qedeq.kernel.bo.load
Class DefaultModuleProperties

java.lang.Object
  extended byorg.qedeq.kernel.bo.load.DefaultModuleProperties
All Implemented Interfaces:
ModuleProperties

public class DefaultModuleProperties
extends Object
implements ModuleProperties

Represents a module and its states.

Version:
$Revision: 1.6 $

Constructor Summary
DefaultModuleProperties(ModuleAddress address)
          Creates new module properties.
 
Method Summary
 DependencyState getDependencyState()
          Get module dependency state.
 SourceFileExceptionList getException()
          Get exception.
 ExistenceChecker getExistenceChecker()
          Get the predicate and function existence checker.
 LoadingState getLoadingState()
          Get module loading state.
 LogicalState getLogicalState()
          Get module logical state.
 QedeqBo getModule()
          Get module.
 ModuleAddress getModuleAddress()
          Get ModuleAddress of module.
 String getName()
          Get name of module.
 ModuleReferenceList getRequiredModules()
          Get labels and URLs of all referenced modules.
 String getRuleVersion()
          Get rule version information.
 String getStateDescription()
          Get module state description.
 URL getUrl()
          Get original URL of module.
 boolean hasFailures()
          Is this a failure state the module is in?
 boolean hasLoadedRequiredModules()
          Are all required modules loaded?
 boolean isChecked()
          Was the module checked?
 boolean isLoaded()
          Is this module already loaded?
 void setChecked(ExistenceChecker checker)
          Set logic checked state.
 void setDependencyFailureState(DependencyState state, SourceFileExceptionList e)
          Set failure module state.
 void setDependencyProgressState(DependencyState state)
          Set dependency progress module state.
 void setLoaded(QedeqBo module)
          Set checked and loaded state and module.
 void setLoadedRequiredModules(ModuleReferenceList list)
          Set loaded required modules state.
 void setLoadingCompleteness(int completeness)
          Set completeness percentage.
 void setLoadingFailureState(LoadingState state, SourceFileExceptionList e)
          Set failure module state.
 void setLoadingProgressState(LoadingState state)
          Set loading progress module state.
 void setLogicalFailureState(LogicalState state, SourceFileExceptionList e)
          Set failure module state.
 void setLogicalProgressState(LogicalState state)
          Set loading progress module state.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultModuleProperties

public DefaultModuleProperties(ModuleAddress address)
Creates new module properties.

Parameters:
address - Module address (not null).
Method Detail

hasFailures

public final boolean hasFailures()
Description copied from interface: ModuleProperties
Is this a failure state the module is in?

Specified by:
hasFailures in interface ModuleProperties
Returns:
were there any errors?

getModuleAddress

public final ModuleAddress getModuleAddress()
Description copied from interface: ModuleProperties
Get ModuleAddress of module.

Specified by:
getModuleAddress in interface ModuleProperties
Returns:
address of module.

setLoadingCompleteness

public final void setLoadingCompleteness(int completeness)
Description copied from interface: ModuleProperties
Set completeness percentage.

Specified by:
setLoadingCompleteness in interface ModuleProperties
Parameters:
completeness - Completeness of loading into memory.

setLoadingProgressState

public final void setLoadingProgressState(LoadingState state)
Description copied from interface: ModuleProperties
Set loading progress module state.

Specified by:
setLoadingProgressState in interface ModuleProperties
Parameters:
state - module state

setLoadingFailureState

public final void setLoadingFailureState(LoadingState state,
                                         SourceFileExceptionList e)
Description copied from interface: ModuleProperties
Set failure module state.

Specified by:
setLoadingFailureState in interface ModuleProperties
Parameters:
state - module state
e - Exception that occurred during loading.

getLoadingState

public final LoadingState getLoadingState()
Description copied from interface: ModuleProperties
Get module loading state.

Specified by:
getLoadingState in interface ModuleProperties
Returns:
module state.

isLoaded

public final boolean isLoaded()
Description copied from interface: ModuleProperties
Is this module already loaded?

Specified by:
isLoaded in interface ModuleProperties
Returns:
Is this module already loaded?

setLoaded

public final void setLoaded(QedeqBo module)
Description copied from interface: ModuleProperties
Set checked and loaded state and module.

Specified by:
setLoaded in interface ModuleProperties
Parameters:
module - checked and loaded module.

getModule

public final QedeqBo getModule()
Description copied from interface: ModuleProperties
Get module. Works only if module is already completely loaded.

Specified by:
getModule in interface ModuleProperties
Returns:
QEDEQ module if it is already loaded.

setDependencyProgressState

public final void setDependencyProgressState(DependencyState state)
Description copied from interface: ModuleProperties
Set dependency progress module state.

Specified by:
setDependencyProgressState in interface ModuleProperties
Parameters:
state - module state

setDependencyFailureState

public final void setDependencyFailureState(DependencyState state,
                                            SourceFileExceptionList e)
Description copied from interface: ModuleProperties
Set failure module state.

Specified by:
setDependencyFailureState in interface ModuleProperties
Parameters:
state - module state
e - Exception that occurred during loading.

getDependencyState

public final DependencyState getDependencyState()
Description copied from interface: ModuleProperties
Get module dependency state.

Specified by:
getDependencyState in interface ModuleProperties
Returns:
module state.

setLoadedRequiredModules

public final void setLoadedRequiredModules(ModuleReferenceList list)
Description copied from interface: ModuleProperties
Set loaded required modules state. Also set labels and URLs for all referenced modules.

Specified by:
setLoadedRequiredModules in interface ModuleProperties
Parameters:
list - URLs of all referenced modules.

getRequiredModules

public final ModuleReferenceList getRequiredModules()
Description copied from interface: ModuleProperties
Get labels and URLs of all referenced modules. Only available if module has loaded all required modules. Otherwise a runtime exception is thrown.

Specified by:
getRequiredModules in interface ModuleProperties
Returns:
URLs of all referenced modules.

hasLoadedRequiredModules

public final boolean hasLoadedRequiredModules()
Description copied from interface: ModuleProperties
Are all required modules loaded?

Specified by:
hasLoadedRequiredModules in interface ModuleProperties
Returns:
Are all required modules loaded?

setChecked

public final void setChecked(ExistenceChecker checker)
Description copied from interface: ModuleProperties
Set logic checked state. Also set the predicate and function existence checker.

Specified by:
setChecked in interface ModuleProperties
Parameters:
checker - Checks if a predicate or function constant is defined.

getExistenceChecker

public final ExistenceChecker getExistenceChecker()
Description copied from interface: ModuleProperties
Get the predicate and function existence checker. Is only not null if logic was successfully checked.

Specified by:
getExistenceChecker in interface ModuleProperties
Returns:
Checker. Checks if a predicate or function constant is defined.

isChecked

public final boolean isChecked()
Description copied from interface: ModuleProperties
Was the module checked?

Specified by:
isChecked in interface ModuleProperties
Returns:
Module is checked?

setLogicalProgressState

public final void setLogicalProgressState(LogicalState state)
Description copied from interface: ModuleProperties
Set loading progress module state.

Specified by:
setLogicalProgressState in interface ModuleProperties
Parameters:
state - module state

setLogicalFailureState

public final void setLogicalFailureState(LogicalState state,
                                         SourceFileExceptionList e)
Description copied from interface: ModuleProperties
Set failure module state.

Specified by:
setLogicalFailureState in interface ModuleProperties
Parameters:
state - module state
e - Exception that occurred during loading.

getLogicalState

public final LogicalState getLogicalState()
Description copied from interface: ModuleProperties
Get module logical state.

Specified by:
getLogicalState in interface ModuleProperties
Returns:
module state.

getException

public final SourceFileExceptionList getException()
Description copied from interface: ModuleProperties
Get exception.

Specified by:
getException in interface ModuleProperties
Returns:
exception.

getStateDescription

public final String getStateDescription()
Description copied from interface: ModuleProperties
Get module state description.

Specified by:
getStateDescription in interface ModuleProperties
Returns:
module state description.

getName

public final String getName()
Description copied from interface: ModuleProperties
Get name of module.

Specified by:
getName in interface ModuleProperties
Returns:
module name.

getRuleVersion

public final String getRuleVersion()
Description copied from interface: ModuleProperties
Get rule version information.

Specified by:
getRuleVersion in interface ModuleProperties
Returns:
rule version.

getUrl

public final URL getUrl()
Description copied from interface: ModuleProperties
Get original URL of module.

Specified by:
getUrl in interface ModuleProperties
Returns:
URL of module.

toString

public final String toString()

Hilbert II - Version 0.03.08

©left GNU General Public Licence
All Rights Reserved.