public class OutgoingReferencesExtractor extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
private static String |
__OUTGOING_REFERENCE_TYPE_EXPLORER
Constants for the explorer type for outgoing references
|
protected ContentTypesHelper |
_contentTypesHelper
Helper for content types
|
static String |
OUTGOING_REFERENCE_TYPE_CONTENT
Constant for the content type for outgoing references
|
static String |
ROLE
Avalon role
|
Constructor and Description |
---|
OutgoingReferencesExtractor() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,OutgoingReferences> |
_analyzeCompositeMetadata(Content content,
MetadataDefinition parentMetadataDefinition,
CompositeMetadata metadataHolder,
String metadataPathPrefix)
Analyze a composite metadata to extract the outgoing references
|
protected OutgoingReferences |
_analyzeContentMetadata(MetadataDefinition metadataDefinition,
String[] contentIds)
Analyze a content metadata.
|
protected OutgoingReferences |
_analyzeMetadata(MetadataDefinition metadataDefinition,
RichText metadata)
Analyze a rich text metadata.
|
protected OutgoingReferences |
_analyzeReferenceMetadata(MetadataDefinition metadataDefinition,
CompositeMetadata metadata)
Analyze a reference metadata.
|
protected OutgoingReferences |
_analyzeResourceFileMetadata(MetadataDefinition metadataDefinition,
String metadata)
Analyze a string file metadata.
|
protected MetadataDefinition |
_getMetadataDefinition(Content content,
MetadataDefinition parentMetadataDefinition,
String metadataName)
Retrieves a sub metadata definition from a content type or
a parent metadata definition.
|
Map<String,OutgoingReferences> |
getOutgoingReferences(Content content)
This method analyzes the content to return the list of outgoing references grouped by metadata path.
|
void |
service(ServiceManager serviceManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String OUTGOING_REFERENCE_TYPE_CONTENT
private static final String __OUTGOING_REFERENCE_TYPE_EXPLORER
protected ContentTypesHelper _contentTypesHelper
public OutgoingReferencesExtractor()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<String,OutgoingReferences> getOutgoingReferences(Content content)
content
- The content to analyzeprotected Map<String,OutgoingReferences> _analyzeCompositeMetadata(Content content, MetadataDefinition parentMetadataDefinition, CompositeMetadata metadataHolder, String metadataPathPrefix)
content
- The current contentparentMetadataDefinition
- The parent metadata definition (can be null, at the root level)metadataHolder
- The composite metadata to analyze. Cannot be nullmetadataPathPrefix
- The path of the current metadata holderprotected OutgoingReferences _analyzeMetadata(MetadataDefinition metadataDefinition, RichText metadata)
metadataDefinition
- The metadata definition corresponding to the current metadatametadata
- The metadata to analyze. Cannot be nullprotected OutgoingReferences _analyzeResourceFileMetadata(MetadataDefinition metadataDefinition, String metadata)
metadataDefinition
- The metadata definition corresponding to the current metadatametadata
- The metadata to analyze. Cannot be nullprotected OutgoingReferences _analyzeReferenceMetadata(MetadataDefinition metadataDefinition, CompositeMetadata metadata)
metadataDefinition
- The metadata definition corresponding to the current metadatametadata
- The reference metadataprotected OutgoingReferences _analyzeContentMetadata(MetadataDefinition metadataDefinition, String[] contentIds)
metadataDefinition
- The metadata definition corresponding to the current metadatacontentIds
- The metadata value to analyze. Cannot be nullprotected MetadataDefinition _getMetadataDefinition(Content content, MetadataDefinition parentMetadataDefinition, String metadataName)
content
- the content.parentMetadataDefinition
- the parent metadata definition.metadataName
- the metadata name.null
otherwise.