Changeset 33910

Show
Ignore:
Timestamp:
12.02.2020 19:05:50 (8 months ago)
Author:
ak19
Message:

1. Implementing tables 3 to 5. 2. Rolled back the introduction of the basicDomain field (domain stripped of http/https and www prefixes) as the code can create and sort this field alphabetically, whereas it didn't sort properly in mongodb. 3. The code now does sort the domains stripped of protocol and www for the mongodb queries producing domain results and ensures the domain list is unique. 4. Split the MongoDBAccess class into 2, with the connection code in MongoDBAccess.java and the querying code in MongoDBQueryer (a subclass of MongoDBAccess) that is so far exclusively used by WebPageURLsListing.java

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/maori-lang-detection/src/org/greenstone/atea/MongoDBAccess.java

    r33909 r33910  
    11package org.greenstone.atea; 
    22 
    3 //import org.bson.BSONObject; 
    4  
    5 import com.mongodb.client.AggregateIterable; 
     3 
    64import com.mongodb.client.MongoCollection;  
    75import com.mongodb.client.MongoDatabase;  
    8 //import com.mongodb.client.MongoIterable; 
    9  
    10 // to use collection.find() filters like eq(), regex() etc 
    11 import static com.mongodb.client.model.Filters.*; 
    12 // to use collection.find().projection() filters like include() etc 
    13 import static com.mongodb.client.model.Projections.*; 
    14 // to use aggregation functions like unwind(), match(), sort() etc 
    15 import static com.mongodb.client.model.Aggregates.*; 
    16 // to use functions like sum() and addToSet() within aggregation functions 
    17 import static com.mongodb.client.model.Accumulators.*; 
    18  
    19 //import org.bson.conversions.Bson; 
    20 import com.mongodb.BasicDBObject; 
     6 
    217import com.mongodb.MongoClient;  
    228import com.mongodb.MongoCredential;