Class ProfilesLibrary


  • public class ProfilesLibrary
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ProfilesLibrary()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean appliedStereotypesEqualsOne​(Set<org.palladiosimulator.pcm.core.entity.Entity> pcmEntitySet, String stereotypeName)  
      static void applyStereotype​(de.uka.ipd.sdq.identifier.Identifier pcmIdentifier, String stereotypeName)
      Applies the stereotype with the given name to the given pcm element.
      static void applyStereotype​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity, String stereotypeName)
      Applies the stereotype with the given name to the given pcm element.
      static void delete​(List<org.palladiosimulator.pcm.core.entity.NamedElement> rootEObjects, org.palladiosimulator.pcm.core.entity.Entity eObject)  
      static double getDoubleTaggedValue​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity, String taggedValueName, String stereotypeName)  
      static int getIntTaggedValue​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity, String taggedValueName, String stereotypeName)  
      static boolean hasAppliedStereotype​(de.uka.ipd.sdq.identifier.Identifier pcmIdentifier, String stereotypeName)
      Gets whether the stereotype with the given name is applied to the given pcm entity.
      static boolean hasAppliedStereotype​(Set<org.palladiosimulator.pcm.core.entity.Entity> pcmEntitySet, String stereotypeName)
      Gets whether the stereotype with the given name is applied to any of the given pcm entities.
      static boolean hasAppliedStereotype​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity, String stereotypeName)
      Gets whether the stereotype with the given name is applied to the given pcm entity.
      static void removeStereotypeApplications​(de.uka.ipd.sdq.identifier.Identifier pcmIdentifier, String stereotypeName)
      Revokes the application of stereotype with the given name to the given pcm element.
      This method does nothing, in case the stereotype has not been applied beforehand.
      static void removeStereotypeApplications​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity, String stereotypeName)
      Revokes the application of stereotype with the given name to the given pcm element.
      This method does nothing, in case the stereotype has not been applied beforehand.
      static void setTaggedValue​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity, int value, String stereotypeName, String taggedValueName)
      Sets the integer tagged value of a stereotype which is applied to the given pcm element.
    • Constructor Detail

      • ProfilesLibrary

        public ProfilesLibrary()
    • Method Detail

      • hasAppliedStereotype

        public static boolean hasAppliedStereotype​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity,
                                                   String stereotypeName)
        Gets whether the stereotype with the given name is applied to the given pcm entity.
        Parameters:
        pcmEntity - The Entity to be checked for stereotype application.
        stereotypeName - The name of the stereotype to check for application.
        Returns:
        true whether the given stereotype is applied, false otherwise.
      • hasAppliedStereotype

        public static boolean hasAppliedStereotype​(Set<org.palladiosimulator.pcm.core.entity.Entity> pcmEntitySet,
                                                   String stereotypeName)
        Gets whether the stereotype with the given name is applied to any of the given pcm entities.
        Parameters:
        pcmEntitySet - A Set of pcm elements to be checked for stereotype application.
        stereotypeName - The name of the stereotype to check for application.
        Returns:
        true whether the given stereotype is applied at least once, false otherwise.
      • hasAppliedStereotype

        public static boolean hasAppliedStereotype​(de.uka.ipd.sdq.identifier.Identifier pcmIdentifier,
                                                   String stereotypeName)
        Gets whether the stereotype with the given name is applied to the given pcm entity.
        Parameters:
        pcmEntity - The Entity to be checked for stereotype application.
        stereotypeName - The name of the stereotype to check for application.
        Returns:
        true whether the given stereotype is applied, false otherwise.
      • appliedStereotypesEqualsOne

        public static boolean appliedStereotypesEqualsOne​(Set<org.palladiosimulator.pcm.core.entity.Entity> pcmEntitySet,
                                                          String stereotypeName)
      • applyStereotype

        public static void applyStereotype​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity,
                                           String stereotypeName)
        Applies the stereotype with the given name to the given pcm element.
        Parameters:
        pcmEntity - The Entity the stereotype shall be applied to.
        stereotypeName - The name of the stereotype to apply.
        Throws:
        IllegalStateException - In case no stereotype with the given name exists.
      • applyStereotype

        public static void applyStereotype​(de.uka.ipd.sdq.identifier.Identifier pcmIdentifier,
                                           String stereotypeName)
        Applies the stereotype with the given name to the given pcm element.
        Parameters:
        pcmEntity - The Entity the stereotype shall be applied to.
        stereotypeName - The name of the stereotype to apply.
        Throws:
        IllegalStateException - In case no stereotype with the given name exists.
      • removeStereotypeApplications

        public static void removeStereotypeApplications​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity,
                                                        String stereotypeName)
        Revokes the application of stereotype with the given name to the given pcm element.
        This method does nothing, in case the stereotype has not been applied beforehand.
        Parameters:
        pcmEntity - The Entity that is affected.
        stereotypeName - The name of the stereotype to revoke.
        Throws:
        IllegalStateException - In case no stereotype with the given name exists.
      • removeStereotypeApplications

        public static void removeStereotypeApplications​(de.uka.ipd.sdq.identifier.Identifier pcmIdentifier,
                                                        String stereotypeName)
        Revokes the application of stereotype with the given name to the given pcm element.
        This method does nothing, in case the stereotype has not been applied beforehand.
        Parameters:
        pcmEntity - The Entity that is affected.
        stereotypeName - The name of the stereotype to revoke.
        Throws:
        IllegalStateException - In case no stereotype with the given name exists.
      • setTaggedValue

        public static void setTaggedValue​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity,
                                          int value,
                                          String stereotypeName,
                                          String taggedValueName)
        Sets the integer tagged value of a stereotype which is applied to the given pcm element.
        Parameters:
        pcmEntity - The Entity that is affected.
        value - The new value to be set
        stereotypeName - The name of the stereotype the tagged value belongs to.
        taggedValueName - The name of the integer tagged value to be set.
      • getIntTaggedValue

        public static int getIntTaggedValue​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity,
                                            String taggedValueName,
                                            String stereotypeName)
      • getDoubleTaggedValue

        public static double getDoubleTaggedValue​(org.palladiosimulator.pcm.core.entity.Entity pcmEntity,
                                                  String taggedValueName,
                                                  String stereotypeName)
      • delete

        public static void delete​(List<org.palladiosimulator.pcm.core.entity.NamedElement> rootEObjects,
                                  org.palladiosimulator.pcm.core.entity.Entity eObject)