import uuid
from eu.dnetlib.exporter.dataciteExporter import *

class ScrollResult():

    def generate_scroll(self, timestamp=None, page_size=None, only_active=True ):
        self.id = uuid.uuid4()
        self.timestamp = None
        if timestamp:
            self.timestamp = int(timestamp)
        self.isActive = only_active        
        self.scroll_generator = scan_index(timestamp=self.timestamp,active=self.isActive, scroll_id=self.id, page_size= page_size)

    
    def next_page(self):
        return next(self.scroll_generator)



