Changeset 33653 for other-projects/maori-lang-detection/src/org/greenstone/atea/morphia/WebpageInfo.java
- Timestamp:
- 2019-11-12T20:51:48+13:00 (4 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
other-projects/maori-lang-detection/src/org/greenstone/atea/morphia/WebpageInfo.java
r33652 r33653 1 package org.greenstone.atea ;1 package org.greenstone.atea.morphia; 2 2 3 import dev.morphia.annotations.*; 3 4 import java.util.ArrayList; 5 import java.util.List; 4 6 7 /** 8 * Morphia provides the Object Document Mapper for MongoDB 9 * https://www.baeldung.com/mongodb-morphia 10 * 11 */ 12 @Entity("Webpages") 5 13 public class WebpageInfo { 6 14 7 private int mriSentenceCount;8 9 15 /** db table ids */ 16 @Id 10 17 public final long webpageID; 11 public final int websiteID; 18 // TODO: should this be a "Reference" to the WebsiteInfo object instead? 19 // See section 5.2 of https://www.baeldung.com/mongodb-morphia 20 public final String websiteID; //int websiteID; 12 21 13 22 public final int totalSentences; … … 20 29 public final String modifiedTime; 21 30 public final String fetchTime; 22 public final ArrayList<SentenceInfo> singleSentences; 23 public final ArrayList<SentenceInfo> overlappingSentences; 24 25 public WebpageInfo (long webpageID, int websiteID, 31 32 @Embedded 33 public final List<SentenceInfo> singleSentences; 34 @Embedded 35 public final List<SentenceInfo> overlappingSentences; 36 37 private int mriSentenceCount; 38 private boolean containsMRI; 39 40 public WebpageInfo (long webpageID, String siteID/*int websiteID,*/, 26 41 String pageText, String pageURL, boolean isMRI, int totalSentences, 27 42 String charEncoding, String modifiedTime, String fetchTime, 28 ArrayList<SentenceInfo> singleSentences,29 ArrayList<SentenceInfo> overlappingSentences)43 List<SentenceInfo> singleSentences, 44 List<SentenceInfo> overlappingSentences) 30 45 { 31 46 32 47 this.webpageID = webpageID; 33 this.websiteID = websiteID; 48 //this.websiteID = websiteID; 49 this.websiteID = siteID; 34 50 35 51 this.totalSentences = totalSentences; … … 51 67 this.mriSentenceCount = count; 52 68 } 69 public void setContainsMRI(boolean containsMRI) { 70 this.containsMRI = containsMRI; 71 } 53 72 54 73 public int getMRISentenceCount() { return this.mriSentenceCount; }
Note:
See TracChangeset
for help on using the changeset viewer.