Class MongoUtil


  • public class MongoUtil
    extends Object
    Author:
    tkunicki@boundlessgeo.com
    • Constructor Detail

      • MongoUtil

        public MongoUtil()
    • Method Detail

      • getDBOValue

        public static Object getDBOValue​(DBObject dbo,
                                         String path)
      • getDBOValue

        public static Object getDBOValue​(DBObject dbo,
                                         Iterator<String> path)
      • setDBOValue

        public static void setDBOValue​(DBObject dbo,
                                       String path,
                                       Object value)
      • setDBOValue

        public static void setDBOValue​(DBObject dbo,
                                       Iterator<String> path,
                                       Object value)
      • findIndexedGeometries

        public static Set<String> findIndexedGeometries​(DBCollection dbc)
      • findIndexedFields

        public static Set<String> findIndexedFields​(DBCollection dbc)
      • findIndexedFields

        public static Set<String> findIndexedFields​(DBCollection dbc,
                                                    String type)
      • findIndexedFields

        public static Set<String> findIndexedFields​(List<DBObject> indices,
                                                    String type)
      • findMappableFields

        public static Map<String,​Class<?>> findMappableFields​(DBCollection dbc)
      • findMappableFields

        public static Map<String,​Class<?>> findMappableFields​(DBObject dbo)
      • mapBSONObjectToJavaType

        public static Class<?> mapBSONObjectToJavaType​(Object o)
      • extractFilesNameFromUrl

        public static String extractFilesNameFromUrl​(String url)
                                              throws MalformedURLException
        Throws:
        MalformedURLException
      • isZipFile

        public static boolean isZipFile​(File file)
                                 throws IOException
        Throws:
        IOException
      • isZipFile

        public static boolean isZipFile​(String uri)
                                 throws IOException,
                                        URISyntaxException
        Throws:
        IOException
        URISyntaxException
      • extractZipFile

        public static File extractZipFile​(File destDir,
                                          File zipFile)
                                   throws ZipException,
                                          IOException
        Throws:
        ZipException
        IOException