public class XPathContentWorkerSelector<W extends ContentWorker> extends Object implements ContentWorkerSelector
Currently, the only namespaces supported are those contained in the XML documents being tested.
Constructor and Description |
---|
XPathContentWorkerSelector() |
Modifier and Type | Method and Description |
---|---|
W |
getWorker(org.alfresco.service.cmr.repository.ContentReader reader)
Execute the XPath statements, in order, against the document.
|
void |
init()
Checks the configuration.
|
void |
setSupportedMimetypes(Set<String> supportedMimetypes)
Optionally set the mimetypes supported.
|
void |
setWorkers(Map<String,W> workers)
Set the workers to use.
|
String |
toString() |
public void setSupportedMimetypes(Set<String> supportedMimetypes)
supportedMimetypes
- the list of mimetypes. The default is text/xml.public void setWorkers(Map<String,W> workers)
workers
- a map of ContentWorker instances
keyed by XPath statementspublic void init()
public W getWorker(org.alfresco.service.cmr.repository.ContentReader reader)
getWorker
in interface ContentWorkerSelector
reader
- the content reader, providing the actual stream metadata
and even the stream, if required.Copyright © 2005–2017 Alfresco Software. All rights reserved.