Package com.helger.schematron.pure.model
Class PSP
java.lang.Object
com.helger.schematron.pure.model.PSP
- All Implemented Interfaces:
IPSElement,IPSHasForeignAttributes,IPSHasForeignElements,IPSHasID,IPSHasMixedContent,IPSHasTexts,IPSOptionalElement
@NotThreadSafe
public class PSP
extends Object
implements IPSElement, IPSOptionalElement, IPSHasForeignElements, IPSHasMixedContent, IPSHasID
A single Schematron p-element.
A paragraph of natural language text containing maintainer and user information about the parent element. The schema can nominate paragraphs that should be rendered in a distinct way, keyed with the class attribute.
An implementation is not required to make use of this element.
A paragraph of natural language text containing maintainer and user information about the parent element. The schema can nominate paragraphs that should be rendered in a distinct way, keyed with the class attribute.
An implementation is not required to make use of this element.
- 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.IMicroElementgetClazz()getIcon()getID()getText()booleanbooleanbooleanbooleanbooleanisValid(IPSErrorHandler aErrorHandler) Check if this element is specified completely.voidvoidvoidSet an ID for this object.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
-
PSP
public PSP()
-
-
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
-
setID
Description copied from interface:IPSHasIDSet an ID for this object. -
getID
-
setClazz
-
getClazz
-
setIcon
-
getIcon
-
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.
-
getText
-
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.
-
toString
-