|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.norconex.importer.transformer.AbstractRestrictiveTransformer
public abstract class AbstractRestrictiveTransformer
Base class for transformers applying only to certain type of documents
Subclasses implementing IXMLConfigurable
should allow this inner
configuration:
Constructor Summary | |
---|---|
AbstractRestrictiveTransformer()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
hashCode()
|
protected void |
loadFromXML(XMLConfiguration xml)
Convenience method for subclasses to load prometadataperty restrictions). |
protected void |
saveToXML(XMLStreamWriter writer)
Convenience method for subclasses to save metadata restrictions. |
void |
setRestriction(String metaProperty,
String regex,
boolean caseSensitive)
|
String |
toString()
|
void |
transformDocument(String reference,
InputStream input,
OutputStream output,
Properties metadata,
boolean parsed)
Transforms document content and metadata. |
protected abstract void |
transformRestrictedDocument(String reference,
InputStream input,
OutputStream output,
Properties metadata,
boolean parsed)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractRestrictiveTransformer()
Method Detail |
---|
public final void transformDocument(String reference, InputStream input, OutputStream output, Properties metadata, boolean parsed) throws IOException
IDocumentTransformer
transformDocument
in interface IDocumentTransformer
reference
- document reference (e.g. URL)input
- document to transformoutput
- transformed documentmetadata
- document metadataparsed
- whether the document has been parsed already or not (a
parsed document should normally be text-based)
IOException
public void setRestriction(String metaProperty, String regex, boolean caseSensitive)
protected abstract void transformRestrictedDocument(String reference, InputStream input, OutputStream output, Properties metadata, boolean parsed) throws IOException
IOException
protected void loadFromXML(XMLConfiguration xml)
xml
- xml configurationprotected void saveToXML(XMLStreamWriter writer) throws XMLStreamException
writer
- XML writer
XMLStreamException
- problem saving extra content typespublic int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |