public class SchemaExporter extends PerApplicationExporter
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
PerApplicationExporter.MinimalBulkLoaderResults, PerApplicationExporter.MinimalIncrementalLoaderResults| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTRIBUTE_DIMENSION_AUTOGEN
CAS Record property name for dimension autogen.
|
static java.lang.String |
ATTRIBUTE_DIMENSION_MULTISELECT_TYPE
CAS Record property name to set for multiselect type.
|
static java.lang.String |
ATTRIBUTE_DIMENSION_RANGE_COMPARISON_TYPE
CAS Record property name to set for multiselect type.
|
static java.lang.String |
ATTRIBUTE_DISPLAY_NAME
CAS Record property name for attribute diplay name.
|
static java.lang.String |
ATTRIBUTE_NAME
CAS Record property name that names the Records
we use to represent the schema.
|
static java.lang.String |
ATTRIBUTE_PROPERTY_DATA_TYPE
CAS Record property name for property data type.
|
static java.lang.String |
ATTRIBUTE_ROLLUP_KEY
CAS Record property name property name to set for a text searchable
attribute.
|
static java.lang.String |
ATTRIBUTE_SEARCH_SEARCHABLE
CAS Record property name property name to set for a text searchable
attribute.
|
static java.lang.String |
ATTRIBUTE_SEARCH_WILDCARD
CAS Record property name property name to set for a wildcard searchable
attribute.
|
static java.lang.String |
ATTRIBUTE_SOURCE_NAME
CAS Record property name for attribute source name.
|
static java.lang.String |
ATTRIBUTE_TYPE
CAS Record property name for attribute type (that is, dimension or
property).
|
static java.lang.String |
CLASS_VERSION
Class version string
|
TEST_GENERATION_CONTEXT_ATTRIBUTESERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
SchemaExporter() |
| Modifier and Type | Method and Description |
|---|---|
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[] |
getNonAutogenDimensionPropertyNames()
Returns property nonAutogenDimensionPropertyNames.
|
java.lang.String[] |
getPropertiesNamesToIgnore()
Returns property propertiesNamesToIgnore.
|
java.util.Map<java.lang.String,java.lang.String> |
getPropertyNameToDimensionName()
Returns property propertyNameToDimensionName.
|
java.lang.String |
getRecordIdName() |
java.util.List<SchemaExporter> |
getSchemaExporters() |
atg.xml.XMLFile |
getSupplementalSchemaRecords()
Returns property supplementalSchemaRecords.
|
protected java.lang.String |
getXmlOutputTitle()
Return the text string used as the title for the XML output in
the HTML admin.
|
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.
|
protected boolean |
isEndecaRollUpProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
Return whether the specified property is an Endeca roll-up poperty.
|
boolean |
isOutputPropertyCollisionCheckEnabled() |
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 |
setIndexables(Indexable[] pIndexables)
This method takes an array of Indexable and allows this Indexable to
have reference to other Indexable's
|
void |
setMetaPropertiesHelper(MetaPropertiesHelper pMetaPropertiesHelper)
Sets MetaPropertiesHelper
|
void |
setNonAutogenDimensionPropertyNames(java.lang.String[] pNonAutogenDimensionPropertyNames)
Sets property nonAutogenDimensionPropertyNames.
|
void |
setOutputPropertyCollisionCheckEnabled(boolean pOutputPropertyCollisionCheckEnabled) |
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 |
setRecordIdName(java.lang.String pRecordIdName) |
void |
setSchemaExporters(java.util.List<SchemaExporter> pSchemaExporters) |
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.
|
cancel, createAdminServlet, createContext, createExportRecordsAsXML, doStartService, export, exportRecords, getDefaultLanguageForRecordStores, getDocumentSubmitter, getIndexingApplicationConfiguration, getIndexingOutputConfig, getIndexingOutputConfigPaths, getLocales, initContext, isEchoRecordsToStdout, isForceToBaseline, isNeededForIncremental, isSingleLanguageOverride, isSupportsStatusCounts, mayNeedCleanup, performBaselineUpdate, performPartialUpdate, postIndexingCleanup, restoreDynamoRequestLocale, setDefaultLanguageForRecordStores, setDocumentSubmitter, setDynamoRequestLocale, setEchoRecordsToStdout, setIndexingApplicationConfiguration, setIndexingOutputConfigaddLogListener, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final java.lang.String ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_SOURCE_NAME
public static final java.lang.String ATTRIBUTE_DISPLAY_NAME
public static final java.lang.String ATTRIBUTE_TYPE
public static final java.lang.String ATTRIBUTE_PROPERTY_DATA_TYPE
public static final java.lang.String ATTRIBUTE_DIMENSION_AUTOGEN
public static final java.lang.String ATTRIBUTE_DIMENSION_MULTISELECT_TYPE
public static final java.lang.String ATTRIBUTE_DIMENSION_RANGE_COMPARISON_TYPE
public static final java.lang.String ATTRIBUTE_SEARCH_SEARCHABLE
public static final java.lang.String ATTRIBUTE_ROLLUP_KEY
public static final java.lang.String ATTRIBUTE_SEARCH_WILDCARD
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 void setNonAutogenDimensionPropertyNames(java.lang.String[] pNonAutogenDimensionPropertyNames)
public java.lang.String[] getNonAutogenDimensionPropertyNames()
public java.lang.String getRecordIdName()
public void setRecordIdName(java.lang.String pRecordIdName)
mIndexingOutputConfigs - the mIndexingOutputConfigs to setpublic java.util.List<SchemaExporter> getSchemaExporters()
public void setSchemaExporters(java.util.List<SchemaExporter> pSchemaExporters)
mIndexingOutputConfigs - the mIndexingOutputConfigs to setpublic boolean isOutputPropertyCollisionCheckEnabled()
public void setOutputPropertyCollisionCheckEnabled(boolean pOutputPropertyCollisionCheckEnabled)
pOutputPropertyCollisionCheckEnabled - the outputPropertyCollisionCheckEnabled to setprotected Records createExportRecords(EndecaContext pContext, java.util.Locale pLocale)
createExportRecords in class PerApplicationExporterpContext - 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.IOExceptionatg.repository.search.indexing.XMLWriterExceptionpublic 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 isEndecaRollUpProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
protected boolean isTextSearchable(atg.repository.search.indexing.specifier.OutputProperty pProperty)
pProperty - the property to example to determine whether it should
be text searchable.public boolean shouldIgnoreProperty(java.lang.String pPropertyName)
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()
public void setIndexables(Indexable[] pIndexables)
setIndexables in class PerApplicationExporterpIndexables - - array of Indexableprotected java.lang.String getXmlOutputTitle()
PerApplicationExportergetXmlOutputTitle in class PerApplicationExporter