Class AbstractPulsarSession
-
- All Implemented Interfaces:
-
ai.platon.pulsar.session.PulsarSession,java.lang.AutoCloseable
public abstract class AbstractPulsarSession implements PulsarSession
Created by vincent on 18-1-17. Copyright @ 2013-2023 Platon AI. All rights reserved
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAbstractPulsarSession.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerID_CAPACITYpublic final static IntegerID_STARTpublic final static IntegerID_ENDprivate final ImmutableConfigunmodifiedConfigprivate final BeanFactorysessionBeanFactoryprivate final Stringdisplayprivate final BooleanisActiveprivate final GlobalCacheFactoryglobalCacheFactoryprivate final GlobalCacheglobalCacheprivate final ConcurrentExpiringLRUCache<String, WebPage>pageCacheprivate final ConcurrentExpiringLRUCache<String, FeaturedDocument>documentCacheprivate final AbstractPulsarContextcontextprivate final VolatileConfigsessionConfigprivate final Integeridpublic final static AbstractPulsarSession.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description AbstractPulsarSession(AbstractPulsarContext context, VolatileConfig sessionConfig, Integer id)
-
Method Summary
Modifier and Type Method Description ImmutableConfiggetUnmodifiedConfig()An immutable config which is loaded from the config file at process startup, and never changes BeanFactorygetSessionBeanFactory()The scoped bean factory: for each volatileConfig object, there is a bean factory StringgetDisplay()A short descriptive display text. final BooleanisActive()GlobalCacheFactorygetGlobalCacheFactory()GlobalCachegetGlobalCache()The global cache ConcurrentExpiringLRUCache<String, WebPage>getPageCache()The global page cache ConcurrentExpiringLRUCache<String, FeaturedDocument>getDocumentCache()The global document cache AbstractPulsarContextgetContext()The pulsar context VolatileConfiggetSessionConfig()The session scope volatile config, every setting is supposed to be changed at any time and any place IntegergetId()The session id. BooleanregisterClosable(AutoCloseable closable)Close objects when the session closes UnitdisablePDCache()Disable page cache and document cache LoadOptionsoptions(String args, PageEvent event)Create a new LoadOptions object with args, event, and sessionConfig. Stringproperty(String name)Get a property. Unitproperty(String name, String value)Set a session scope property. NormUrlnormalize(String url)Normalize a url. NormUrlnormalize(String url, String args, Boolean toItemOption)Normalize a url. NormUrlnormalize(String url, LoadOptions options, Boolean toItemOption)Normalize a url. List<NormUrl>normalize(Iterable<String> urls)Normalize urls. List<NormUrl>normalize(Iterable<String> urls, String args, Boolean toItemOption)Normalize urls. List<NormUrl>normalize(Iterable<String> urls, LoadOptions options, Boolean toItemOption)Normalize urls. NormUrlnormalize(UrlAware url)Normalize a url. NormUrlnormalize(UrlAware url, String args, Boolean toItemOption)Normalize a url. NormUrlnormalize(UrlAware url, LoadOptions options, Boolean toItemOption)Normalize a url. List<NormUrl>normalize(Collection<UrlAware> urls)Normalize urls. List<NormUrl>normalize(Collection<UrlAware> urls, String args, Boolean toItemOption)Normalize urls, remove invalid ones List<NormUrl>normalize(Collection<UrlAware> urls, LoadOptions options, Boolean toItemOption)Normalize urls, remove invalid ones NormUrlnormalizeOrNull(String url, LoadOptions options, Boolean toItemOption)Normalize a url. NormUrlnormalizeOrNull(UrlAware url, LoadOptions options, Boolean toItemOption)Normalize a url. WebPageinject(String url)Inject a url as a seed to fetch. WebPageget(String url)Get a page from storage. WebPageget(String url, String fields)Get a page from storage. WebPagegetOrNull(String url)Get a page from storage. WebPagegetOrNull(String url, String fields)Get a page from storage. ByteBuffergetContent(String url)Get the content of the page from the storage StringgetContentAsString(String url)Get the content of the page from the storage Booleanexists(String url)Check if the page exists in the storage. CheckStatefetchState(WebPage page, LoadOptions options)Return the fetch state of the page. WebPageopen(String url)Open a url. WebPageload(String url)Load a url with specified arguments. WebPageload(String url, String args)Load a url with specified arguments. WebPageload(String url, LoadOptions options)Load a url with specified options. WebPageload(UrlAware url)Load a url with the specified arguments. WebPageload(UrlAware url, String args)Load a url with the specified arguments. WebPageload(UrlAware url, LoadOptions options)Load a url with options. WebPageload(NormUrl normUrl)Load a normal url. WebPageloadDeferred(String url, String args)Load a url with specified options. WebPageloadDeferred(String url, LoadOptions options)Load a url with specified options. WebPageloadDeferred(UrlAware url, String args)Load a url with specified arguments. WebPageloadDeferred(UrlAware url, LoadOptions options)Load a url with specified options. WebPageloadDeferred(NormUrl url)Load a url with specified optionsThis method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<WebPage>loadAll(Iterable<String> urls)Load all urls with specified optionsThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<WebPage>loadAll(Iterable<String> urls, String args)Load all urls with specified optionsThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<WebPage>loadAll(Iterable<String> urls, LoadOptions options)Load all urls with specified optionsThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<WebPage>loadAll(Collection<UrlAware> urls)Load all urls with specified optionsThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<WebPage>loadAll(Collection<UrlAware> urls, String args)Load all urls with specified optionsThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<WebPage>loadAll(Collection<UrlAware> urls, LoadOptions options)Load all urls with specified optionsThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<WebPage>loadAll(List<NormUrl> normUrls)Load all normal urls with specified optionsThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. CompletableFuture<WebPage>loadAsync(String url)Load a normal url in java async style CompletableFuture<WebPage>loadAsync(String url, String args)Load a normal url in java async style CompletableFuture<WebPage>loadAsync(String url, LoadOptions options)Load a normal url in java async style CompletableFuture<WebPage>loadAsync(UrlAware url)Load a normal url in java async style CompletableFuture<WebPage>loadAsync(UrlAware url, String args)Load a normal url in java async style CompletableFuture<WebPage>loadAsync(UrlAware url, LoadOptions options)Load a normal url in java async style CompletableFuture<WebPage>loadAsync(NormUrl url)Load a normal url in java async style List<CompletableFuture<WebPage>>loadAllAsync(Iterable<String> urls)Load all normal urls in java async styleThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. List<CompletableFuture<WebPage>>loadAllAsync(Iterable<String> urls, String args)Load all normal urls in java async style. List<CompletableFuture<WebPage>>loadAllAsync(Iterable<String> urls, LoadOptions options)Load all normal urls in java async style. List<CompletableFuture<WebPage>>loadAllAsync(Collection<UrlAware> urls)Load all normal urls in java async style. List<CompletableFuture<WebPage>>loadAllAsync(Collection<UrlAware> urls, String args)Load all normal urls in java async style. List<CompletableFuture<WebPage>>loadAllAsync(Collection<UrlAware> urls, LoadOptions options)Load all normal urls in java async style. List<CompletableFuture<WebPage>>loadAllAsync(List<NormUrl> urls)Load all normal urls in java async styleThis method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet. AbstractPulsarSessionsubmit(String url)Submit a url to the URL pool, the url will be processed in the crawl loop later AbstractPulsarSessionsubmit(String url, String args)Submit a url to the URL pool, and it will be processed in a crawl loop AbstractPulsarSessionsubmit(String url, LoadOptions options)Submit a url to the URL pool, and it will be processed in a crawl loop AbstractPulsarSessionsubmit(UrlAware url)Submit a url to the URL pool, and it will be processed in a crawl loop AbstractPulsarSessionsubmit(UrlAware url, String args)Submit a url to the URL pool, and it will be processed in a crawl loop AbstractPulsarSessionsubmitAll(Iterable<String> urls)Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop AbstractPulsarSessionsubmitAll(Iterable<String> urls, String args)Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop AbstractPulsarSessionsubmitAll(Iterable<String> urls, LoadOptions options)Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop AbstractPulsarSessionsubmitAll(Collection<UrlAware> urls)Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop AbstractPulsarSessionsubmitAll(Collection<UrlAware> urls, String args)Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop List<WebPage>loadOutPages(String portalUrl, String args)Load or fetch the portal page, and then load or fetch the out links selected by -outLinkoption.List<WebPage>loadOutPages(String portalUrl, LoadOptions options)Load or fetch the portal page, and then load or fetch the out links selected by -outLinkoption.List<WebPage>loadOutPages(UrlAware portalUrl, String args)Load or fetch the portal page, and then load or fetch the out links selected by -outLinkoption.List<WebPage>loadOutPages(UrlAware portalUrl, LoadOptions options)Load or fetch the portal page, and then load or fetch the out links selected by -outLinkoption.AbstractPulsarSessionsubmitForOutPages(String portalUrl, String args)Load the portal page and submit the out links specified by the -outLinkoption to the URL pool.AbstractPulsarSessionsubmitForOutPages(String portalUrl, LoadOptions options)Load the portal page and submit the out links specified by the -outLinkoption to the URL pool.AbstractPulsarSessionsubmitForOutPages(UrlAware portalUrl, String args)Load the portal page and submit the out links specified by the -outLinkoption to the URL pool.AbstractPulsarSessionsubmitForOutPages(UrlAware portalUrl, LoadOptions options)Load the portal page and submit the out links specified by the -outLinkoption to the URL pool.List<CompletableFuture<WebPage>>loadOutPagesAsync(String portalUrl, String args)Load or fetch the portal page, and then load or fetch the out links selected by -outLinkoption asynchronously.List<CompletableFuture<WebPage>>loadOutPagesAsync(String portalUrl, LoadOptions options)Load or fetch the portal page, and then load or fetch the out links selected by -outLinkoption asynchronously.WebPageloadResource(String url, String referrer)Load a url as a resource without browser rendering. WebPageloadResource(String url, String referrer, String args)Load a url as a resource without browser rendering. WebPageloadResource(String url, String referrer, LoadOptions options)Load a url as a resource without browser rendering. WebPageloadResourceDeferred(String url, String referrer)Load a url as a resource without browser rendering. WebPageloadResourceDeferred(String url, String referrer, String args)Load a url as a resource without browser rendering. WebPageloadResourceDeferred(String url, String referrer, LoadOptions options)Load a url as a resource without browser rendering. FeaturedDocumentparse(WebPage page)Parse a webpage into an HTML document. FeaturedDocumentparse(WebPage page, Boolean noCache)Parse a webpage into an HTML document. FeaturedDocumentloadDocument(String url)Load or fetch a webpage and parse it into an HTML document FeaturedDocumentloadDocument(String url, String args)Load or fetch a webpage and parse it into an HTML document FeaturedDocumentloadDocument(String url, LoadOptions options)Load or fetch a webpage and parse it into an HTML document FeaturedDocumentloadDocument(UrlAware url)Load or fetch a webpage and parse it into an HTML document FeaturedDocumentloadDocument(UrlAware url, String args)Load or fetch a webpage and parse it into an HTML document FeaturedDocumentloadDocument(UrlAware url, LoadOptions options)Load or fetch a webpage and parse it into an HTML document FeaturedDocumentloadDocument(NormUrl url)Load or fetch a webpage and then parse it into an HTML document. Map<String, String>scrape(String url, String args, Iterable<String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. Map<String, String>scrape(String url, LoadOptions options, Iterable<String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. Map<String, String>scrape(String url, String args, Map<String, String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. Map<String, String>scrape(String url, LoadOptions options, Map<String, String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. List<Map<String, String>>scrape(String url, String args, String restrictSelector, Iterable<String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. List<Map<String, String>>scrape(String url, LoadOptions options, String restrictSelector, Iterable<String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. List<Map<String, String>>scrape(String url, String args, String restrictSelector, Map<String, String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. List<Map<String, String>>scrape(String url, LoadOptions options, String restrictSelector, Map<String, String> fieldSelectors)Load or fetch a webpage located by the given url, and then extract fields specified by field selectors. List<Map<String, String>>scrapeOutPages(String portalUrl, String args, Iterable<String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. List<Map<String, String>>scrapeOutPages(String portalUrl, LoadOptions options, Iterable<String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. List<Map<String, String>>scrapeOutPages(String portalUrl, String args, String restrictSelector, Iterable<String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. List<Map<String, String>>scrapeOutPages(String portalUrl, LoadOptions options, String restrictSelector, Iterable<String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. List<Map<String, String>>scrapeOutPages(String portalUrl, String args, Map<String, String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. List<Map<String, String>>scrapeOutPages(String portalUrl, LoadOptions options, Map<String, String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. List<Map<String, String>>scrapeOutPages(String portalUrl, String args, String restrictSelector, Map<String, String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. List<Map<String, String>>scrapeOutPages(String portalUrl, LoadOptions options, String restrictSelector, Map<String, String> fieldSelectors)Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page. ObjectgetVariable(String name)Get a variable from this session UnitsetVariable(String name, Object value)Set a variable into this session UnitputSessionBean(Object obj)Put session scope bean final <T extends Any> TgetSessionBean()Unitdelete(String url)Delete a webpage from the storage Unitflush()Flush to the storage Booleanpersist(WebPage page)Persist to the storage Pathexport(WebPage page)Export the content of a webpage. Pathexport(WebPage page, String ident)Export the content of a webpage. Pathexport(FeaturedDocument doc)Export the outer HTML of the document. Pathexport(FeaturedDocument doc, String ident)Export the outer HTML of the document. PathexportTo(FeaturedDocument doc, Path path)Export the whole HTML of the document to the given path. Booleanequals(Object other)IntegerhashCode()StringtoString()Unitclose()-
-
Constructor Detail
-
AbstractPulsarSession
AbstractPulsarSession(AbstractPulsarContext context, VolatileConfig sessionConfig, Integer id)
-
-
Method Detail
-
getUnmodifiedConfig
ImmutableConfig getUnmodifiedConfig()
An immutable config which is loaded from the config file at process startup, and never changes
-
getSessionBeanFactory
BeanFactory getSessionBeanFactory()
The scoped bean factory: for each volatileConfig object, there is a bean factory
-
getDisplay
String getDisplay()
A short descriptive display text.
-
getGlobalCacheFactory
GlobalCacheFactory getGlobalCacheFactory()
-
getGlobalCache
GlobalCache getGlobalCache()
The global cache
-
getPageCache
ConcurrentExpiringLRUCache<String, WebPage> getPageCache()
The global page cache
-
getDocumentCache
ConcurrentExpiringLRUCache<String, FeaturedDocument> getDocumentCache()
The global document cache
-
getContext
AbstractPulsarContext getContext()
The pulsar context
-
getSessionConfig
VolatileConfig getSessionConfig()
The session scope volatile config, every setting is supposed to be changed at any time and any place
-
getId
Integer getId()
The session id. Session id is expected to be set by the container, e.g. the h2 database runtime
-
registerClosable
Boolean registerClosable(AutoCloseable closable)
Close objects when the session closes
-
disablePDCache
Unit disablePDCache()
Disable page cache and document cache
-
options
LoadOptions options(String args, PageEvent event)
Create a new LoadOptions object with args, event, and sessionConfig.
-
normalize
NormUrl normalize(String url, LoadOptions options, Boolean toItemOption)
Normalize a url.
-
normalize
List<NormUrl> normalize(Iterable<String> urls, String args, Boolean toItemOption)
Normalize urls.
-
normalize
List<NormUrl> normalize(Iterable<String> urls, LoadOptions options, Boolean toItemOption)
Normalize urls.
-
normalize
NormUrl normalize(UrlAware url, LoadOptions options, Boolean toItemOption)
Normalize a url.
-
normalize
List<NormUrl> normalize(Collection<UrlAware> urls)
Normalize urls.
-
normalize
List<NormUrl> normalize(Collection<UrlAware> urls, String args, Boolean toItemOption)
Normalize urls, remove invalid ones
- Parameters:
urls- The urls to normalizeargs- The argumentstoItemOption- If the LoadOptions is converted to item load options- Returns:
All normalized urls, all invalid input urls are removed
-
normalize
List<NormUrl> normalize(Collection<UrlAware> urls, LoadOptions options, Boolean toItemOption)
Normalize urls, remove invalid ones
- Parameters:
urls- The urls to normalizeoptions- The LoadOptions applied to each urltoItemOption- If the LoadOptions is converted to item load options- Returns:
All normalized urls, all invalid input urls are removed
-
normalizeOrNull
NormUrl normalizeOrNull(String url, LoadOptions options, Boolean toItemOption)
Normalize a url.
-
normalizeOrNull
NormUrl normalizeOrNull(UrlAware url, LoadOptions options, Boolean toItemOption)
Normalize a url.
-
inject
WebPage inject(String url)
Inject a url as a seed to fetch. Injection is usually used in Nutch style crawls where the execution flow likes the following:
inject -> generate -> fetch -> parse -> index -> update ^ ^ | <- <- <- <- |
- Parameters:
url- The url to inject, con be followed by arguments- Returns:
A newly created webpage record which is ready to be generated
-
get
WebPage get(String url)
Get a page from storage.
- Parameters:
url- The url- Returns:
The webpage in storage if exists, otherwise returns a NIL page
-
get
WebPage get(String url, String fields)
Get a page from storage.
- Parameters:
url- The urlfields- The fields to load from local storage- Returns:
The webpage in storage if exists, otherwise returns a NIL page
-
getOrNull
WebPage getOrNull(String url)
Get a page from storage.
- Parameters:
url- The url- Returns:
The page in storage if exists, otherwise returns null
-
getOrNull
WebPage getOrNull(String url, String fields)
Get a page from storage.
- Parameters:
url- The urlfields- The fields to load from local storage- Returns:
The page in storage if exists, otherwise returns null
-
getContent
ByteBuffer getContent(String url)
Get the content of the page from the storage
- Parameters:
url- The url of the page to retrieve- Returns:
The page content or null
-
getContentAsString
String getContentAsString(String url)
Get the content of the page from the storage
- Parameters:
url- The url of the page to retrieve- Returns:
The page content in string format or null
-
exists
Boolean exists(String url)
Check if the page exists in the storage.
- Parameters:
url- The url to check- Returns:
true if the page exists, false otherwise
-
fetchState
CheckState fetchState(WebPage page, LoadOptions options)
Return the fetch state of the page.
- Parameters:
page- The webpageoptions- The load options- Returns:
The fetch state of the page
-
open
WebPage open(String url)
Open a url.
This method opens the url immediately, regardless of the previous state of the page.
- Parameters:
url- The url to open- Returns:
The webpage loaded or NIL
-
load
WebPage load(String url)
Load a url with specified arguments.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
Other fetch conditions can be specified by load arguments:
expiration
page size requirement
fields requirement
other
- Parameters:
url- The url to load- Returns:
The webpage loaded or NIL
-
load
WebPage load(String url, String args)
Load a url with specified arguments.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
Other fetch conditions can be specified by load arguments:
expiration
page size requirement
fields requirement
other
- Parameters:
url- The url to loadargs- The load arguments- Returns:
The webpage loaded or NIL
-
load
WebPage load(String url, LoadOptions options)
Load a url with specified options.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
Other fetch conditions can be specified by load arguments:
expiration
page size requirement
fields requirement
other
- Parameters:
url- The url to loadoptions- The load options- Returns:
The webpage loaded or NIL
-
load
WebPage load(UrlAware url)
Load a url with the specified arguments.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
url- The url to load- Returns:
The webpage loaded or NIL
-
load
WebPage load(UrlAware url, String args)
Load a url with the specified arguments.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
url- The url to loadargs- The load arguments- Returns:
The webpage loaded or NIL
-
load
WebPage load(UrlAware url, LoadOptions options)
Load a url with options.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
url- The url to loadoptions- The load options- Returns:
The webpage loaded or NIL
-
load
WebPage load(NormUrl normUrl)
Load a normal url.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
normUrl- The normal url- Returns:
The webpage loaded or NIL
-
loadDeferred
WebPage loadDeferred(String url, String args)
Load a url with specified options.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The url to loadargs- The load options- Returns:
The webpage loaded or NIL
-
loadDeferred
WebPage loadDeferred(String url, LoadOptions options)
Load a url with specified options.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The url to loadoptions- The load options- Returns:
The webpage loaded or NIL
-
loadDeferred
WebPage loadDeferred(UrlAware url, String args)
Load a url with specified arguments.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The url to loadargs- The load args- Returns:
The webpage loaded or NIL
-
loadDeferred
WebPage loadDeferred(UrlAware url, LoadOptions options)
Load a url with specified options.
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The url to loadoptions- The load options- Returns:
The webpage loaded or NIL
-
loadDeferred
WebPage loadDeferred(NormUrl url)
Load a url with specified options
This method first checks the url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The normal url- Returns:
The webpage loaded or NIL
-
loadAll
List<WebPage> loadAll(Iterable<String> urls)
Load all urls with specified options
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The urls to load- Returns:
The webpage loaded or NIL
-
loadAll
List<WebPage> loadAll(Iterable<String> urls, String args)
Load all urls with specified options
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The urls to loadargs- The load arguments- Returns:
The webpage loaded or NIL
-
loadAll
List<WebPage> loadAll(Iterable<String> urls, LoadOptions options)
Load all urls with specified options
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The urls to loadoptions- The load options- Returns:
The webpage loaded or NIL
-
loadAll
List<WebPage> loadAll(Collection<UrlAware> urls)
Load all urls with specified options
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The urls to load- Returns:
The webpage loaded or NIL
-
loadAll
List<WebPage> loadAll(Collection<UrlAware> urls, String args)
Load all urls with specified options
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The urls to loadargs- The load arguments- Returns:
The webpage loaded or NIL
-
loadAll
List<WebPage> loadAll(Collection<UrlAware> urls, LoadOptions options)
Load all urls with specified options
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The urls to loadoptions- The load options- Returns:
The webpage loaded or NIL
-
loadAll
List<WebPage> loadAll(List<NormUrl> normUrls)
Load all normal urls with specified options
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
normUrls- The normal urls to load- Returns:
The loaded webpages
-
loadAsync
CompletableFuture<WebPage> loadAsync(String url)
Load a normal url in java async style
- Parameters:
url- The url to load- Returns:
A completable future of webpage
-
loadAsync
CompletableFuture<WebPage> loadAsync(String url, String args)
Load a normal url in java async style
- Parameters:
url- The url to load- Returns:
A completable future of webpage
-
loadAsync
CompletableFuture<WebPage> loadAsync(String url, LoadOptions options)
Load a normal url in java async style
- Parameters:
url- The url to load- Returns:
A completable future of webpage
-
loadAsync
CompletableFuture<WebPage> loadAsync(UrlAware url)
Load a normal url in java async style
- Parameters:
url- The url to load- Returns:
A completable future of webpage
-
loadAsync
CompletableFuture<WebPage> loadAsync(UrlAware url, String args)
Load a normal url in java async style
- Parameters:
url- The url to load- Returns:
A completable future of webpage
-
loadAsync
CompletableFuture<WebPage> loadAsync(UrlAware url, LoadOptions options)
Load a normal url in java async style
- Parameters:
url- The url to load- Returns:
A completable future of webpage
-
loadAsync
CompletableFuture<WebPage> loadAsync(NormUrl url)
Load a normal url in java async style
- Parameters:
url- The normal url to load- Returns:
A completable future of webpage
-
loadAllAsync
List<CompletableFuture<WebPage>> loadAllAsync(Iterable<String> urls)
Load all normal urls in java async style
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The normal urls to load- Returns:
The completable futures of webpages
-
loadAllAsync
List<CompletableFuture<WebPage>> loadAllAsync(Iterable<String> urls, String args)
Load all normal urls in java async style.
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The normal urls to load- Returns:
The completable futures of webpages
-
loadAllAsync
List<CompletableFuture<WebPage>> loadAllAsync(Iterable<String> urls, LoadOptions options)
Load all normal urls in java async style.
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The normal urls to load- Returns:
The completable futures of webpages
-
loadAllAsync
List<CompletableFuture<WebPage>> loadAllAsync(Collection<UrlAware> urls)
Load all normal urls in java async style.
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The normal urls to load- Returns:
The completable futures of webpages
-
loadAllAsync
List<CompletableFuture<WebPage>> loadAllAsync(Collection<UrlAware> urls, String args)
Load all normal urls in java async style.
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The normal urls to load- Returns:
The completable futures of webpages
-
loadAllAsync
List<CompletableFuture<WebPage>> loadAllAsync(Collection<UrlAware> urls, LoadOptions options)
Load all normal urls in java async style.
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The normal urls to load- Returns:
The completable futures of webpages
-
loadAllAsync
List<CompletableFuture<WebPage>> loadAllAsync(List<NormUrl> urls)
Load all normal urls in java async style
This method first checks each url in the local store and return the local version if the page exists and matches the requirements, otherwise fetch it from the Internet.
- Parameters:
urls- The normal urls to load- Returns:
The completable futures of webpages
-
submit
AbstractPulsarSession submit(String url)
Submit a url to the URL pool, the url will be processed in the crawl loop later
- Parameters:
url- The url to submit- Returns:
The PulsarSession itself to enabled chained operations
-
submit
AbstractPulsarSession submit(String url, String args)
Submit a url to the URL pool, and it will be processed in a crawl loop
- Parameters:
url- The url to submitargs- The load arguments- Returns:
The PulsarSession itself to enabled chained operations
-
submit
AbstractPulsarSession submit(String url, LoadOptions options)
Submit a url to the URL pool, and it will be processed in a crawl loop
- Parameters:
url- The url to submitoptions- The load options- Returns:
The PulsarSession itself to enabled chained operations
-
submit
AbstractPulsarSession submit(UrlAware url)
Submit a url to the URL pool, and it will be processed in a crawl loop
- Parameters:
url- The url to submit- Returns:
The PulsarSession itself to enabled chained operations
-
submit
AbstractPulsarSession submit(UrlAware url, String args)
Submit a url to the URL pool, and it will be processed in a crawl loop
- Parameters:
url- The url to submit- Returns:
The PulsarSession itself to enabled chained operations
-
submitAll
AbstractPulsarSession submitAll(Iterable<String> urls)
Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop
- Parameters:
urls- The urls to submit- Returns:
The PulsarSession itself to enabled chained operations
-
submitAll
AbstractPulsarSession submitAll(Iterable<String> urls, String args)
Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop
- Parameters:
urls- The urls to submitargs- The load arguments- Returns:
The PulsarSession itself to enabled chained operations
-
submitAll
AbstractPulsarSession submitAll(Iterable<String> urls, LoadOptions options)
Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop
- Parameters:
urls- The urls to submitoptions- The load options- Returns:
The PulsarSession itself to enabled chained operations
-
submitAll
AbstractPulsarSession submitAll(Collection<UrlAware> urls)
Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop
- Parameters:
urls- The urls to submit- Returns:
The PulsarSession itself to enabled chained operations
-
submitAll
AbstractPulsarSession submitAll(Collection<UrlAware> urls, String args)
Submit the urls to the URL pool, the submitted urls will be processed in a crawl loop
- Parameters:
urls- The urls to submit- Returns:
The PulsarSession itself to enabled chained operations
-
loadOutPages
List<WebPage> loadOutPages(String portalUrl, String args)
Load or fetch the portal page, and then load or fetch the out links selected by
-outLinkoption.Option
-outLinkspecifies the cssSelector for links in the portal page to load.- Parameters:
portalUrl- The portal url from where to load pagesargs- The load arguments- Returns:
The loaded out pages
-
loadOutPages
List<WebPage> loadOutPages(String portalUrl, LoadOptions options)
Load or fetch the portal page, and then load or fetch the out links selected by
-outLinkoption.Option
-outLinkspecifies the cssSelector for links in the portal page to load.- Parameters:
portalUrl- The portal url from where to load pagesoptions- The load options- Returns:
The loaded out pages
-
loadOutPages
List<WebPage> loadOutPages(UrlAware portalUrl, String args)
Load or fetch the portal page, and then load or fetch the out links selected by
-outLinkoption.Option
-outLinkspecifies the cssSelector for links in the portal page to load.- Parameters:
portalUrl- The portal url from where to load pagesargs- The load arguments- Returns:
The loaded out pages
-
loadOutPages
List<WebPage> loadOutPages(UrlAware portalUrl, LoadOptions options)
Load or fetch the portal page, and then load or fetch the out links selected by
-outLinkoption.Option
-outLinkspecifies the cssSelector for links in the portal page to load.- Parameters:
portalUrl- The portal url from where to load pagesoptions- The load options- Returns:
The loaded out pages
-
submitForOutPages
AbstractPulsarSession submitForOutPages(String portalUrl, String args)
Load the portal page and submit the out links specified by the
-outLinkoption to the URL pool.Option
-outLinkspecifies the cssSelector for links in the portal page to load.The submitted urls will be processed in a crawl loop later.
- Parameters:
portalUrl- The portal url from where to load pagesargs- The load arguments- Returns:
The PulsarSession itself to enable chained operation
-
submitForOutPages
AbstractPulsarSession submitForOutPages(String portalUrl, LoadOptions options)
Load the portal page and submit the out links specified by the
-outLinkoption to the URL pool.Option
-outLinkspecifies the cssSelector for links in the portal page to load.The submitted urls will be processed in a crawl loop later.
- Parameters:
portalUrl- The portal url from where to load pagesoptions- The load options- Returns:
The PulsarSession itself to enable chained operation
-
submitForOutPages
AbstractPulsarSession submitForOutPages(UrlAware portalUrl, String args)
Load the portal page and submit the out links specified by the
-outLinkoption to the URL pool.Option
-outLinkspecifies the cssSelector for links in the portal page to load.The submitted urls will be processed in a crawl loop later.
- Parameters:
portalUrl- The portal url from where to load pagesargs- The load arguments- Returns:
The PulsarSession itself to enable chained operation
-
submitForOutPages
AbstractPulsarSession submitForOutPages(UrlAware portalUrl, LoadOptions options)
Load the portal page and submit the out links specified by the
-outLinkoption to the URL pool.Option
-outLinkspecifies the cssSelector for links in the portal page to load.The submitted urls will be processed in a crawl loop later.
- Parameters:
portalUrl- The portal url from where to load pagesoptions- The load options- Returns:
The PulsarSession itself to enable chained operation
-
loadOutPagesAsync
List<CompletableFuture<WebPage>> loadOutPagesAsync(String portalUrl, String args)
Load or fetch the portal page, and then load or fetch the out links selected by
-outLinkoption asynchronously.Option
-outLinkspecifies the cssSelector for links in the portal page to load.- Parameters:
portalUrl- The portal url from where to load pagesargs- The load arguments- Returns:
The loaded out pages
-
loadOutPagesAsync
List<CompletableFuture<WebPage>> loadOutPagesAsync(String portalUrl, LoadOptions options)
Load or fetch the portal page, and then load or fetch the out links selected by
-outLinkoption asynchronously.Option
-outLinkspecifies the cssSelector for links in the portal page to load.- Parameters:
portalUrl- The portal url from where to load pagesoptions- The load options- Returns:
The loaded out pages
-
loadResource
WebPage loadResource(String url, String referrer)
Load a url as a resource without browser rendering.
Referrer will be opened by a browser first to obtain browsing environment, such as headers and cookies, and then the browsing environment will be applied to the later resource fetching.
- Parameters:
url- The url to loadreferrer- The referrer URL- Returns:
The webpage containing the resource
-
loadResource
WebPage loadResource(String url, String referrer, String args)
Load a url as a resource without browser rendering.
Referrer will be opened by a browser first to obtain browsing environment, such as headers and cookies, and then the browsing environment will be applied to the later resource fetching.
- Parameters:
url- The url to loadreferrer- The referrer URLargs- The load arguments- Returns:
The webpage containing the resource
-
loadResource
WebPage loadResource(String url, String referrer, LoadOptions options)
Load a url as a resource without browser rendering.
Referrer will be opened by a browser first to obtain browsing environment, such as headers and cookies, and then the browsing environment will be applied to the later resource fetching.
- Parameters:
url- The url to loadreferrer- The referrer URLoptions- The load options- Returns:
The webpage containing the resource
-
loadResourceDeferred
WebPage loadResourceDeferred(String url, String referrer)
Load a url as a resource without browser rendering.
Referrer will be opened by a browser first to obtain browsing environment, such as headers and cookies, and then the browsing environment will be applied to the later resource fetching.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The url to loadreferrer- The referrer URL- Returns:
The webpage containing the resource
-
loadResourceDeferred
WebPage loadResourceDeferred(String url, String referrer, String args)
Load a url as a resource without browser rendering.
Referrer will be opened by a browser first to obtain browsing environment, such as headers and cookies, and then the browsing environment will be applied to the later resource fetching.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The url to loadreferrer- The referrer URLargs- The load arguments- Returns:
The webpage containing the resource
-
loadResourceDeferred
WebPage loadResourceDeferred(String url, String referrer, LoadOptions options)
Load a url as a resource without browser rendering.
Referrer will be opened by a browser first to obtain browsing environment, such as headers and cookies, and then the browsing environment will be applied to the later resource fetching.
This function is a kotlin suspend function, which could be started, paused, and resume. Suspend functions are only allowed to be called from a coroutine or another suspend function.
- Parameters:
url- The url to loadreferrer- The referrer URLoptions- The load options- Returns:
The webpage containing the resource
-
parse
FeaturedDocument parse(WebPage page)
Parse a webpage into an HTML document.
-
loadDocument
FeaturedDocument loadDocument(String url)
Load or fetch a webpage and parse it into an HTML document
-
loadDocument
FeaturedDocument loadDocument(String url, String args)
Load or fetch a webpage and parse it into an HTML document
-
loadDocument
FeaturedDocument loadDocument(String url, LoadOptions options)
Load or fetch a webpage and parse it into an HTML document
-
loadDocument
FeaturedDocument loadDocument(UrlAware url)
Load or fetch a webpage and parse it into an HTML document
-
loadDocument
FeaturedDocument loadDocument(UrlAware url, String args)
Load or fetch a webpage and parse it into an HTML document
-
loadDocument
FeaturedDocument loadDocument(UrlAware url, LoadOptions options)
Load or fetch a webpage and parse it into an HTML document
-
loadDocument
FeaturedDocument loadDocument(NormUrl url)
Load or fetch a webpage and then parse it into an HTML document.
-
scrape
Map<String, String> scrape(String url, String args, Iterable<String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeargs- The load argumentsfieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their selectors
-
scrape
Map<String, String> scrape(String url, LoadOptions options, Iterable<String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeoptions- The load optionsfieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their selectors
-
scrape
Map<String, String> scrape(String url, String args, Map<String, String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeargs- The load argumentsfieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their names
-
scrape
Map<String, String> scrape(String url, LoadOptions options, Map<String, String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeoptions- The load optionsfieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their names
-
scrape
List<Map<String, String>> scrape(String url, String args, String restrictSelector, Iterable<String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeargs- The load argumentsrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their names
-
scrape
List<Map<String, String>> scrape(String url, LoadOptions options, String restrictSelector, Iterable<String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeoptions- The load optionsrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their selectors
-
scrape
List<Map<String, String>> scrape(String url, String args, String restrictSelector, Map<String, String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeargs- The load argumentsrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their names
-
scrape
List<Map<String, String>> scrape(String url, LoadOptions options, String restrictSelector, Map<String, String> fieldSelectors)
Load or fetch a webpage located by the given url, and then extract fields specified by field selectors.
- Parameters:
url- The url to scrapeoptions- The load optionsrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- The selectors to extract fields- Returns:
All the extracted fields and their names
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, String args, Iterable<String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingargs- Load arguments for both the portal page and out pagesfieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their selectors are saved in a map.
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, LoadOptions options, Iterable<String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingoptions- Load options for both the portal page and out pagesfieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their selectors are saved in a map.
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, String args, String restrictSelector, Iterable<String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingargs- Load arguments for both the portal page and out pagesrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their selectors are saved in a map.
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, LoadOptions options, String restrictSelector, Iterable<String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingoptions- Load options for both the portal page and out pagesrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their selectors are saved in a map.
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, String args, Map<String, String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingargs- Load arguments for both the portal page and out pagesfieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their names are saved in a map.
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, LoadOptions options, Map<String, String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingoptions- Load options for both the portal page and out pagesfieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their names are saved in a map.
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, String args, String restrictSelector, Map<String, String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingargs- Load arguments for both the portal page and out pagesrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their names are saved in a map.
-
scrapeOutPages
@ExperimentalApi() List<Map<String, String>> scrapeOutPages(String portalUrl, LoadOptions options, String restrictSelector, Map<String, String> fieldSelectors)
Load or fetch out pages specified by out link selector, and then extract fields specified by field selectors from each out page.
- Parameters:
portalUrl- The portal url to start scrapingoptions- Load options for both the portal page and out pagesrestrictSelector- A CSS selector to locate a DOM where all fields are restricted tofieldSelectors- CSS selectors to extract fields from out pages- Returns:
All extracted fields. For each out page, fields extracted with their names are saved in a map.
-
getVariable
Object getVariable(String name)
Get a variable from this session
-
setVariable
Unit setVariable(String name, Object value)
Set a variable into this session
-
putSessionBean
@Deprecated(message = "Not used any more") Unit putSessionBean(Object obj)
Put session scope bean
-
getSessionBean
final <T extends Any> T getSessionBean()
-
export
Path export(WebPage page)
Export the content of a webpage.
- Parameters:
page- Page to export- Returns:
The path of the exported page
-
export
Path export(WebPage page, String ident)
Export the content of a webpage.
- Parameters:
page- Page to exportident- File name identifier used to distinguish from other names- Returns:
The path of the exported page
-
export
Path export(FeaturedDocument doc)
Export the outer HTML of the document.
- Parameters:
doc- Document to export- Returns:
The path of the exported document
-
export
Path export(FeaturedDocument doc, String ident)
Export the outer HTML of the document.
- Parameters:
doc- Document to exportident- File name identifier used to distinguish from other names- Returns:
The path of the exported document
-
exportTo
Path exportTo(FeaturedDocument doc, Path path)
Export the whole HTML of the document to the given path.
- Parameters:
doc- Document to exportpath- Path to save the exported content- Returns:
The path of the exported document
-
-
-
-