Class GrokParser


  • @ThreadSafe
    public class GrokParser
    extends java.lang.Object
    A simple validating parser for XML Grok Assembly XML files.
    Author:
    Jeremy Long
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String GROK_SCHEMA
      The grok assembly schema file location.
    • Constructor Summary

      Constructors 
      Constructor Description
      GrokParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AssemblyData parse​(java.io.File file)
      Parses the given XML file and returns the assembly data.
      AssemblyData parse​(java.io.InputStream inputStream)
      Parses the given XML stream and returns the contained assembly data.
      • Methods inherited from class java.lang.Object

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

      • GROK_SCHEMA

        public static final java.lang.String GROK_SCHEMA
        The grok assembly schema file location.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GrokParser

        public GrokParser()
    • Method Detail

      • parse

        public AssemblyData parse​(java.io.File file)
                           throws GrokParseException
        Parses the given XML file and returns the assembly data.
        Parameters:
        file - an XML file containing assembly data
        Returns:
        the assembly data
        Throws:
        GrokParseException - thrown if the XML file cannot be parsed
      • parse

        public AssemblyData parse​(java.io.InputStream inputStream)
                           throws GrokParseException
        Parses the given XML stream and returns the contained assembly data.
        Parameters:
        inputStream - an InputStream containing assembly data
        Returns:
        the assembly data
        Throws:
        GrokParseException - thrown if the XML cannot be parsed