Package com.helger.schematron.pure.model
Class PSName
java.lang.Object
com.helger.schematron.pure.model.PSName
- All Implemented Interfaces:
com.helger.commons.lang.ICloneable<PSName>,IPSClonableElement<PSName>,IPSElement,IPSHasForeignAttributes
@NotThreadSafe
public class PSName
extends Object
implements IPSClonableElement<PSName>, IPSHasForeignAttributes
A single Schematron name-element.
Provides the names of nodes from the instance document to allow clearer assertions and diagnostics. The optional path attribute is an expression evaluated in the current context that returns a string that is the name of a node. In the latter case, the name of the node is used.
An implementation which does not report natural-language assertions is not required to make use of this element.
Provides the names of nodes from the instance document to allow clearer assertions and diagnostics. The optional path attribute is an expression evaluated in the current context that returns a string that is the name of a node. In the latter case, the name of the node is used.
An implementation which does not report natural-language assertions is not required to make use of this element.
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddForeignAttribute(String sAttrName, String sAttrValue) com.helger.xml.microdom.IMicroElementgetClone()getPath()booleanbooleanhasPath()booleanbooleanisValid(IPSErrorHandler aErrorHandler) Check if this element is specified completely.static PSNameFactory method to create a newPSNamewith a certain "path" valuevoidtoString()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
addForeignAttributes
-
Constructor Details
-
PSName
public PSName()
-
-
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.
-
getAllForeignAttributes
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getAllForeignAttributes()- Specified by:
getAllForeignAttributesin interfaceIPSHasForeignAttributes
-
hasForeignAttributes
public boolean hasForeignAttributes()- Specified by:
hasForeignAttributesin interfaceIPSHasForeignAttributes
-
addForeignAttribute
- Specified by:
addForeignAttributein interfaceIPSHasForeignAttributes
-
getPath
- Returns:
- The optional path to use.
-
hasPath
public boolean hasPath()- Returns:
trueif a path is specified,falseotherwise.
-
setPath
- Parameters:
sPath- The path to use. May benull.
-
getAsMicroElement
- Specified by:
getAsMicroElementin interfaceIPSElement- Returns:
- The XML representation of this element. Never
null.
-
getClone
- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<PSName>
-
toString
-
ofPath
Factory method to create a newPSNamewith a certain "path" value- Parameters:
sPath- The "path" value to be used. May benull.- Returns:
- Never
null. - Since:
- 6.2.3
-