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