|
DLESE Tools v1.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.dlese.dpc.index.writer.FileIndexingServiceWriter
org.dlese.dpc.index.writer.XMLFileIndexingWriter
org.dlese.dpc.index.writer.ItemFileIndexingWriter
org.dlese.dpc.index.writer.ADNFileIndexingWriter
Creates a Lucene Document from an ADN-item metadata
source file.
The Lucene Document fields that are created by
this class are (in addition the the ones listed for FileIndexingServiceWriter):
doctype - Set to 'adn'. Stored. Note: the actual indexing of this
field happens in the superclass FileIndexingServiceWriter.
additional fields - A number of additional fields are defined.
See the Java code for method addFrameworkFields(Document, Document) for
details.
| Field Summary |
|---|
| Fields inherited from class org.dlese.dpc.index.writer.XMLFileIndexingWriter |
|---|
recordDataService, vocab |
| Constructor Summary | |
|---|---|
ADNFileIndexingWriter(String collection,
RecordDataService recordDataService)
Create a ADNFileIndexingWriter that indexes the given collection in field collection. |
|
ADNFileIndexingWriter(String collection,
RecordDataService recordDataService,
boolean singleRecord)
Constructor for the ADNFileIndexingWriter object |
|
| Method Summary | |
|---|---|
protected void |
addFrameworkFields(Document newDoc,
Document existingDoc)
Adds custom fields to the index that are unique to this framework. |
protected void |
destroy()
Release map resources for GC after processing. |
protected String |
getAccessionStatus()
Returns the accession status of this record, for example 'accessioned'. |
String |
getCollection()
Returns unique collection keys for the item being indexed, separated by spaces. |
protected String[] |
getContentStandards()
Gets the contentStandards attribute of the ADNFileIndexingWriter object |
protected String |
getCreator()
Returns the items creator's full name. |
protected String |
getCreatorLastName()
Returns the items creator's last name. |
protected String |
getDescription()
Gets the description attribute of the ADNFileIndexingWriter object |
String |
getDocType()
Gets the docType attribute of the ADNFileIndexingWriter, which is 'adn.' |
protected String[] |
getGradeRange()
Gets the gradeRange attribute of the ADNFileIndexingWriter object |
protected String |
getId()
Gets the id(s) for this item, separated by spaces. |
protected String |
getKeywords()
Returns the items keywords. |
String |
getReaderClass()
Gets the name of the concrete DocReader class that
is used to read this type of Document, which is
"ItemDocReader". |
protected String[] |
getResourceTypes()
Gets the resourceTypes attribute of the ADNFileIndexingWriter object |
protected String[] |
getSubjects()
Gets the subjects attribute of the ADNFileIndexingWriter object |
protected String |
getTermStringFromStringArray(String[] vals)
Gets the appropriate terms from a string array of metadata fields. |
protected String |
getTitle()
Gets the title attribute of the ADNFileIndexingWriter object |
protected String |
getUrl()
Gets the url attribute of the ADNFileIndexingWriter object |
protected String |
getValidationReport()
Gets a report detailing any errors found in the validation of the data, or null if no error was found. |
void |
init(File source,
Document existingDoc)
Initialize the XML map prior to processing |
| Methods inherited from class org.dlese.dpc.index.writer.ItemFileIndexingWriter |
|---|
addFields, getDeletedDoc |
| Methods inherited from class org.dlese.dpc.index.writer.XMLFileIndexingWriter |
|---|
addCustomFields, getFieldContent, getFieldContent, getFieldName, getOaiModtime |
| Methods inherited from class org.dlese.dpc.index.writer.FileIndexingServiceWriter |
|---|
abortIndexing, addToAdminDefaultField, addToDefaultField, create, getExistingDoc, getFileIndexingService, getSourceDir, getSourceFile, isValidationEnabled, prtln, prtlnErr, setDebug, setDefaultFieldName, setFileIndexingService, setValidationEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ADNFileIndexingWriter(String collection,
RecordDataService recordDataService)
collection - A name for the collectionrecordDataService - The recordData service used with writer.
public ADNFileIndexingWriter(String collection,
RecordDataService recordDataService,
boolean singleRecord)
collection - DESCRIPTIONrecordDataService - DESCRIPTIONsingleRecord - DESCRIPTION| Method Detail |
public String getCollection()
getCollection in class XMLFileIndexingWriter
protected String getAccessionStatus()
throws Exception
getAccessionStatus in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error
message if an error occurs.
public void init(File source,
Document existingDoc)
throws Exception
init in class ItemFileIndexingWritersource - The source file being indexed.existingDoc - A Document that previously existed in the index for this item,
if present
Exception - Thrown if error reading the XML mapprotected void destroy()
destroy in class ItemFileIndexingWriterpublic String getReaderClass()
DocReader class that
is used to read this type of Document, which is
"ItemDocReader".
getReaderClass in interface DocWritergetReaderClass in class ItemFileIndexingWriter
protected String getValidationReport()
throws Exception
getValidationReport in class ItemFileIndexingWriterException - If error in performing the validation.public final String getDocType()
getDocType in interface DocWritergetDocType in class ItemFileIndexingWriter
protected final String getId()
throws Exception
getId in class XMLFileIndexingWriterException - If an error occurs
protected final String getTitle()
throws Exception
getTitle in class ItemFileIndexingWriterException - If an error occurs
protected final String getDescription()
throws Exception
getDescription in class ItemFileIndexingWriterException - If an error occurs
protected final String getUrl()
throws Exception
getUrl in class ItemFileIndexingWriterException - If an error occurs
protected String getKeywords()
throws Exception
getKeywords in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error
message if an error occurs.
protected String getCreatorLastName()
throws Exception
getCreatorLastName in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error
message if an error occurs.
protected String getCreator()
throws Exception
getCreator in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error
message if an error occurs.
protected final void addFrameworkFields(Document newDoc,
Document existingDoc)
throws Exception
addFrameworkFields in class ItemFileIndexingWriternewDoc - The feature to be added to the FrameworkFields attributeexistingDoc - The feature to be added to the FrameworkFields attribute
Exception - If an error occursprotected String[] getGradeRange()
protected String[] getResourceTypes()
protected String[] getContentStandards()
protected String[] getSubjects()
protected String getTermStringFromStringArray(String[] vals)
vals - Metadata fields that must be delemited by colons.
|
DLESE Tools v1.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||