Class DefaultProfileSet

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<String,​org.smooks.api.profile.Profile>, org.smooks.api.profile.ProfileSet

    public class DefaultProfileSet
    extends LinkedHashMap<String,​org.smooks.api.profile.Profile>
    implements org.smooks.api.profile.ProfileSet
    Default ProfileSet implementation.
    Author:
    tfennelly
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultProfileSet

        public DefaultProfileSet​(String baseProfile)
        Public constructor.
        Parameters:
        baseProfile - The base profile for the profile set.
      • DefaultProfileSet

        public DefaultProfileSet​(String baseProfile,
                                 String[] subProfiles)
    • Method Detail

      • getBaseProfile

        public String getBaseProfile()
        Get the base profile for this profile set.
        Specified by:
        getBaseProfile in interface org.smooks.api.profile.ProfileSet
        Returns:
        Base profile name.
      • isMember

        public boolean isMember​(String profile)
        Specified by:
        isMember in interface org.smooks.api.profile.ProfileSet
      • addProfile

        public void addProfile​(String profile)
        Add profile to the ProfileSet.
        Parameters:
        profile - The profile to add.
      • addProfile

        public void addProfile​(org.smooks.api.profile.Profile profile)
        Add profile to the ProfileSet.
        Specified by:
        addProfile in interface org.smooks.api.profile.ProfileSet
        Parameters:
        profile - The profile to add.
      • getProfile

        public org.smooks.api.profile.Profile getProfile​(String profile)
        Get a profile from the ProfileSet.
        Specified by:
        getProfile in interface org.smooks.api.profile.ProfileSet
        Parameters:
        profile - The name of the profile.
        Returns:
        The requested Profile, or null if the profile is not a member of the ProfileSet.
      • iterator

        public Iterator<org.smooks.api.profile.Profile> iterator()
        Get an Iterator to allow iteration over the Profilesin this ProfileSet.
        Specified by:
        iterator in interface org.smooks.api.profile.ProfileSet
        Returns:
        An Iterator that allows iteration over the Profilesin this ProfileSet.
      • addProfileSet

        protected void addProfileSet​(DefaultProfileSet profileSet)
        Add the profiles of the supplied DefaultProfileSet to this ProfileSet.
        Parameters:
        profileSet - The DefaultProfileSet whose profiles are to be added.
      • addProfiles

        public void addProfiles​(String[] subProfiles)
        Add a list of subProfiles to the ProfileSet.
        Parameters:
        subProfiles - The array of sub Profiles to add.