Class Err


  • public class Err
    extends java.lang.Object
    Class containing utility methods for handling error messages
    • Constructor Summary

      Constructors 
      Constructor Description
      Err()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String abbreviateEQName​(java.lang.String eqName)  
      static java.lang.String abbreviateURI​(java.lang.String uri)
      Abbreviate a URI for use in error messages
      static java.lang.String abbreviateURI​(NamespaceUri uri)  
      static java.lang.String depict​(Item item)
      Create a string representation of an item for use in an error message
      static java.lang.String depictCodepoint​(int cp)  
      static java.lang.CharSequence depictSequence​(Sequence seq)  
      static java.lang.String depictSequenceStart​(SequenceIterator seq, int max, int actual)  
      static java.lang.String describeGenre​(Genre genre)  
      static java.lang.String describeVisibility​(Visibility vis)  
      static java.lang.String indefiniteArticleFor​(java.lang.String s, boolean caps)  
      static java.lang.String show​(Location loc)  
      static UnicodeString truncate30​(UnicodeString cs)  
      static java.lang.String wrap​(java.lang.String cs)
      Add delimiters to represent variable information within an error message
      static java.lang.String wrap​(java.lang.String cs, int valueType)
      Add delimiters to represent variable information within an error message
      static java.lang.String wrap​(Expression exp)  
      static java.lang.String wrap​(UnicodeString cs)
      Add delimiters to represent variable information within an error message
      static java.lang.String wrap​(UnicodeString cs, int valueType)
      Add delimiters to represent variable information within an error message
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Err

        public Err()
    • Method Detail

      • wrap

        public static java.lang.String wrap​(UnicodeString cs)
        Add delimiters to represent variable information within an error message
        Parameters:
        cs - the variable information to be delimited
        Returns:
        the delimited variable information
      • wrap

        public static java.lang.String wrap​(java.lang.String cs)
        Add delimiters to represent variable information within an error message
        Parameters:
        cs - the variable information to be delimited
        Returns:
        the delimited variable information
      • wrap

        public static java.lang.String wrap​(java.lang.String cs,
                                            int valueType)
        Add delimiters to represent variable information within an error message
        Parameters:
        cs - the variable information to be delimited
        Returns:
        the delimited variable information
      • wrap

        public static java.lang.String wrap​(UnicodeString cs,
                                            int valueType)
        Add delimiters to represent variable information within an error message
        Parameters:
        cs - the variable information to be delimited
        valueType - the type of value, e.g. element name or attribute name
        Returns:
        the delimited variable information
      • depict

        public static java.lang.String depict​(Item item)
        Create a string representation of an item for use in an error message
      • depictCodepoint

        public static java.lang.String depictCodepoint​(int cp)
      • depictSequence

        public static java.lang.CharSequence depictSequence​(Sequence seq)
      • depictSequenceStart

        public static java.lang.String depictSequenceStart​(SequenceIterator seq,
                                                           int max,
                                                           int actual)
      • abbreviateURI

        public static java.lang.String abbreviateURI​(java.lang.String uri)
        Abbreviate a URI for use in error messages
        Parameters:
        uri - the full URI
        Returns:
        the URI, truncated at the last slash or to the last 15 characters, with a leading ellipsis, as appropriate
      • abbreviateURI

        public static java.lang.String abbreviateURI​(NamespaceUri uri)
      • abbreviateEQName

        public static java.lang.String abbreviateEQName​(java.lang.String eqName)
      • wrap

        public static java.lang.String wrap​(Expression exp)
      • describeGenre

        public static java.lang.String describeGenre​(Genre genre)
      • describeVisibility

        public static java.lang.String describeVisibility​(Visibility vis)
      • show

        public static java.lang.String show​(Location loc)
      • indefiniteArticleFor

        public static java.lang.String indefiniteArticleFor​(java.lang.String s,
                                                            boolean caps)