|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.endeca.index.LocaledExporter atg.endeca.index.schema.SchemaExporter
public class SchemaExporter
This class uploads an Endeca schema data into a RecordStore using a RecordStoreDocumentSubmitter. It introspects the specified IndexingOutputConfig to generate its base schema, and then layers on any additional changes form the XML file specfied by the supplementalSchemaRecords property.
The schema is represented by a Records object that holds a Record-based representation of the schema, which is then uploaded via a RecordStoreDocumentSubmitter.
This class supports merging in supplemental/override information via the supplementalSchemaRecords property.
Created: November 16 2011
Nested Class Summary |
---|
Nested classes/interfaces inherited from class atg.endeca.index.LocaledExporter |
---|
LocaledExporter.MinimalBulkLoaderResults, LocaledExporter.MinimalIncrementalLoaderResults |
Field Summary | |
---|---|
java.lang.String |
ATTRIBUTE_NAME
The name of property that names the RECORDs we use to represent the schema. |
static java.lang.String |
CLASS_VERSION
Class version string from source code control system. |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
SchemaExporter()
|
Method Summary | |
---|---|
protected void |
addBaselineSchemaRecords(Records pRecords,
java.util.Locale pLocale,
boolean pAddMeta)
Add the baseline schema records to the specified records object. |
void |
addSchemaRecordsForProperties(java.util.List<atg.repository.search.indexing.specifier.OutputProperty> pOutputProperties,
Records pRecords,
java.util.Locale pLocale,
boolean pAddMeta)
Add the records that represent the passed in output properties the specified Records object. |
void |
addSchemaRecordsForProperties(java.util.List<atg.repository.search.indexing.specifier.OutputProperty> pOutputProperties,
Records pRecords,
java.util.Locale pLocale,
boolean pAddMeta,
boolean pAddGenerative)
Add the records that represent the passed in output properties the specified Records object. |
Records |
createBaselineSchemaRecords(java.util.Locale pLocale)
Create a baseline set of schema records for the specified locale. |
Records |
createEmptyRecords()
Create an empty Records object with ATTRIBUTE_NAME already set as the name property. |
protected Records |
createExportRecords(EndecaContext pContext,
java.util.Locale pLocale)
Create the export records for the specified locale. |
Records |
createMergedSchemaRecords(java.util.Locale pLocale)
Return the complete, merged schema records. |
java.lang.String |
generateDebugBaselineSchemaAsXML()
Return the baseline (pre-supplemental merge) schema generated from the IndexingOutputConfig as XML. |
java.lang.String |
generateDebugMergedSchemaAsXML()
Return an XML represetation of the merged schema XML. |
java.lang.String |
generateDebugSupplementalSchemaAsXML()
Return an XML represetation of the supplemental schema XML. |
protected java.lang.String |
getDimensionNameForProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
Return the dimension name for the specified property. |
DimensionNameProvider[] |
getDimensionNameProviders()
Returns property dimensionNameProviders. |
protected java.lang.String |
getEndecaDataTypeForProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
Return the endeca data type for the specified property. |
MetaPropertiesHelper |
getMetaPropertiesHelper()
Return MetaPropertisHelper |
java.lang.String[] |
getPropertiesNamesToIgnore()
Returns property propertiesNamesToIgnore. |
java.util.Map<java.lang.String,java.lang.String> |
getPropertyNameToDimensionName()
Returns property propertyNameToDimensionName. |
atg.xml.XMLFile |
getSupplementalSchemaRecords()
Returns property supplementalSchemaRecords. |
boolean |
isAddNewSupplementalRecords()
Returns property addNewSupplementalRecords. |
protected boolean |
isEndecaDimensionProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
Return whether the specified property is an Endeca dimension property. |
boolean |
isSkipPropertiesWithGenerativePropertyAccessors()
Returns property skipPropertiesWithGenerativePropertyAccessors. |
protected boolean |
isTextSearchable(atg.repository.search.indexing.specifier.OutputProperty pProperty)
Return whether the specified property should be text searchable (full text indexed). |
void |
mergeSupplementalIntoSchemaRecords(Records pRecords,
boolean pAddNewRecords)
Merge any supplement schema information from the supplementalSchemaRecords property into the specified records. |
Records |
parseSupplementalRecords()
Parse supplemental records as specified by the supplementalSchemaRecords property. |
void |
setAddNewSupplementalRecords(boolean pAddNewSupplementalRecords)
Sets property addNewSupplementalRecords. |
void |
setDimensionNameProviders(DimensionNameProvider[] pDimensionNameProviders)
Sets property dimensionNameProviders. |
void |
setMetaPropertiesHelper(MetaPropertiesHelper pMetaPropertiesHelper)
Sets MetaPropertiesHelper |
void |
setPropertiesNamesToIgnore(java.lang.String[] pPropertiesNamesToIgnore)
Sets property propertiesNamesToIgnore. |
void |
setPropertyNameToDimensionName(java.util.Map<java.lang.String,java.lang.String> pPropertyNameToDimensionName)
Sets property propertyNameToDimensionName. |
void |
setSkipPropertiesWithGenerativePropertyAccessors(boolean pSkipPropertiesWithGenerativePropertyAccessors)
Sets property skipPropertiesWithGenerativePropertyAccessors. |
void |
setSupplementalSchemaRecords(atg.xml.XMLFile pSupplementalSchemaRecords)
Sets property supplementalSchemaRecords. |
boolean |
shouldIgnoreProperty(java.lang.String pPropertyName)
Whether we should ignore the specified property name when generating records. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
public final java.lang.String ATTRIBUTE_NAME
Constructor Detail |
---|
public SchemaExporter()
Method Detail |
---|
public void setSupplementalSchemaRecords(atg.xml.XMLFile pSupplementalSchemaRecords)
public atg.xml.XMLFile getSupplementalSchemaRecords()
public void setDimensionNameProviders(DimensionNameProvider[] pDimensionNameProviders)
public DimensionNameProvider[] getDimensionNameProviders()
public MetaPropertiesHelper getMetaPropertiesHelper()
public void setMetaPropertiesHelper(MetaPropertiesHelper pMetaPropertiesHelper)
pMetaPropertiesHelper
- MetaPropertiesHelperpublic void setPropertyNameToDimensionName(java.util.Map<java.lang.String,java.lang.String> pPropertyNameToDimensionName)
public java.util.Map<java.lang.String,java.lang.String> getPropertyNameToDimensionName()
public void setAddNewSupplementalRecords(boolean pAddNewSupplementalRecords)
public boolean isAddNewSupplementalRecords()
public void setSkipPropertiesWithGenerativePropertyAccessors(boolean pSkipPropertiesWithGenerativePropertyAccessors)
public boolean isSkipPropertiesWithGenerativePropertyAccessors()
public void setPropertiesNamesToIgnore(java.lang.String[] pPropertiesNamesToIgnore)
public java.lang.String[] getPropertiesNamesToIgnore()
public boolean shouldIgnoreProperty(java.lang.String pPropertyName)
protected Records createExportRecords(EndecaContext pContext, java.util.Locale pLocale)
createExportRecords
in class LocaledExporter
pContext
- the current indexing context.pLocale
- to locale for which to generate records.
public java.lang.String generateDebugBaselineSchemaAsXML() throws java.io.IOException, atg.repository.search.indexing.XMLWriterException
java.io.IOException
atg.repository.search.indexing.XMLWriterException
public Records createEmptyRecords()
public Records createMergedSchemaRecords(java.util.Locale pLocale)
public Records createBaselineSchemaRecords(java.util.Locale pLocale)
pLocale
- the locale in which to export the schema records.public void mergeSupplementalIntoSchemaRecords(Records pRecords, boolean pAddNewRecords)
pRecords
- the records to merge the supplemental records into.pAddNewRecords
- whether to add new records if no corresponding
supplemental record exists.protected void addBaselineSchemaRecords(Records pRecords, java.util.Locale pLocale, boolean pAddMeta)
pRecords
- the Records object to add records to.pLocale
- the current locale.pAddMeta
- true specifies that records for meta properties
should be added, and false specifies that records for
text properties should be added.public void addSchemaRecordsForProperties(java.util.List<atg.repository.search.indexing.specifier.OutputProperty> pOutputProperties, Records pRecords, java.util.Locale pLocale, boolean pAddMeta)
pOutputProperties
- the output properties to add records for.pRecords
- the Records object to add records to.pLocale
- the current LocalepAddMeta
- true specifies that records for meta properties
should be added, and false specifies that records for
text properties should be added.public void addSchemaRecordsForProperties(java.util.List<atg.repository.search.indexing.specifier.OutputProperty> pOutputProperties, Records pRecords, java.util.Locale pLocale, boolean pAddMeta, boolean pAddGenerative)
pOutputProperties
- the output properties to add records for.pRecords
- the Records object to add records to.pLocale
- the current LocalepAddMeta
- true specifies that records for meta properties
should be added, and false specifies that records for
text properties should be added.pAddGenerative
- whether to force adding of generative properties.
if false, than isSkipPropertiesWithGenerativePropertyAccessors()
will be honored.protected java.lang.String getDimensionNameForProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
pProperty
- the property whose dimension name to return.protected boolean isEndecaDimensionProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
true
if the property is "storeAsDocset", "storeAsCollection",
or "storeAsMetaIndex."
protected boolean isTextSearchable(atg.repository.search.indexing.specifier.OutputProperty pProperty)
pProperty
- the property to example to determine whether it should
be text searchable.
protected java.lang.String getEndecaDataTypeForProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
pProperty
- the output property whose endeca data type
should be returned.public java.lang.String generateDebugSupplementalSchemaAsXML()
public java.lang.String generateDebugMergedSchemaAsXML()
public Records parseSupplementalRecords()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |