public interface IMongoSerializer
Modifier and Type | Interface and Description |
---|---|
static class |
IMongoSerializer.Stage |
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_CONTENT_CHECKSUM |
static String |
FIELD_CONTENT_TYPE |
static String |
FIELD_CRAWL_DATE |
static String |
FIELD_CRAWL_STATE |
static String |
FIELD_DEPTH |
static String |
FIELD_IS_ROOT_PARENT_REFERENCE |
static String |
FIELD_IS_VALID |
static String |
FIELD_META_CHECKSUM |
static String |
FIELD_PARENT_ROOT_REFERENCE |
static String |
FIELD_REFERENCE |
static String |
FIELD_REFERENCE_EXCESSIVE |
static String |
FIELD_STAGE |
Modifier and Type | Method and Description |
---|---|
void |
createIndices(com.mongodb.client.MongoCollection<org.bson.Document> referenceCollection,
com.mongodb.client.MongoCollection<org.bson.Document> cachedCollection)
Creates Mongo indices for the given collections.
|
ICrawlData |
fromDocument(org.bson.Document document)
Converts a Mongo
Document to an ICrawlData . |
org.bson.Document |
getNextQueued(com.mongodb.client.MongoCollection<org.bson.Document> referenceCollection)
Gets the next queued DB document from the given collection.
|
org.bson.Document |
toDocument(IMongoSerializer.Stage stage,
ICrawlData crawlData)
Converts a
ICrawlData to a Mongo Document . |
static final String FIELD_REFERENCE
static final String FIELD_PARENT_ROOT_REFERENCE
static final String FIELD_IS_ROOT_PARENT_REFERENCE
static final String FIELD_CRAWL_STATE
static final String FIELD_META_CHECKSUM
static final String FIELD_CONTENT_CHECKSUM
static final String FIELD_IS_VALID
static final String FIELD_STAGE
static final String FIELD_DEPTH
static final String FIELD_CONTENT_TYPE
static final String FIELD_CRAWL_DATE
static final String FIELD_REFERENCE_EXCESSIVE
org.bson.Document toDocument(IMongoSerializer.Stage stage, ICrawlData crawlData)
ICrawlData
to a Mongo Document
.stage
- the Mongo serializer stagecrawlData
- the data to serializeICrawlData fromDocument(org.bson.Document document)
Document
to an ICrawlData
.document
- Mongo documentorg.bson.Document getNextQueued(com.mongodb.client.MongoCollection<org.bson.Document> referenceCollection)
referenceCollection
- the collection to get the next document fromvoid createIndices(com.mongodb.client.MongoCollection<org.bson.Document> referenceCollection, com.mongodb.client.MongoCollection<org.bson.Document> cachedCollection)
referenceCollection
- the collection holding crawl referencescachedCollection
- the collection holding cached crawl referencesCopyright © 2014–2021 Norconex Inc.. All rights reserved.