Class JSONOutputOperator

    • Field Detail

      • filename

        protected String filename
        Path to the output file/
    • Constructor Detail

      • JSONOutputOperator

        public JSONOutputOperator()
      • JSONOutputOperator

        public JSONOutputOperator​(String filename)
    • Method Detail

      • getId

        public String getId()
      • getName

        public String getName()
      • getDescription

        public String getDescription()
      • getCategory

        public String getCategory()
      • getFilename

        public String getFilename()
      • setFilename

        public void setFilename​(String filename)
      • apply

        public void apply​(AreaTree atree)
      • dumpTo

        public void dumpTo​(AreaTree atree,
                           PrintWriter writer)
        Dumps input AreTree to JSON.
        Parameters:
        atree - input area tree
        writer - output writer
      • dumpTo

        public void dumpTo​(Page page,
                           PrintWriter writer)
        Dumps a Page to JSON.
        Parameters:
        atree - input area tree
        writer - output writer
      • getSuccessRate

        public double getSuccessRate()
        Calculates successfully pages (pages with name and price).
        Returns:
        Percentage of success
      • getLabelCount

        public int getLabelCount()