Class ViolationParserUtils


  • public final class ViolationParserUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String asString​(javax.xml.stream.XMLStreamReader xmlr)  
      static javax.xml.stream.XMLStreamReader createXmlReader​(java.io.InputStream input)  
      static java.util.Optional<java.lang.String> findAttribute​(javax.xml.stream.XMLStreamReader in, java.lang.String attribute)  
      static java.util.Optional<java.lang.Integer> findIntegerAttribute​(javax.xml.stream.XMLStreamReader in, java.lang.String attribute)  
      static java.lang.String getAttribute​(javax.xml.stream.XMLStreamReader in, java.lang.String attribute)  
      static java.lang.Integer getIntegerAttribute​(javax.xml.stream.XMLStreamReader in, java.lang.String attribute)  
      static java.util.List<java.lang.String> getLines​(java.lang.String string)  
      static java.util.List<java.util.List<java.lang.String>> getLines​(java.lang.String string, java.lang.String regexpPerLine)  
      static java.util.List<java.lang.String> getParts​(java.lang.String string, java.lang.String... regexpList)
      Match one regexp at a time.
      • Methods inherited from class java.lang.Object

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

      • asString

        public static java.lang.String asString​(javax.xml.stream.XMLStreamReader xmlr)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findAttribute

        public static java.util.Optional<java.lang.String> findAttribute​(javax.xml.stream.XMLStreamReader in,
                                                                         java.lang.String attribute)
      • findIntegerAttribute

        public static java.util.Optional<java.lang.Integer> findIntegerAttribute​(javax.xml.stream.XMLStreamReader in,
                                                                                 java.lang.String attribute)
      • getAttribute

        public static java.lang.String getAttribute​(javax.xml.stream.XMLStreamReader in,
                                                    java.lang.String attribute)
      • getIntegerAttribute

        public static java.lang.Integer getIntegerAttribute​(javax.xml.stream.XMLStreamReader in,
                                                            java.lang.String attribute)
      • getLines

        public static java.util.List<java.lang.String> getLines​(java.lang.String string)
      • getLines

        public static java.util.List<java.util.List<java.lang.String>> getLines​(java.lang.String string,
                                                                                java.lang.String regexpPerLine)
        Returns:
        List per line in String, with groups from regexpPerLine.
      • getParts

        public static java.util.List<java.lang.String> getParts​(java.lang.String string,
                                                                java.lang.String... regexpList)
        Match one regexp at a time. Remove the matched part from the string, trim, and match next regexp on that string...
      • createXmlReader

        public static javax.xml.stream.XMLStreamReader createXmlReader​(java.io.InputStream input)
                                                                throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException