Class CmisFetcher
java.lang.Object
com.norconex.crawler.core.fetch.AbstractFetcher<CmisFetcherConfig>
com.norconex.crawler.fs.fetch.impl.AbstractNioFetcher<CmisFetcherConfig>
com.norconex.crawler.fs.fetch.impl.cmis.CmisFetcher
- All Implemented Interfaces:
Configurable<CmisFetcherConfig>,EventListener<Event>,Fetcher,EventListener,Consumer<Event>
CMIS-enabled Content Management Systems (CMS) fetcher
(Atom end-point), backed by a custom, read-only NIO.2
FileSystemProvider (CmisFileSystemProvider).
The start path can be specified as:
cmis:http://yourhost:port/path/to/atom.
Optionally you can have a non-root starting path by adding the path
name to the base URL, with an exclamation mark as a separator:
cmis:http://yourhost:port/path/to/atom!/MyFolder/MySubFolder.
Start paths are assumed to be Atom URLs.
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanacceptRequest(@NonNull FetchRequest fetchRequest) Optional method for subclasses to override when in need for additional acceptance logic beyond reference filters (which this abstract class provides).protected booleanbooleanprotected voidfetcherShutdown(CrawlerSession crawler) Invoked once per fetcher when the crawler ends.protected voidfetchMetadata(Doc doc, @NonNull Path path, @NonNull BasicFileAttributes attrs) inthashCode()protected PathresolvePath(String reference) Resolves a crawler reference (as found onDoc.getReference()) into a NIO.2Path.toString()Methods inherited from class com.norconex.crawler.fs.fetch.impl.AbstractNioFetcher
fetch, fetchChildPaths, fetchContent, fetchFileObject, getOrOpenFileSystemMethods inherited from class com.norconex.crawler.core.fetch.AbstractFetcher
accept, accept, fetcherStartup
-
Constructor Details
-
CmisFetcher
public CmisFetcher()
-
-
Method Details
-
fetcherShutdown
Description copied from class:AbstractFetcherInvoked once per fetcher when the crawler ends. Default implementation does nothing.- Overrides:
fetcherShutdownin classAbstractNioFetcher<CmisFetcherConfig>- Parameters:
crawler- crawler
-
acceptRequest
Description copied from class:AbstractFetcherOptional method for subclasses to override when in need for additional acceptance logic beyond reference filters (which this abstract class provides). This method is only invoked if there are no reference filters configured on this class, or all of them accepts the request document. Default implementation does nothing (always returntrue).- Overrides:
acceptRequestin classAbstractFetcher<CmisFetcherConfig>- Parameters:
fetchRequest- the fetch request to evaluate (nevernull)- Returns:
trueif accepted
-
resolvePath
Description copied from class:AbstractNioFetcherResolves a crawler reference (as found onDoc.getReference()) into a NIO.2Path.- Specified by:
resolvePathin classAbstractNioFetcher<CmisFetcherConfig>- Parameters:
reference- the reference to resolve- Returns:
- the resolved path
- Throws:
IOException- if the reference cannot be resolved
-
fetchMetadata
protected void fetchMetadata(Doc doc, @NonNull @NonNull Path path, @NonNull @NonNull BasicFileAttributes attrs) throws IOException - Overrides:
fetchMetadatain classAbstractNioFetcher<CmisFetcherConfig>- Throws:
IOException
-
toString
- Overrides:
toStringin classAbstractNioFetcher<CmisFetcherConfig>
-
equals
- Overrides:
equalsin classAbstractNioFetcher<CmisFetcherConfig>
-
canEqual
- Overrides:
canEqualin classAbstractNioFetcher<CmisFetcherConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNioFetcher<CmisFetcherConfig>
-
getConfiguration
-