@NotThreadSafe public class PSRule extends Object implements IPSElement, IPSHasID, IPSHasFlag, IPSHasForeignElements, IPSHasIncludes, IPSHasLets, IPSHasRichGroup, IPSHasLinkableGroup
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_ABSTRACT |
| Constructor and Description |
|---|
PSRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssertReport(PSAssertReport aAssertReport) |
void |
addExtends(PSExtends aExtends) |
void |
addForeignAttribute(String sAttrName,
String sAttrValue) |
void |
addForeignElement(com.helger.xml.microdom.IMicroElement aForeignElement) |
void |
addInclude(PSInclude aInclude)
Add an include to this object.
|
void |
addLet(PSLet aLet)
Add a
PSLet element. |
com.helger.commons.collection.ext.ICommonsList<PSAssertReport> |
getAllAssertReports() |
com.helger.commons.collection.ext.ICommonsList<IPSElement> |
getAllContentElements() |
com.helger.commons.collection.ext.ICommonsList<PSExtends> |
getAllExtends() |
com.helger.commons.collection.ext.ICommonsOrderedMap<String,String> |
getAllForeignAttributes() |
com.helger.commons.collection.ext.ICommonsList<com.helger.xml.microdom.IMicroElement> |
getAllForeignElements() |
com.helger.commons.collection.ext.ICommonsList<PSInclude> |
getAllIncludes() |
com.helger.commons.collection.ext.ICommonsList<PSLet> |
getAllLets() |
com.helger.commons.collection.ext.ICommonsOrderedMap<String,String> |
getAllLetsAsMap() |
com.helger.xml.microdom.IMicroElement |
getAsMicroElement() |
String |
getContext() |
int |
getExtendsCount() |
String |
getFlag()
The name of a Boolean flag variable.
|
String |
getID() |
PSLinkableGroup |
getLinkable() |
PSRichGroup |
getRich() |
boolean |
hasAnyExtends() |
boolean |
hasAnyInclude() |
boolean |
hasAnyLet() |
boolean |
hasForeignAttributes() |
boolean |
hasForeignElements() |
boolean |
isAbstract() |
boolean |
isMinimal() |
boolean |
isValid(IPSErrorHandler aErrorHandler)
Check if this element is specified completely.
|
void |
setAbstract(boolean bAbstract) |
void |
setContext(String sContext) |
void |
setFlag(String sFlag) |
void |
setID(String sID)
Set an ID for this object.
|
void |
setLinkable(PSLinkableGroup aLinkable)
Overwrite any existing linkable group.
|
void |
setRich(PSRichGroup aRich)
Overwrite any existing rich group.
|
String |
toString() |
void |
validateCompletely(IPSErrorHandler aErrorHandler)
Check if this element is specified completely.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddForeignElementsaddForeignAttributesgetRichClone, hasRichgetLinkableClone, hasLinkablepublic static final boolean DEFAULT_ABSTRACT
public boolean isValid(@Nonnull IPSErrorHandler aErrorHandler)
IPSElementisValid in interface IPSElementaErrorHandler - The error handler where the error details are stored. May not be
null.true if all mandatory fields are set and the element
is valid, false otherwise.public void validateCompletely(@Nonnull IPSErrorHandler aErrorHandler)
IPSElementvalidateCompletely in interface IPSElementaErrorHandler - The error handler where the error details are stored. May not be
null.public boolean isMinimal()
isMinimal in interface IPSElementtrue if this element conforms to the Schematron
minimal syntax, false otherwise.public void addForeignElement(@Nonnull com.helger.xml.microdom.IMicroElement aForeignElement)
addForeignElement in interface IPSHasForeignElementspublic boolean hasForeignElements()
hasForeignElements in interface IPSHasForeignElements@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<com.helger.xml.microdom.IMicroElement> getAllForeignElements()
getAllForeignElements in interface IPSHasForeignElementspublic void addForeignAttribute(@Nonnull String sAttrName, @Nonnull String sAttrValue)
addForeignAttribute in interface IPSHasForeignAttributespublic boolean hasForeignAttributes()
hasForeignAttributes in interface IPSHasForeignAttributes@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsOrderedMap<String,String> getAllForeignAttributes()
getAllForeignAttributes in interface IPSHasForeignAttributes@Nullable public String getFlag()
IPSHasFlaggetFlag in interface IPSHasFlagpublic void setRich(@Nullable PSRichGroup aRich)
IPSHasRichGroupsetRich in interface IPSHasRichGroupaRich - The new rich group to set. May be null.@Nullable public PSRichGroup getRich()
getRich in interface IPSHasRichGroupnull if none is
present.public void setLinkable(@Nullable PSLinkableGroup aLinkable)
IPSHasLinkableGroupsetLinkable in interface IPSHasLinkableGroupaLinkable - The new linkable group to set. May be null.@Nullable public PSLinkableGroup getLinkable()
getLinkable in interface IPSHasLinkableGroupnull if none is
present.public void setAbstract(boolean bAbstract)
bAbstract - The abstract state of this rule.public boolean isAbstract()
true if this rule is abstract, false
otherwise. Default is false.public void setID(@Nullable String sID)
IPSHasIDpublic void addInclude(@Nonnull PSInclude aInclude)
IPSHasIncludesaddInclude in interface IPSHasIncludesaInclude - The include to be added. May not be null.public boolean hasAnyInclude()
hasAnyInclude in interface IPSHasIncludestrue if at least one include is present in this
object.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<PSInclude> getAllIncludes()
getAllIncludes in interface IPSHasIncludesnull.public void addLet(@Nonnull PSLet aLet)
IPSHasLetsPSLet element.addLet in interface IPSHasLetsaLet - The let element to be added. May not be null.public boolean hasAnyLet()
hasAnyLet in interface IPSHasLetstrue if this object has at least on contained
PSLet object.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<PSLet> getAllLets()
getAllLets in interface IPSHasLetsPSLet elements. Never
null.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsOrderedMap<String,String> getAllLetsAsMap()
getAllLetsAsMap in interface IPSHasLetsPSLet elements as an ordered Map from
name to value. The order must match the declaration order! Never
null.public void addAssertReport(@Nonnull PSAssertReport aAssertReport)
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<PSAssertReport> getAllAssertReports()
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<PSExtends> getAllExtends()
@Nonnegative public int getExtendsCount()
public boolean hasAnyExtends()
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<IPSElement> getAllContentElements()
PSAssertReport and PSExtends
parameters@Nonnull public com.helger.xml.microdom.IMicroElement getAsMicroElement()
getAsMicroElement in interface IPSElementnull.Copyright © 2014–2016 Philip Helger. All rights reserved.