com.ibm.di.cdm.core
Class NamingRule

java.lang.Object
  extended by com.ibm.di.cdm.core.NamingRule
All Implemented Interfaces:
Comparable<NamingRule>
Direct Known Subclasses:
DefaultNamingRule

public abstract class NamingRule
extends Object
implements Comparable<NamingRule>

Class used for representing Naming Rules.


Field Summary
protected  Set<NamingRuleIdentifier> identifiers
          The identifiers of this naming rule.
protected  String name
          The rule's name.
protected  int priority
          The rule's priority.
static String UNDEFINED_NAME
          Default name set to naming rules if no other can be found.
static int UNDEFINED_PRIORITY
          Default priority set to naming rules if no other can be found.
 
Constructor Summary
NamingRule()
           
 
Method Summary
 int compareTo(NamingRule other)
          
 boolean equals(Object obj)
          
 Set<NamingRuleIdentifier> getIdentifiers()
          Returns the identifiers of the Naming Rule.
 String getName()
          Returns the name of the Naming Rule.
 int getPriority()
          Returns the priority of the Naming Rule.
 int hashCode()
          
 NamingRule intersect(Set<NamingRuleIdentifier> attributes)
          Checks if the provided attributes match this naming rule.
 boolean isEmpty()
          Checks whether this naming rule has any Naming Identifiers.
 boolean matches(Set<String> attributes)
          Checks if the provided attributes match this naming rule.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDEFINED_PRIORITY

public static final int UNDEFINED_PRIORITY
Default priority set to naming rules if no other can be found.

See Also:
Constant Field Values

UNDEFINED_NAME

public static final String UNDEFINED_NAME
Default name set to naming rules if no other can be found.

See Also:
Constant Field Values

priority

protected int priority
The rule's priority.


name

protected String name
The rule's name.


identifiers

protected Set<NamingRuleIdentifier> identifiers
The identifiers of this naming rule.

Constructor Detail

NamingRule

public NamingRule()
Method Detail

getIdentifiers

public final Set<NamingRuleIdentifier> getIdentifiers()
Returns the identifiers of the Naming Rule.

Returns:
rule's identifiers.

getName

public final String getName()
Returns the name of the Naming Rule.

Returns:
rule's name.

getPriority

public final int getPriority()
Returns the priority of the Naming Rule.

Returns:
rule's priority.

isEmpty

public final boolean isEmpty()
Checks whether this naming rule has any Naming Identifiers.

Returns:
true if the rule is empty, otherwise false.

compareTo

public int compareTo(NamingRule other)

Specified by:
compareTo in interface Comparable<NamingRule>

toString

public String toString()

Overrides:
toString in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

matches

public boolean matches(Set<String> attributes)
Checks if the provided attributes match this naming rule.

Parameters:
attributes - the attributes to be checked.
Returns:
true if the attributes match this rule, otherwise false.

intersect

public NamingRule intersect(Set<NamingRuleIdentifier> attributes)
Checks if the provided attributes match this naming rule.

Parameters:
attributes - the attributes to be checked.
Returns:
NaminRule that contains unsatisfied NamingRuleIdentifiers.