Ignore:
Timestamp:
2020-02-12T19:05:50+13:00 (4 years 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
File:
1 edited

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;
Note: See TracChangeset for help on using the changeset viewer.