|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.interactive_instruments.ShapeChange.Transformation.Profiling.Profiler
public class Profiler
Creates a profile of the base model by removing all classes and properties that do not belong to one of the profiles stated in the ShapeChange configuration. Each profile identifier in the configuration parameter must match the following regular expression: (\w|-)+(\[[0-9]+(\.[0-9]+)*\])?
Nested Class Summary | |
---|---|
static class |
Profiler.ConstraintHandling
Enumeration of the different behaviors for handling constraints during profiling. |
Field Summary | |
---|---|
static String |
CONSTRAINTHANDLING_PARAMETER
Name of the configuration parameter that contains information on how to handle constraints during profiling. |
static String |
PROFILES_PARAMETER
Name of the configuration parameter that contains information about the profile(s) to restrict the model to. |
static String |
PROFILES_TAGGED_VALUE
Name of the tagged value that contains the profile information. |
static String |
PROFILING_CFG_PARAM_RESIDUALTYPEREMOVAL_INCLUDESUBTYPESFOR
Regular expression to identify the name of the classes for which subtypes shall be included. |
static String |
RULE_TRF_PROFILING_POSTPROCESSING_REMOVEEMPTYPACKAGES
|
static String |
RULE_TRF_PROFILING_POSTPROCESSING_REMOVERESIDUALTYPES
|
static String |
RULE_TRF_PROFILING_PREPROCESSING_MODELCONSISTENCYCHECK
|
static String |
RULE_TRF_PROFILING_PREPROCESSING_PROFILESVALUECONSISTENCYCHECK
|
static String |
RULE_TRF_PROFILING_PROCESSING_CLASS_REMOVAL_INCLUDES_ALL_SUBTYPES
If this rule is enabled, then the profiler does not only remove individual classes if their profiles do not match, but also all their (direct and indirect) subclasses. |
static String |
RULE_TRF_PROFILING_PROCESSING_EXPLICITPROFILESETTINGS
If this rule is enabled, model elements without profile information are treated as if they belonged to no profile (which overrides the default behavior that classes belong to all profiles and properties inherit profiles from their class). |
static String |
RULE_TRF_PROFILING_PROCESSING_KEEP_ASSOCIATION_AS_IS
If this rule is enabled, the profiler ignores properties that belong to associations while profiling individual properties. |
Constructor Summary | |
---|---|
Profiler()
|
Method Summary | |
---|---|
boolean |
contains(ProfileIdentifierMap profilesA,
String aOwnerName,
ProfileIdentifierMap profilesB,
String bOwnerName,
boolean profileInheritance,
List<String> messages)
Checks if one set of profiles contains another one. |
Set<GenericClassInfo> |
getAllSubtypes(GenericClassInfo genCi)
|
void |
process(GenericModel genModel,
Options options,
TransformerConfiguration trfConfig,
ShapeChangeResult result)
Processes the model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RULE_TRF_PROFILING_PREPROCESSING_MODELCONSISTENCYCHECK
public static final String RULE_TRF_PROFILING_PREPROCESSING_PROFILESVALUECONSISTENCYCHECK
public static final String RULE_TRF_PROFILING_POSTPROCESSING_REMOVERESIDUALTYPES
public static final String RULE_TRF_PROFILING_POSTPROCESSING_REMOVEEMPTYPACKAGES
public static final String RULE_TRF_PROFILING_PROCESSING_EXPLICITPROFILESETTINGS
public static final String RULE_TRF_PROFILING_PROCESSING_CLASS_REMOVAL_INCLUDES_ALL_SUBTYPES
public static final String RULE_TRF_PROFILING_PROCESSING_KEEP_ASSOCIATION_AS_IS
public static final String PROFILING_CFG_PARAM_RESIDUALTYPEREMOVAL_INCLUDESUBTYPESFOR
public static final String PROFILES_PARAMETER
public static final String PROFILES_TAGGED_VALUE
public static final String CONSTRAINTHANDLING_PARAMETER
Constructor Detail |
---|
public Profiler()
Method Detail |
---|
public void process(GenericModel genModel, Options options, TransformerConfiguration trfConfig, ShapeChangeResult result) throws ShapeChangeAbortException
Transformer
process
in interface Transformer
genModel
- The model to process.options
- Options to control the process execution.result
- Logging target.
ShapeChangeAbortException
de.interactive_instruments.ShapeChange.Transformation.Transformer#process(de.interactive_instruments.ShapeChange.Model.Model,
de.interactive_instruments.ShapeChange.Options,
de.interactive_instruments.ShapeChange.TransformerConfiguration,
de.interactive_instruments.ShapeChange.ShapeChangeResult)
public boolean contains(ProfileIdentifierMap profilesA, String aOwnerName, ProfileIdentifierMap profilesB, String bOwnerName, boolean profileInheritance, List<String> messages)
Takes into account whether or not the rule for explicit profile settings is enabled, which matters in case that a model element has no profile information.
Useful for:
profilesA
- profile map that contains profilesB (or not)profilesB
- profile map that is contained in profilesA (or not)profileInheritance
- true if profile inheritance shall be applied, else false
(irrelevant if rule for explicit profile settings is enabled)messages
- used to log the reason(s) why profilesA does not contain
profilesB
public Set<GenericClassInfo> getAllSubtypes(GenericClassInfo genCi)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |