|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.importing.crawler.file.internal.FileToRecordConverter
public final class FileToRecordConverter
Utility class to create records from File objects.
| Constructor Summary | |
|---|---|
FileToRecordConverter(DataFactory factory)
|
|
| Method Summary | |
|---|---|
void |
addAttachment(Record record,
java.lang.String pathAttribute,
java.lang.String attachmentName)
Add the content attachment to the given record. |
Record |
dirToRecord(java.io.File directory,
java.lang.String dataSource)
Create a Record for the given directory and dataSource and fill it with ImportingConstants.ROOT_FOLDER_ATTRIBUTE. |
Record |
fileToRecord(java.io.File file,
java.lang.String dataSource,
boolean withContent)
Create a Record for the given file and dataSource and fill it with all file properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileToRecordConverter(DataFactory factory)
| Method Detail |
|---|
public Record fileToRecord(java.io.File file,
java.lang.String dataSource,
boolean withContent)
throws java.io.IOException
file - dataSource - withContent - if true fill also content attachment, otherwise not
java.io.IOException
public Record dirToRecord(java.io.File directory,
java.lang.String dataSource)
directory - dataSource -
public void addAttachment(Record record,
java.lang.String pathAttribute,
java.lang.String attachmentName)
throws java.io.IOException
record - pathAttribute - name of the attribute containing the path to the fileattachmentName - name with which the attachment is stored in the record
java.io.IOException
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||