de.interactive_instruments.ShapeChange.Transformation.Profiling
Class ProfileIdentifier

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Transformation.Profiling.ProfileIdentifier

public class ProfileIdentifier
extends Object

Author:
Johannes Echterhoff (echterhoff interactive-instruments de)

Nested Class Summary
static class ProfileIdentifier.IdentifierPattern
           
 
Field Summary
static Pattern profileIdentifierPatternLoose
          Contains the regular expression that defines the structure of a profile identifier, which usually is part of a (comma-separated) list and provided for model elements (such as classes and properties).
static Pattern profileIdentifierPatternStrict
          Contains the regular expression that allows only a single version number to be given for a profile identifier.
 
Method Summary
 boolean contains(ProfileIdentifier other, List<String> messages)
           
 String getName()
           
 String getOwnerName()
           
 ProfileVersionIndicator getVersionIndicator()
           
static ProfileIdentifier parse(String identifier, ProfileIdentifier.IdentifierPattern pattern, String ownerName)
          Parses the given identifier and creates a ProfileIdentifier from it.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

profileIdentifierPatternLoose

public static final Pattern profileIdentifierPatternLoose
Contains the regular expression that defines the structure of a profile identifier, which usually is part of a (comma-separated) list and provided for model elements (such as classes and properties).


profileIdentifierPatternStrict

public static final Pattern profileIdentifierPatternStrict
Contains the regular expression that allows only a single version number to be given for a profile identifier.

Method Detail

parse

public static ProfileIdentifier parse(String identifier,
                                      ProfileIdentifier.IdentifierPattern pattern,
                                      String ownerName)
                               throws MalformedProfileIdentifierException
Parses the given identifier and creates a ProfileIdentifier from it.

Parameters:
identifier - the profile identifier content to parse
pattern - one of the ProfileIdentifierPattern enumerations or null in case that the identifier shall not be checked against regular expressions
Returns:
a validated profile identifier
Throws:
MalformedProfileIdentifierException - If the given identifier was not well-formed.

getName

public String getName()

getOwnerName

public String getOwnerName()
Returns:
name of the model element that owns the profile identifier information

getVersionIndicator

public ProfileVersionIndicator getVersionIndicator()

toString

public String toString()
Overrides:
toString in class Object

contains

public boolean contains(ProfileIdentifier other,
                        List<String> messages)
Parameters:
other -
messages - List to store the reason(s) why this identifier does not contain the other identifier; can be null
Returns:


Copyright © 2015. All rights reserved.