Class JsonImageDetectionDecoder

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static org.apache.log4j.Logger logger  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ImageDetection decodeImageDetection​(javax.json.JsonObject json)  
      private static java.awt.geom.Path2D decodePolygon​(javax.json.JsonArray json)
      Decodes a polygon (may be a multipolygon) from JSON
      private static java.awt.Shape decodeShape​(javax.json.JsonValue json)  
      private static java.awt.geom.Path2D decodeSimplePolygon​(javax.json.JsonArray json)
      Decodes a simple polygon (consisting of only one continuous path) from JSON
      • Methods inherited from class java.lang.Object

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

      • logger

        static final org.apache.log4j.Logger logger
    • Method Detail

      • decodeShape

        private static java.awt.Shape decodeShape​(javax.json.JsonValue json)
      • decodePolygon

        private static java.awt.geom.Path2D decodePolygon​(javax.json.JsonArray json)
        Decodes a polygon (may be a multipolygon) from JSON
        Parameters:
        json - the json array to decode, must not be null
        Returns:
        the decoded polygon as Path2D.Double
      • decodeSimplePolygon

        private static java.awt.geom.Path2D decodeSimplePolygon​(javax.json.JsonArray json)
        Decodes a simple polygon (consisting of only one continuous path) from JSON
        Parameters:
        json - the json array to decode, must not be null
        Returns:
        the decoded polygon as Path2D.Double
        Throws:
        java.lang.NullPointerException - if parameter is null