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.
Author:
Philip Helger
  • Constructor Details

    • PSP

      public PSP()
  • Method Details

    • isValid

      public boolean isValid(@Nonnull IPSErrorHandler aErrorHandler)
      Description copied from interface: IPSElement
      Check if this element is specified completely. This method stops at the first encountered error.
      Specified by:
      isValid in interface IPSElement
      Parameters:
      aErrorHandler - The error handler where the error details are stored. May not be null.
      Returns:
      true if all mandatory fields are set and the element is valid, false otherwise.
    • validateCompletely

      public void validateCompletely(@Nonnull IPSErrorHandler aErrorHandler)
      Description copied from interface: IPSElement
      Check if this element is specified completely. This method performs all validations independent of the number of encountered error.
      Specified by:
      validateCompletely in interface IPSElement
      Parameters:
      aErrorHandler - The error handler where the error details are stored. May not be null.
    • isMinimal

      public boolean isMinimal()
      Specified by:
      isMinimal in interface IPSElement
      Returns:
      true if this element conforms to the Schematron minimal syntax, false otherwise.
    • addForeignElement

      public void addForeignElement(@Nonnull com.helger.xml.microdom.IMicroElement aForeignElement)
      Specified by:
      addForeignElement in interface IPSHasForeignElements
    • hasForeignElements

      public boolean hasForeignElements()
      Specified by:
      hasForeignElements in interface IPSHasForeignElements
    • getAllForeignElements

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<com.helger.xml.microdom.IMicroElement> getAllForeignElements()
      Specified by:
      getAllForeignElements in interface IPSHasForeignElements
    • addForeignAttribute

      public void addForeignAttribute(@Nonnull String sAttrName, @Nonnull String sAttrValue)
      Specified by:
      addForeignAttribute in interface IPSHasForeignAttributes
    • hasForeignAttributes

      public boolean hasForeignAttributes()
      Specified by:
      hasForeignAttributes in interface IPSHasForeignAttributes
    • getAllForeignAttributes

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getAllForeignAttributes()
      Specified by:
      getAllForeignAttributes in interface IPSHasForeignAttributes
    • setID

      public void setID(@Nullable String sID)
      Description copied from interface: IPSHasID
      Set an ID for this object.
      Specified by:
      setID in interface IPSHasID
      Parameters:
      sID - The ID to be set. May be null.
    • getID

      @Nullable public String getID()
      Specified by:
      getID in interface IPSHasID
      Returns:
      The optional ID of this element. May be null.
    • setClazz

      public void setClazz(@Nullable String sClass)
    • getClazz

      @Nullable public String getClazz()
    • setIcon

      public void setIcon(@Nullable String sIcon)
    • getIcon

      @Nullable public String getIcon()
    • addText

      public void addText(@Nonnull @Nonempty String sText)
      Description copied from interface: IPSHasTexts
      Add a new text element.
      Specified by:
      addText in interface IPSHasTexts
      Parameters:
      sText - The text to be added. May not be null.
    • hasAnyText

      public boolean hasAnyText()
      Specified by:
      hasAnyText in interface IPSHasTexts
      Returns:
      true if at least one text element is contained, false if not
    • getAllTexts

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<String> getAllTexts()
      Specified by:
      getAllTexts in interface IPSHasTexts
      Returns:
      A copy of all contained text elements. Never null.
    • getText

      @Nullable public String getText()
    • addDir

      public void addDir(@Nonnull PSDir aDir)
    • getAllDirs

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<PSDir> getAllDirs()
    • addEmph

      public void addEmph(@Nonnull PSEmph aEmph)
    • getAllEmphs

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<PSEmph> getAllEmphs()
    • addSpan

      public void addSpan(@Nonnull PSSpan aSpan)
    • getAllSpans

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<PSSpan> getAllSpans()
    • getAllContentElements

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<Object> getAllContentElements()
      Specified by:
      getAllContentElements in interface IPSHasMixedContent
      Returns:
      A list of String, PSDir, PSEmph and PSSpan elements.
    • getAsMicroElement

      @Nonnull public com.helger.xml.microdom.IMicroElement getAsMicroElement()
      Specified by:
      getAsMicroElement in interface IPSElement
      Returns:
      The XML representation of this element. Never null.
    • toString

      public String toString()
      Overrides:
      toString in class Object