Package com.helger.schematron.pure.model
Class PSActive
java.lang.Object
com.helger.schematron.pure.model.PSActive
- All Implemented Interfaces:
com.helger.commons.lang.ICloneable<PSActive>,IPSClonableElement<PSActive>,IPSElement,IPSHasForeignAttributes,IPSHasForeignElements,IPSHasMixedContent,IPSHasTexts
@NotThreadSafe
public class PSActive
extends Object
implements IPSClonableElement<PSActive>, IPSHasForeignElements, IPSHasMixedContent
A single Schematron active-element.
The required pattern attribute is a reference to a pattern that is active in the current phase.
The required pattern attribute is a reference to a pattern that is active in the current phase.
PSActive elements are only references from PSPhase elements.- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddForeignAttribute(String sAttrName, String sAttrValue) voidaddForeignElement(com.helger.xml.microdom.IMicroElement aForeignElement) voidvoidAdd a new text element.com.helger.commons.collection.impl.ICommonsList<Object>com.helger.commons.collection.impl.ICommonsList<PSDir>com.helger.commons.collection.impl.ICommonsList<PSEmph>com.helger.commons.collection.impl.ICommonsList<com.helger.xml.microdom.IMicroElement>com.helger.commons.collection.impl.ICommonsList<PSSpan>com.helger.commons.collection.impl.ICommonsList<String>com.helger.xml.microdom.IMicroElementgetClone()booleanbooleanbooleanbooleanbooleanisValid(IPSErrorHandler aErrorHandler) Check if this element is specified completely.voidsetPattern(String sPattern) toString()voidvalidateCompletely(IPSErrorHandler aErrorHandler) Check if this element is specified completely.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.schematron.pure.model.IPSHasForeignAttributes
addForeignAttributesMethods inherited from interface com.helger.schematron.pure.model.IPSHasForeignElements
addForeignElements
-
Constructor Details
-
PSActive
public PSActive()
-
-
Method Details
-
isValid
Description copied from interface:IPSElementCheck if this element is specified completely. This method stops at the first encountered error.- Specified by:
isValidin interfaceIPSElement- Parameters:
aErrorHandler- The error handler where the error details are stored. May not benull.- Returns:
trueif all mandatory fields are set and the element is valid,falseotherwise.
-
validateCompletely
Description copied from interface:IPSElementCheck if this element is specified completely. This method performs all validations independent of the number of encountered error.- Specified by:
validateCompletelyin interfaceIPSElement- Parameters:
aErrorHandler- The error handler where the error details are stored. May not benull.
-
isMinimal
public boolean isMinimal()- Specified by:
isMinimalin interfaceIPSElement- Returns:
trueif this element conforms to the Schematron minimal syntax,falseotherwise.
-
addForeignElement
- Specified by:
addForeignElementin interfaceIPSHasForeignElements
-
hasForeignElements
public boolean hasForeignElements()- Specified by:
hasForeignElementsin interfaceIPSHasForeignElements
-
getAllForeignElements
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<com.helger.xml.microdom.IMicroElement> getAllForeignElements()- Specified by:
getAllForeignElementsin interfaceIPSHasForeignElements
-
addForeignAttribute
- Specified by:
addForeignAttributein interfaceIPSHasForeignAttributes
-
hasForeignAttributes
public boolean hasForeignAttributes()- Specified by:
hasForeignAttributesin interfaceIPSHasForeignAttributes
-
getAllForeignAttributes
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getAllForeignAttributes()- Specified by:
getAllForeignAttributesin interfaceIPSHasForeignAttributes
-
setPattern
- Parameters:
sPattern- The ID of the pattern to set active.
-
getPattern
- Returns:
- ID of the
PSPatternto be marked active. May benull.
-
addText
Description copied from interface:IPSHasTextsAdd a new text element.- Specified by:
addTextin interfaceIPSHasTexts- Parameters:
sText- The text to be added. May not benull.
-
hasAnyText
public boolean hasAnyText()- Specified by:
hasAnyTextin interfaceIPSHasTexts- Returns:
trueif at least one text element is contained,falseif not
-
getAllTexts
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<String> getAllTexts()- Specified by:
getAllTextsin interfaceIPSHasTexts- Returns:
- A copy of all contained text elements. Never
null.
-
addDir
-
getAllDirs
-
addEmph
-
getAllEmphs
-
addSpan
-
getAllSpans
-
getAllContentElements
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<Object> getAllContentElements()- Specified by:
getAllContentElementsin interfaceIPSHasMixedContent- Returns:
- A list of
String,PSDir,PSEmphandPSSpanelements.
-
getAsMicroElement
- Specified by:
getAsMicroElementin interfaceIPSElement- Returns:
- The XML representation of this element. Never
null.
-
getClone
- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<PSActive>
-
toString
-