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
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | ATTRIBUTE_DIMENSION_AUTOGENCAS Record property name for dimension autogen. | 
| static java.lang.String | ATTRIBUTE_DIMENSION_MULTISELECT_TYPECAS Record property name to set for multiselect type. | 
| static java.lang.String | ATTRIBUTE_DIMENSION_RANGE_COMPARISON_TYPECAS Record property name to set for multiselect type. | 
| static java.lang.String | ATTRIBUTE_DISPLAY_NAMECAS Record property name for attribute diplay name. | 
| static java.lang.String | ATTRIBUTE_NAMECAS Record property name that names the Records
 we use to represent the schema. | 
| static java.lang.String | ATTRIBUTE_PROPERTY_DATA_TYPECAS Record property name for property data type. | 
| static java.lang.String | ATTRIBUTE_ROLLUP_KEYCAS Record property name property name to set for a text searchable
 attribute. | 
| static java.lang.String | ATTRIBUTE_SEARCH_SEARCHABLECAS Record property name property name to set for a text searchable
 attribute. | 
| static java.lang.String | ATTRIBUTE_SEARCH_WILDCARDCAS Record property name property name to set for a wildcard searchable
 attribute. | 
| static java.lang.String | ATTRIBUTE_SOURCE_NAMECAS Record property name for attribute source name. | 
| static java.lang.String | ATTRIBUTE_TYPECAS Record property name for attribute type (that is, dimension or
 property). | 
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | RECORD_SPEC | 
| 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. | 
| atg.xml.XMLFile | getSupplementalSchemaRecords()Returns property supplementalSchemaRecords. | 
| protected java.lang.String | getXmlOutputTitle() | 
| 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 | 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 | setNonAutogenDimensionPropertyNames(java.lang.String[] pNonAutogenDimensionPropertyNames)Sets property nonAutogenDimensionPropertyNames. | 
| 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. | 
public 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 static final java.lang.String RECORD_SPEC
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()
protected Records createExportRecords(EndecaContext pContext, java.util.Locale pLocale)
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.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()
protected java.lang.String getXmlOutputTitle()