|
www.sdmetrics.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--sdmetrics.app.ProjectSettings
Class to store project settings for XMI and XML source files, filter settings. This class has methods to set and get the URIs for the project files, whether to use default project files, and the filter settings.
To calculate a set of metrics, create an instance of this class, fill its
fields with the file(s) and filter settings you want to process, and pass
it to a Controller object.
The class has methods to instruct the controller to
| Constructor Summary | |
ProjectSettings()
Constructor. |
|
ProjectSettings(sdmetrics.util.MyParameters ap)
Read project settings from persistent application parameters. |
|
| Method Summary | |
java.lang.String |
getCustomProjectFileConfig()
Return the name of the custom project file configuration to use. |
java.lang.String[] |
getFilters()
Return the list of design element filters. |
java.lang.String |
getMetaModel()
Return the URI of the metamodel definition file to use. |
java.lang.String |
getMetricsFile()
Return the URI of the metrics definition file to use. |
java.lang.String |
getRuleFilterString()
Obtain the design rule filter string for design rule checking. |
java.lang.String |
getXMISource()
Return the URI of the XMI source file to analyze. |
java.lang.String |
getXMITrans()
Return the URI of the XMI transformation file to use. |
boolean |
inCalculation()
Return the flag indicating if links to rejected elements (not shown in the output) should be taken into account during metric calculation. |
void |
inCalculation(boolean b)
Set the flag indicating if links to rejected elements (not shown in the output) should be taken into account during metric calculation. |
boolean |
isFilterEnabled()
Return the flag indicating if the filter mechanism is enabled or disabled. |
boolean |
keepMatching()
Return the flag indicating if elements matching a filter should be kept in the data output, or if only elements not matching any filters should be included in the output. |
void |
keepMatching(boolean b)
Determines which elements are to be included in the output. |
void |
loadFromFile(java.lang.String filename)
Load project settings from a file created with the SDMetrics GUI. |
void |
requireDesignRules()
Request the design rules to be checked. |
void |
requireMetrics()
Request the metrics to be pre-calculated. |
void |
requireRelMatrices()
Request the relation matrices to be calculated. |
boolean |
requiresDesignRules()
Determine if checking of design rules is required. |
boolean |
requiresMetrics()
Determine if pre-calculation of metric is required. |
boolean |
requiresRelMatrices()
Determine if calculation of the relation matrices is required. |
void |
resetMeasurementRequirements()
Reset the measurement requirements. |
void |
saveToFile(java.lang.String filename)
Save project settings to a file. |
void |
setDesignRuleFilter(java.lang.String s)
Set the design rule filter for the design rule checking. |
void |
setFilterEnabled(boolean b)
Set the flag indicating if the filter mechanism is enabled or disabled. |
void |
setFilters(java.lang.String[] s)
Set the list of element filters to apply. |
void |
setMetaModel(java.lang.String s)
Set the URI of the metamodel definition file to use. |
void |
setMetricsFile(java.lang.String s)
Set the URI of the metrics definition file to use. |
void |
setProjectFileConfig(java.lang.String s)
Set the name of the project file configuration entry to use. |
void |
setUseCustomProjectFiles(boolean b)
Set flag indicating if a custom project files entry should be used. |
void |
setXMISource(java.lang.String s)
Set the URI of the XMI source file to analyze. |
void |
setXMITrans(java.lang.String s)
Set the URI of the XMI transformation file to use. |
boolean |
useCustomProjectFile()
Return the flag indicating if the default project file configuration |
boolean |
useMetaDefault()
Return the flag indicating if the default metamodel definition file should be used. |
void |
useMetaDefault(boolean b)
Set flag indicating if the default metamodel definition file should be used. |
boolean |
useMetricsDefault()
Return the flag indicating if the default metric definition file should be used. |
void |
useMetricsDefault(boolean b)
Set flag indicating if the default metrics definition file should be used. |
boolean |
useTransDefault()
Return the flag indicating if the default XMI transformation file should be used. |
void |
useTransDefault(boolean b)
Set flag indicating if the default XMI transformation file should be used. |
void |
writeProjectSettings(sdmetrics.util.MyParameters ap)
Write project settings to persistent application parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProjectSettings()
public ProjectSettings(sdmetrics.util.MyParameters ap)
ap - The application parameters.| Method Detail |
public void writeProjectSettings(sdmetrics.util.MyParameters ap)
ap - The application parameters.public java.lang.String getCustomProjectFileConfig()
public boolean useCustomProjectFile()
true if the default project file configuration should be used.public java.lang.String getXMISource()
public java.lang.String getMetaModel()
public java.lang.String getMetricsFile()
public java.lang.String getXMITrans()
public boolean useMetricsDefault()
true if the default metric definition should be used.public boolean useMetaDefault()
true if the default metamodel definition file should be used.public boolean useTransDefault()
true if the default XMI transformation file should be used.public java.lang.String[] getFilters()
public boolean keepMatching()
true if only matching elements are to be included in the output,
false if only non-matching elements are to be included in the output.public boolean isFilterEnabled()
true if filter is enabled, else false.public boolean inCalculation()
true if links to rejected elements are to be taken
into account during metric calculation,
false if links to rejected elements are to be ignored.public void setProjectFileConfig(java.lang.String s)
s - Name of the custom project file configuration.public void setXMISource(java.lang.String s)
s - URI of the XMI source file to analyze.public void setMetaModel(java.lang.String s)
s - URI of the custom metamodel definition file.public void setMetricsFile(java.lang.String s)
s - URI of the custom metrics definition file.public void setXMITrans(java.lang.String s)
s - URI of the custom XMI transformation file.public void setUseCustomProjectFiles(boolean b)
b - true to use the custom project files entry,
false to automatically determine a project file entry to use.public void useMetricsDefault(boolean b)
b - true to use the default metrics definition file,
false to use the custom metrics definition file.public void useMetaDefault(boolean b)
b - true to use the default metrics definition file,
false to use the custom metrics definition file.public void useTransDefault(boolean b)
b - true to use the default metrics definition file,
false to use the custom metrics definition file.public void setFilters(java.lang.String[] s)
s - Array of filter strings.public void keepMatching(boolean b)
b - true if only elements matching at least one of the
filter strings are to be included in the output,
false if only elements not matching any filter strings are
to be included in the output.public void setFilterEnabled(boolean b)
b - true to enable filter mechanism.public void inCalculation(boolean b)
b - true if rejected elements are to be taken into account
during metric calculation.public void resetMeasurementRequirements()
public boolean requiresMetrics()
true if metrics are to be pre-calculated, else falsepublic boolean requiresDesignRules()
true if design rules are to be checked, else falsepublic boolean requiresRelMatrices()
true if relation matrices are to be calculated, else falsepublic void requireMetrics()
public void requireDesignRules()
public void requireRelMatrices()
public void setDesignRuleFilter(java.lang.String s)
s - The design rule filter string.public java.lang.String getRuleFilterString()
public void saveToFile(java.lang.String filename)
throws java.io.FileNotFoundException
filename - URI of the file to save the settings to.
java.io.FileNotFoundException - The file could not be opened for writing.
public void loadFromFile(java.lang.String filename)
throws java.io.IOException
filename - of the file to load the settings from.
java.io.IOException - The file was not found or corrupt.
|
www.sdmetrics.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||