public abstract class AbstractSchemaMapper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AS_CQ_DATA |
| Constructor and Description |
|---|
AbstractSchemaMapper()
ctor.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
escapeForSolr(String base)
Escape things that need to go to solr.
|
abstract void |
finalizeSchemaMapping(Map<String,Object> socoData,
Map<String,Object> schemaMap)
Subclasses can implement this to muck with the mapping before it is actually committed.
|
Map<String,Object> |
fromAttachmentSchema(Map<String,Object> input)
Convert attachment data from the schema to what SoCo expects.
|
Map<String,Object> |
fromSchema(Map<String,Object> schemaData)
Convert the data from schema into the format expected by SoCo.
|
static Calendar |
fromSchemaDate(String key,
Object asDate)
Return a Calendar object from a date value in the schema format.
|
String |
fromSchemaKey(String schemaKey)
Get the CQ mapping of a schema field.
|
static String |
getBaseType() |
abstract Map<String,String> |
getMapperSpecificKeys()
fetch the keys that are specific to this impl that need to be mapped.
|
static String |
getMutliLingualLanguageKey(String strLanguage)
Returns the translation language specified as the last name in the key path
|
abstract String |
getReportSuite() |
static String |
getSchemaApprovedKey() |
static String |
getSchemaAttachmentKey() |
static String |
getSchemaAttachmentLengthKey() |
static String |
getSchemaAttachmentUploadDateKey() |
static String |
getSchemaBaseType() |
static String |
getSchemaCQData() |
static String |
getSchemaDescriptionKey() |
static String |
getSchemaFlaggedHiddenKey() |
static String |
getSchemaIsDraftKey() |
static String |
getSchemaParentIdKey() |
static String |
getSchemaProviderIdKey() |
static String |
getSchemaResourceTypeKey() |
static String |
getSchemaRootCommentSystemKey() |
static String |
getSchemaTimestampKey() |
static String |
getSocoAddedKey() |
static String |
getSocoApprovedKey() |
static String |
getSocoAuthorDisplayNameKey() |
static String |
getSocoAuthorImageUrlKey() |
static String |
getSocoAuthorProfileUrlKey() |
static String |
getSocoDescriptionKey() |
static String |
getSocoDraftKey() |
static String |
getSocoEntityUrlKey() |
static String |
getSocoFlaggedHiddenKey() |
static String |
getSocoKey() |
static String |
getSocoLastModifiedKey() |
static String |
getSocoParentIdKey() |
static String |
getSocoTallyTimestampKey() |
static String |
getTranslationFolderName() |
static String |
getUserDatePrefix() |
String |
luceneToSolr(String luceneQuery)
Convert a lucene query to Solr query Maps the CQ names to Solr names.
|
abstract void |
setReportSuite(String reportSuite)
set the report suite used in this mapper.
|
Map<String,Object> |
toAttachmentSchema(Map<String,Object> data,
String key)
Format a Map using the keys expected by the schema.
|
Map<String,Object> |
toSchema(Map<String,Object> cqFormat,
String key)
Map from the cq data format to the format expected by the schema.
|
String |
toSchemaKey(String cqKey)
Get the schema mapping of a SoCo field.
|
List<String> |
toSchemaKeys(String mltField)
Get the schema field name(s) associated with a given SoCo field.
|
abstract Map<String,Object> |
toSolrSchema(Map<String,Object> cqFormat,
String key)
Convert to a format solr likes.
|
public static final String AS_CQ_DATA
public abstract Map<String,String> getMapperSpecificKeys()
public abstract String getReportSuite()
public abstract void setReportSuite(String reportSuite)
reportSuite - the report suitepublic static String getSchemaDescriptionKey()
public static String getSchemaResourceTypeKey()
public static String getSchemaRootCommentSystemKey()
public static String getSocoAuthorDisplayNameKey()
public static String getSocoAuthorImageUrlKey()
public static String getSocoAuthorProfileUrlKey()
public static String getSocoEntityUrlKey()
public static String getSocoApprovedKey()
public static String getSocoFlaggedHiddenKey()
public static String getSocoDraftKey()
public static String getSchemaApprovedKey()
public static String getSchemaFlaggedHiddenKey()
public static String getSchemaIsDraftKey()
public static String getSchemaParentIdKey()
public static String getSchemaProviderIdKey()
public static String getSchemaTimestampKey()
public static String getSchemaAttachmentLengthKey()
public static String getSchemaAttachmentUploadDateKey()
public static String getSocoAddedKey()
public static String getSocoParentIdKey()
public static String getSocoTallyTimestampKey()
public static String getSocoLastModifiedKey()
public static String getSchemaAttachmentKey()
public static String getSocoKey()
public static String getSocoDescriptionKey()
public static String escapeForSolr(String base)
base - the original stringpublic static String getUserDatePrefix()
public static String getSchemaBaseType()
public static String getBaseType()
public static String getSchemaCQData()
public static String getTranslationFolderName()
public Map<String,Object> toSchema(Map<String,Object> cqFormat, String key)
cqFormat - the incoming data. Note that this routine can change the contents of the map so that it is
appropriate for caching. If you don't like that, make a copy of the map before sending it in.key - the key for the datapublic static String getMutliLingualLanguageKey(String strLanguage)
public abstract void finalizeSchemaMapping(Map<String,Object> socoData, Map<String,Object> schemaMap)
socoData - the data in the SoCo formatschemaMap - the data to be committed (in the common schema)public Map<String,Object> toAttachmentSchema(Map<String,Object> data, String key) throws IOException
data - the data to be uploadedkey - the key for the attachmentIOException - on failurepublic static Calendar fromSchemaDate(String key, Object asDate)
key - the key to convertasDate - the original date, in schema formatpublic Map<String,Object> fromSchema(Map<String,Object> schemaData)
schemaData - the data to be convertedpublic Map<String,Object> fromAttachmentSchema(Map<String,Object> input)
input - the data in the schemapublic String toSchemaKey(String cqKey)
cqKey - The CQ name of a fieldpublic String fromSchemaKey(String schemaKey)
schemaKey - The schema name of a fieldpublic List<String> toSchemaKeys(String mltField)
mltField - the SoCo fieldpublic String luceneToSolr(String luceneQuery)
luceneQuery - the lucene query"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"