public class Rule extends java.lang.Object implements IWithExtAttributes
| Modifier and Type | Class and Description |
|---|---|
static class |
Rule.Normalization
Form of normalization possible.
|
static class |
Rule.Type
Types of validation rule.
|
| Constructor and Description |
|---|
Rule(Rule original)
Copy constructor.
|
Rule(java.lang.String type,
java.lang.String data)
Creates a rule of a given type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getData() |
java.lang.String |
getDisplay()
Gets a human readable representation of the rule.
|
java.lang.String |
getEffectiveData()
Gets the effective text to use when applying the rule.
|
boolean |
getExistsInSource()
Gets the flag 'existsinSource'.
|
ExtAttributes |
getExtAttributes()
Gets the
ExtAttributes object for the parent object. |
java.lang.String |
getExtAttributeValue(java.lang.String namespaceURI,
java.lang.String localName)
Gets the value for a given extension attribute.
|
Rule.Normalization |
getNormalization() |
int |
getOccurs() |
Rule.Type |
getType() |
boolean |
hasExtAttribute()
Indicates if at least one extension attribute is present.
|
boolean |
isCaseSensitive() |
boolean |
isEnable() |
boolean |
isInherited() |
void |
prepare() |
void |
setCaseSensitive(boolean caseSensitive) |
void |
setData(java.lang.String data) |
void |
setEnable(boolean enable) |
void |
setExistsInSource(boolean existsInSource)
Sets the flag 'existsinSource'
|
void |
setExtAttributes(ExtAttributes attributes)
Sets the
ExtAttributes object associated with this object. |
void |
setInherited(boolean inherited) |
void |
setNormalization(Rule.Normalization normalization) |
void |
setOccurs(int occurs) |
void |
setType(Rule.Type type) |
void |
verify()
Verifies if this rule has valid parameters.
|
public Rule(java.lang.String type,
java.lang.String data)
type - the name of the rule type.data - the text data for the rule (can be null).public Rule(Rule original)
original - the original object to duplicate.public java.lang.String getDisplay()
public Rule.Type getType()
public void setType(Rule.Type type)
public java.lang.String getData()
public void setData(java.lang.String data)
public java.lang.String getEffectiveData()
public int getOccurs()
public void setOccurs(int occurs)
public boolean getExistsInSource()
public void setExistsInSource(boolean existsInSource)
existsInSource - the flag 'existsinSource' to setpublic boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
public boolean isEnable()
public void setEnable(boolean enable)
public Rule.Normalization getNormalization()
public void setNormalization(Rule.Normalization normalization)
public void setExtAttributes(ExtAttributes attributes)
IWithExtAttributesExtAttributes object associated with this object.setExtAttributes in interface IWithExtAttributesattributes - the ExtAttributes object associated with this object.
If null, a new ExtAttributes object is created.public boolean isInherited()
public void setInherited(boolean inherited)
public ExtAttributes getExtAttributes()
IWithExtAttributesExtAttributes object for the parent object.
If none exists, one is created.getExtAttributes in interface IWithExtAttributesExtAttributes object for the parent object, never null.public boolean hasExtAttribute()
IWithExtAttributeshasExtAttribute in interface IWithExtAttributespublic java.lang.String getExtAttributeValue(java.lang.String namespaceURI,
java.lang.String localName)
IWithExtAttributesgetExtAttributeValue in interface IWithExtAttributesnamespaceURI - the URI of the namespace for the attribute.localName - the name of the attribute.public void prepare()
public void verify()
XLIFFException - if there is a problem with the rule's parameters.