public abstract class AbstractSchemaMapper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AS_ACCEPTFILETYPES
the different descriptions that can be possible.
|
static java.lang.String |
AS_ACTOR_ID |
static java.lang.String |
AS_ADDRESS |
static java.lang.String |
AS_ALLOW_REPLIES |
static java.lang.String |
AS_ALLOWFILEUPLOADS |
static java.lang.String |
AS_APPROVED |
static java.lang.String |
AS_ATTACHMENT |
static java.lang.String |
AS_ATTACHMENT_LENGTH |
static java.lang.String |
AS_AUTHOR |
static java.lang.String |
AS_AUTHOR_CI |
static java.lang.String |
AS_AUTHOR_DISPLAY_NAME |
static java.lang.String |
AS_AUTHOR_DISPLAY_NAME_CI |
static java.lang.String |
AS_AUTHOR_IMAGE_URL |
static java.lang.String |
AS_AUTHOR_PROFILE_URL |
static java.lang.String |
AS_AUTHORIZABLE_ID |
static java.lang.String |
AS_BASE_TYPE |
static java.lang.String |
AS_COMPANY_ID |
static java.lang.String |
AS_COMPOSED_BY |
static java.lang.String |
AS_CONTENT_TYPE |
static java.lang.String |
AS_CQ_DATA |
static java.lang.String |
AS_CQ_SUBHASH_DATE
Prefix for non dynamic dates so we can convert from the long format back to calendar.
|
static java.lang.String |
AS_CQTAGS |
static java.lang.String |
AS_CREATED |
static java.lang.String |
AS_ENTITY_URL |
static java.lang.String |
AS_FEATURES |
static java.lang.String |
AS_ID |
static java.lang.String |
AS_IS_CLOSED |
static java.lang.String |
AS_IS_DRAFT |
static java.lang.String |
AS_IS_FLAGGED |
static java.lang.String |
AS_IS_FLAGGED_HIDDEN |
static java.lang.String |
AS_IS_REPLY |
static java.lang.String |
AS_MAXFILESIZE |
static java.lang.String |
AS_MAXIMAGEFILESIZE |
static java.lang.String |
AS_MENTIONS |
static java.lang.String |
AS_MODERATE_COMMENTS |
static java.lang.String |
AS_PARENT_ID |
static java.lang.String |
AS_PINNED |
static java.lang.String |
AS_PROVIDER_ID |
static java.lang.String |
AS_PUBLISH_DATE |
static java.lang.String |
AS_PUBLISH_JOB_ID |
static java.lang.String |
AS_REPORT_SUITE |
static java.lang.String |
AS_REQUIRELOGIN |
static java.lang.String |
AS_RESOURCE_TYPE |
static java.lang.String |
AS_ROOT_COMMENT_SYSTEM |
static java.lang.String |
AS_RTEENABLED |
static java.lang.String |
AS_SENTIMENT |
static java.lang.String |
AS_TALLY_RESPONSE |
static java.lang.String |
AS_TITLE |
static java.lang.String |
AS_UPLOADDATE |
static java.lang.String |
AS_VERB |
static java.lang.String |
AS_VERBATIM |
static java.lang.String |
AS_VERBATIM_LANGUAGE_INDEX |
static java.lang.String |
CQ_ADDED |
static java.lang.String |
CQ_ALLOW_REPLIES |
static java.lang.String |
CQ_ALLOWFILEUPLOADS |
static java.lang.String |
CQ_APPROVED |
static java.lang.String |
CQ_AS_ACTOR_ID |
static java.lang.String |
CQ_AS_VERB |
static java.lang.String |
CQ_ATTACHMENT |
static java.lang.String |
CQ_AUTHOR_DISPLAY_NAME |
static java.lang.String |
CQ_AUTHOR_EMAIL |
static java.lang.String |
CQ_AUTHOR_IMAGE_URL |
static java.lang.String |
CQ_AUTHOR_PROFILE_URL |
static java.lang.String |
CQ_AUTHORIZABLE_ID |
static java.lang.String |
CQ_BASE_TYPE |
static java.lang.String |
CQ_COMPOSED_BY |
static java.lang.String |
CQ_CONTENT_TYPE |
static java.lang.String |
CQ_DESCRIPTION |
static java.lang.String |
CQ_DRAFT |
static java.lang.String |
CQ_ENTITY_URL |
static java.lang.String |
CQ_FLAGGED_HIDDEN |
static java.lang.String |
CQ_IS_CLOSED |
static java.lang.String |
CQ_IS_FLAGGED |
static java.lang.String |
CQ_IS_REPLY |
static java.lang.String |
CQ_KEY |
static java.lang.String |
CQ_LAST_MODIFIED |
static java.lang.String |
CQ_MAXFILESIZE |
static java.lang.String |
CQ_MAXIMAGEFILESIZE |
static java.lang.String |
CQ_MENTIONS |
static java.lang.String |
CQ_MODERATE_COMMENTS |
static java.lang.String |
CQ_MT_TRANS_DATE |
static java.lang.String |
CQ_MT_TRANSLATION |
static java.lang.String |
CQ_PARENT_ID |
static java.lang.String |
CQ_PINNED |
static java.lang.String |
CQ_PUBLISH_DATE |
static java.lang.String |
CQ_PUBLISH_JOB_ID |
static java.lang.String |
CQ_REQUIRELOGIN |
static java.lang.String |
CQ_RESOURCE_TYPE |
static java.lang.String |
CQ_ROOT_COMMENT_SYSTEM |
static java.lang.String |
CQ_RTEENABLED |
static java.lang.String |
CQ_SEARCH_PARENT_ID |
static java.lang.String |
CQ_SEARCH_PATH
Search collections has its own mapping for some fields.
|
static java.lang.String |
CQ_SEARCH_TAG_NAME |
static java.lang.String |
CQ_SENTIMENT |
static java.lang.String |
CQ_SPAM |
static java.lang.String |
CQ_TAGS |
static java.lang.String |
CQ_TALLY_RESPONSE |
static java.lang.String |
CQ_TALLY_TIMESTAMP |
static java.lang.String |
CQ_TITLE |
static java.lang.String |
CQ_USER_IDENTIFIER |
static java.lang.String |
SOLR_ID |
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() |
boolean |
isIndexable(java.lang.String key)
Checks if the 'key' is valid key that can be indexed in social-indexing engine (Solr,ElasticSearch,etc)
|
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_ACCEPTFILETYPES
public static final java.lang.String AS_ALLOWFILEUPLOADS
public static final java.lang.String AS_ALLOW_REPLIES
public static final java.lang.String AS_APPROVED
public static final java.lang.String AS_AUTHOR
public static final java.lang.String AS_AUTHORIZABLE_ID
public static final java.lang.String AS_AUTHOR_DISPLAY_NAME
public static final java.lang.String AS_AUTHOR_DISPLAY_NAME_CI
public static final java.lang.String AS_AUTHOR_PROFILE_URL
public static final java.lang.String AS_AUTHOR_CI
public static final java.lang.String AS_AUTHOR_IMAGE_URL
public static final java.lang.String AS_BASE_TYPE
public static final java.lang.String AS_IS_CLOSED
public static final java.lang.String AS_COMPANY_ID
public static final java.lang.String AS_COMPOSED_BY
public static final java.lang.String AS_CQ_DATA
public static final java.lang.String AS_CQTAGS
public static final java.lang.String AS_CREATED
public static final java.lang.String AS_ENTITY_URL
public static final java.lang.String AS_FEATURES
public static final java.lang.String AS_ID
public static final java.lang.String AS_IS_DRAFT
public static final java.lang.String AS_IS_FLAGGED
public static final java.lang.String AS_IS_FLAGGED_HIDDEN
public static final java.lang.String AS_IS_REPLY
public static final java.lang.String AS_MAXFILESIZE
public static final java.lang.String AS_MAXIMAGEFILESIZE
public static final java.lang.String AS_MODERATE_COMMENTS
public static final java.lang.String AS_PARENT_ID
public static final java.lang.String AS_PINNED
public static final java.lang.String AS_PROVIDER_ID
public static final java.lang.String AS_PUBLISH_DATE
public static final java.lang.String AS_PUBLISH_JOB_ID
public static final java.lang.String AS_REPORT_SUITE
public static final java.lang.String AS_REQUIRELOGIN
public static final java.lang.String AS_RESOURCE_TYPE
public static final java.lang.String AS_ROOT_COMMENT_SYSTEM
public static final java.lang.String AS_RTEENABLED
public static final java.lang.String AS_TALLY_RESPONSE
public static final java.lang.String AS_TITLE
public static final java.lang.String AS_VERBATIM
public static final java.lang.String AS_VERBATIM_LANGUAGE_INDEX
public static final java.lang.String AS_ATTACHMENT_LENGTH
public static final java.lang.String AS_UPLOADDATE
public static final java.lang.String AS_ADDRESS
public static final java.lang.String SOLR_ID
public static final java.lang.String AS_SENTIMENT
public static final java.lang.String AS_CONTENT_TYPE
public static final java.lang.String AS_ATTACHMENT
public static final java.lang.String AS_VERB
public static final java.lang.String AS_ACTOR_ID
public static final java.lang.String AS_MENTIONS
public static final java.lang.String CQ_ADDED
public static final java.lang.String CQ_ALLOWFILEUPLOADS
public static final java.lang.String CQ_ALLOW_REPLIES
public static final java.lang.String CQ_APPROVED
public static final java.lang.String CQ_AUTHORIZABLE_ID
public static final java.lang.String CQ_AUTHOR_IMAGE_URL
public static final java.lang.String CQ_AUTHOR_PROFILE_URL
public static final java.lang.String CQ_AUTHOR_DISPLAY_NAME
public static final java.lang.String CQ_AUTHOR_EMAIL
public static final java.lang.String CQ_BASE_TYPE
public static final java.lang.String CQ_COMPOSED_BY
public static final java.lang.String CQ_DRAFT
public static final java.lang.String CQ_IS_CLOSED
public static final java.lang.String CQ_ENTITY_URL
public static final java.lang.String CQ_IS_FLAGGED
public static final java.lang.String CQ_FLAGGED_HIDDEN
public static final java.lang.String CQ_IS_REPLY
public static final java.lang.String CQ_KEY
public static final java.lang.String CQ_MAXFILESIZE
public static final java.lang.String CQ_MAXIMAGEFILESIZE
public static final java.lang.String CQ_MODERATE_COMMENTS
public static final java.lang.String CQ_PARENT_ID
public static final java.lang.String CQ_PINNED
public static final java.lang.String CQ_PUBLISH_DATE
public static final java.lang.String CQ_PUBLISH_JOB_ID
public static final java.lang.String CQ_REQUIRELOGIN
public static final java.lang.String CQ_RESOURCE_TYPE
public static final java.lang.String CQ_ROOT_COMMENT_SYSTEM
public static final java.lang.String CQ_RTEENABLED
public static final java.lang.String CQ_SPAM
public static final java.lang.String CQ_TAGS
public static final java.lang.String CQ_TALLY_RESPONSE
public static final java.lang.String CQ_TALLY_TIMESTAMP
public static final java.lang.String CQ_TITLE
public static final java.lang.String CQ_USER_IDENTIFIER
public static final java.lang.String CQ_DESCRIPTION
public static final java.lang.String CQ_LAST_MODIFIED
public static final java.lang.String CQ_SENTIMENT
public static final java.lang.String CQ_MENTIONS
public static final java.lang.String CQ_ATTACHMENT
public static final java.lang.String CQ_CONTENT_TYPE
public static final java.lang.String CQ_SEARCH_PATH
public static final java.lang.String CQ_SEARCH_TAG_NAME
public static final java.lang.String CQ_SEARCH_PARENT_ID
public static final java.lang.String CQ_MT_TRANS_DATE
public static final java.lang.String CQ_MT_TRANSLATION
public static final java.lang.String CQ_AS_VERB
public static final java.lang.String CQ_AS_ACTOR_ID
public static final java.lang.String AS_CQ_SUBHASH_DATE
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)
strLanguage
- Languagepublic 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 convertpublic boolean isIndexable(java.lang.String key)
key
- KeyCopyright © 2010 - 2020 Adobe. All Rights Reserved