|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.services.fieldquery.MCRData2Fields
public class MCRData2Fields
Provides methods to automatically extract field values for indexing from MCRObject, MCRFile or any XML document using the definition in searchfields.xml. The buildFields method returns a list of MCRFieldValue objects with values extracted from the object for the given search index. This class supports extracting values from MCRObject metadata, MCRFile metadata, MCRFile xml content. MCRFile additional data, MCRFile text content using the text filter plug-ins, and any plain XML document.
MCRSearcher#addToIndex(String, List)| Constructor Summary | |
|---|---|
MCRData2Fields()
|
|
| Method Summary | |
|---|---|
static List<MCRFieldValue> |
buildFields(byte[] xml,
String index,
String source,
String objectType)
Extracts field values for indexing from the given JDOM xml document. |
static List<MCRFieldValue> |
buildFields(Document doc,
String index)
Extracts field values for indexing from the given JDOM xml document. |
static List<MCRFieldValue> |
buildFields(MCRFile file,
String index)
Extracts field values for indexing from the given MCRFile's metadata, xml content or text content. |
static List<MCRFieldValue> |
buildFields(MCRObject obj,
String index)
Extracts field values for indexing from the given MCRObject's metadata. |
static String |
normalizeDate(String sDate)
Xalan XSL extension to convert MyCoRe date values to standard format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MCRData2Fields()
| Method Detail |
|---|
public static List<MCRFieldValue> buildFields(MCRObject obj,
String index)
obj - the MCRObject thats metadata should be indexedindex - the ID of the index as defined in searchfields.xml
public static List<MCRFieldValue> buildFields(MCRFile file,
String index)
file - the MCRFile thats data should be indexedindex - the ID of the index as defined in searchfields.xml
public static List<MCRFieldValue> buildFields(Document doc,
String index)
doc - the JDOM xml document thats data should be indexedindex - the ID of the index as defined in searchfields.xml
public static List<MCRFieldValue> buildFields(byte[] xml,
String index,
String source,
String objectType)
xml - the xml document thats data should be indexed as byte arrayindex - the ID of the index as defined in searchfields.xml
public static String normalizeDate(String sDate)
date - the date string in a locale-dependent format
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||