mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2026-09-16 18:12:54 +00:00
ACS-12413 : enable deferred pre-commit hooks and normalize repo (#1333)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
eeabc8b858
commit
5b03dc315e
@@ -1,7 +1,7 @@
|
||||
# Common base code for T-Engines
|
||||
|
||||
This project provides a common base for T-Engines and supersedes the
|
||||
[original base](https://github.com/Alfresco/alfresco-transform-core/blob/master/deprecated/alfresco-transformer-base).
|
||||
[original base](https://github.com/Alfresco/alfresco-transform-core/blob/master/deprecated/alfresco-transformer-base).
|
||||
|
||||
This project provides a base Spring Boot application (as a jar) to which transform
|
||||
specific code may be added. It includes actions such as communication between
|
||||
@@ -17,7 +17,7 @@ For more details on build a custom T-Engine and T-Config, please refer to the do
|
||||
A T-Engine project which extends this base is expected to provide the following:
|
||||
|
||||
* An implementation of the [TransformEngine](https://github.com/Alfresco/alfresco-transform-core/blob/master/engines/base/src/main/java/org/alfresco/transform/base/TransformEngine.java)
|
||||
interface to describe the T-Engine.
|
||||
interface to describe the T-Engine.
|
||||
* Implementations of the [CustomTransformer](engines/base/src/main/java/org/alfresco/transform/base/CustomTransformer.java)
|
||||
interface with the actual transform code.
|
||||
* An `application-default.yaml` file to define a unique name for the message queue to the T-Engine.
|
||||
@@ -30,7 +30,6 @@ The `TransformEngine.getTransformConfig()` method typically reads a `json` file.
|
||||
The names in the config should match the names returned by the `CustomTransformer`
|
||||
implementations.
|
||||
|
||||
|
||||
**Example TransformEngine**
|
||||
|
||||
The `TransformEngineName` is important if the config from multiple T-Engines is being
|
||||
@@ -158,4 +157,4 @@ queue:
|
||||
|
||||
```text
|
||||
Jane
|
||||
```
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ public interface TransformManager
|
||||
|
||||
/**
|
||||
* Allows a {@link CustomTransformer} to use a local source {@code File} rather than the supplied {@code InputStream}. The file will be deleted once the request is completed. To avoid creating extra files, if a File has already been created by the base t-engine, it is returned. If possible this method should be avoided as it is better not to leave content on disk.
|
||||
*
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* if this method has already been called.
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ public interface TransformManager
|
||||
|
||||
/**
|
||||
* Allows a {@link CustomTransformer} to use a local target {@code File} rather than the supplied {@code OutputStream}. The file will be deleted once the request is completed. To avoid creating extra files, if a File has already been created by the base t-engine, it is returned. If possible this method should be avoided as it is better not to leave content on disk.
|
||||
*
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* if this method has already been called. A call to {@link #respondWithFragment(Integer, boolean)} allows the method to be called again.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ public interface TransformManager
|
||||
|
||||
/**
|
||||
* Allows a single transform request to have multiple transform responses. For example, images from a video at different time offsets or different pages of a document. Following a call to this method a transform response is made with the data sent to the current {@code OutputStream}. If this method has been called, there will not be another response when {@link CustomTransformer#transform(String, InputStream, String, OutputStream, Map, TransformManager)} returns and any data written to the final {@code OutputStream} will be ignored.
|
||||
*
|
||||
*
|
||||
* @param index
|
||||
* returned with the response, so that the fragment may be distinguished from other responses. Renditions use the index as an offset into elements. A {@code null} value indicates that there is no more output and any data sent to the current {@code outputStream} will be ignored.
|
||||
* @param finished
|
||||
|
||||
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
|
||||
* Use the {@link #setProcessDirectory(String) processDirectory} property to change the default location from which the command executes. The process's environment can be configured using the {@link #setProcessProperties(Map) processProperties} property.
|
||||
* <p>
|
||||
* Commands may use placeholders, e.g.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <code>
|
||||
* find
|
||||
@@ -65,27 +65,27 @@ import org.slf4j.LoggerFactory;
|
||||
* ${filename}
|
||||
* </code>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* The <b>filename</b> property will be substituted for any supplied value prior to each execution of the command. Currently, no checks are made to get or check the properties contained within the command string. It is up to the client code to dynamically extract the properties required if the required properties are not known up front.
|
||||
* <p>
|
||||
* Sometimes, a variable may contain several arguments. . In this case, the arguments need to be tokenized using a standard <tt>StringTokenizer</tt>. To force tokenization of a value, use:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <code>
|
||||
* SPLIT:${userArgs}
|
||||
* </code>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* You should not use this just to split up arguments that are known to require tokenization up front. The <b>SPLIT:</b> directive works for the entire argument and will not do anything if it is not at the beginning of the argument. Do not use <b>SPLIT:</b> to break up arguments that are fixed, so avoid doing this:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <code>
|
||||
* SPLIT:ls -lih
|
||||
* </code>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* Instead, break the command up explicitly:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <code>
|
||||
* ls
|
||||
|
||||
+3
-3
@@ -77,7 +77,7 @@ import org.alfresco.transform.base.TransformManager;
|
||||
* If a transform specifies that it can convert from {@code "<MIMETYPE>"} to {@code "alfresco-metadata-embed"}, it is indicating that it can embed metadata in {@code <MIMETYPE>}.
|
||||
*
|
||||
* The transform calls {@link #embedMetadata(String, InputStream, String, OutputStream, Map, TransformManager)} which should results in a new version of supplied source file that contains the metadata supplied in the transform options.
|
||||
*
|
||||
*
|
||||
* @author Jesper Steen Møller
|
||||
* @author Derek Hulley
|
||||
* @author adavis
|
||||
@@ -216,7 +216,7 @@ public abstract class AbstractMetadataExtractorEmbedder implements CustomTransfo
|
||||
* Based on AbstractMappingMetadataExtracter#getDefaultMapping.
|
||||
*
|
||||
* This method provides a <i>mapping</i> of where to store the values extracted from the documents. The list of properties need <b>not</b> include all metadata values extracted from the document. This mapping should be defined in a file based on the class name: {@code "<classname>_metadata_extract.properties"}
|
||||
*
|
||||
*
|
||||
* @return Returns a static mapping. It may not be null.
|
||||
*/
|
||||
private Map<String, Set<String>> buildExtractMapping()
|
||||
@@ -269,7 +269,7 @@ public abstract class AbstractMetadataExtractorEmbedder implements CustomTransfo
|
||||
* This method provides a <i>mapping</i> of model properties that should be embedded in the content. The list of properties need <b>not</b> include all properties. This mapping should be defined in a file based on the class name: {@code "<classname>_metadata_embed.properties"}
|
||||
* <p>
|
||||
* If no {@code "<classname>_metadata_embed.properties"} file is found, a reverse of the {@code "<classname>_metadata_extract.properties"} will be assumed. A last win approach will be used for handling duplicates.
|
||||
*
|
||||
*
|
||||
* @return Returns a static mapping. It may not be null.
|
||||
*/
|
||||
private Map<String, Set<String>> buildEmbedMapping()
|
||||
|
||||
+5
-5
@@ -58,17 +58,17 @@ import org.alfresco.transform.base.clients.FileInfo;
|
||||
* <li>Provide expected json files (<sourceFilename>"_metadata.json") as resources on the classpath.</li>
|
||||
* <li>Override the method {@code testTransformation(FileInfo testFileInfo)} such that it calls the super method as a {@code @ParameterizedTest} for example:</li>
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* @ParameterizedTest
|
||||
*
|
||||
*
|
||||
* @MethodSource("engineTransformations")
|
||||
*
|
||||
*
|
||||
* @Override
|
||||
|
||||
* public void testTransformation(FileInfo testFileInfo)
|
||||
*
|
||||
* {
|
||||
*
|
||||
* {
|
||||
* super.testTransformation(FileInfo testFileInfo)
|
||||
* }
|
||||
* </pre>
|
||||
|
||||
@@ -1 +1 @@
|
||||
target/docker/
|
||||
target/docker/
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
queue:
|
||||
engineRequestQueue: ${TRANSFORM_ENGINE_REQUEST_QUEUE:org.alfresco.transform.engine.example.acs}
|
||||
engineRequestQueue: ${TRANSFORM_ENGINE_REQUEST_QUEUE:org.alfresco.transform.engine.example.acs}
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
Jane
|
||||
Jane
|
||||
|
||||
@@ -1 +1 @@
|
||||
target/docker/
|
||||
target/docker/
|
||||
|
||||
@@ -1 +1 @@
|
||||
target/docker/
|
||||
target/docker/
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
* This transformer uses LibreOffice from The Document Foundation. See the license at
|
||||
[https://www.libreoffice.org/download/license/](https://www.libreoffice.org/download/license/)
|
||||
or the [libreoffice.txt](src/main/resources/licenses/3rd-party/libreoffice.txt)
|
||||
file placed in the root directory of the docker image.
|
||||
file placed in the root directory of the docker image.
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
|
||||
/**
|
||||
* Manages LibreOffice user profile templates for transformations.
|
||||
*
|
||||
*
|
||||
* @author Sayan Bhattacharya
|
||||
*/
|
||||
public class LibreOfficeProfileManager
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ import org.artofsolving.jodconverter.office.OfficeTask;
|
||||
* @deprecated The JodConverterMetadataExtracter has not been in use since 6.0.1
|
||||
*
|
||||
* Extracts values from Open Office documents into the following:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <b>author:</b> -- cm:author
|
||||
* <b>title:</b> -- cm:title
|
||||
|
||||
@@ -8,4 +8,4 @@ transform:
|
||||
timeout: ${LIBREOFFICE_TIMEOUT:1200000}
|
||||
portNumbers: ${LIBREOFFICE_PORT_NUMBERS:8100}
|
||||
templateProfileDir: ${LIBREOFFICE_TEMPLATE_PROFILE_DIR:alfresco_default}
|
||||
isEnabled: ${LIBREOFFICE_IS_ENABLED:true}
|
||||
isEnabled: ${LIBREOFFICE_IS_ENABLED:true}
|
||||
|
||||
@@ -243,4 +243,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
/**
|
||||
* Test cases for LibreOfficeProfileManager
|
||||
*
|
||||
*
|
||||
* @author Sayan Bhattacharya
|
||||
*/
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
|
||||
@@ -1 +1 @@
|
||||
target/docker/
|
||||
target/docker/
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
### Licenses
|
||||
|
||||
* htmlparser http://htmlparser.sourceforge.net/license.html
|
||||
* commons-compress http://jakarta.apache.org/commons/
|
||||
* pdfbox-tools http://pdfbox.apache.org/
|
||||
* poi-ooxml http://poi.apache.org/
|
||||
* commons-compress, PDFBox and poi-ooxml are from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0 or the
|
||||
* htmlparser <http://htmlparser.sourceforge.net/license.html>
|
||||
* commons-compress <http://jakarta.apache.org/commons/>
|
||||
* pdfbox-tools <http://pdfbox.apache.org/>
|
||||
* poi-ooxml <http://poi.apache.org/>
|
||||
* commons-compress, PDFBox and poi-ooxml are from Apache. See the license at <http://www.apache.org/licenses/LICENSE-2.0> or the
|
||||
[Apache 2.0.txt](src/main/resources/licenses/3rd-party/Apache%202.0.txt)
|
||||
file placed in the root directory of the docker image.
|
||||
* NotoSans https://openfontlicense.org/open-font-license-official-text/
|
||||
* NotoSans <https://openfontlicense.org/open-font-license-official-text/>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#
|
||||
# HtmlMetadataExtractor - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
#
|
||||
# HtmlMetadataExtractor - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
|
||||
@@ -113,4 +113,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
target/docker/
|
||||
target/docker/
|
||||
|
||||
@@ -3,4 +3,4 @@ queue:
|
||||
transform:
|
||||
core:
|
||||
pdfrenderer:
|
||||
exe: ${PDFRENDERER_EXE:/usr/bin/alfresco-pdf-renderer}
|
||||
exe: ${PDFRENDERER_EXE:/usr/bin/alfresco-pdf-renderer}
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
target/docker/
|
||||
target/docker/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
### Licenses
|
||||
|
||||
* Tika is from Apache. See the licence at http://www.apache.org/licenses/LICENSE-2.0 or the [Apache 2.0.txt](src/main/resources/licenses/3rd-party/Apache%202.0.txt) file placed in the root directory of the docker image.
|
||||
* Exiftool is from Phil Harvey. See licence at https://exiftool.org/#license and Perl at https://dev.perl.org/licenses/ (https://dev.perl.org/licenses/artistic.html) or [Perl Artistic License.txt](src/main/resources/licenses/3rd-party/Perl-Artistic-License.txt) file placed in the root directory of the docker image.
|
||||
* Tika is from Apache. See the licence at <http://www.apache.org/licenses/LICENSE-2.0> or the [Apache 2.0.txt](src/main/resources/licenses/3rd-party/Apache%202.0.txt) file placed in the root directory of the docker image.
|
||||
* Exiftool is from Phil Harvey. See licence at <https://exiftool.org/#license> and Perl at <https://dev.perl.org/licenses/> (<https://dev.perl.org/licenses/artistic.html>) or [Perl Artistic License.txt](src/main/resources/licenses/3rd-party/Perl-Artistic-License.txt) file placed in the root directory of the docker image.
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ import org.alfresco.transform.base.metadata.AbstractMetadataExtractorEmbedder;
|
||||
|
||||
/**
|
||||
* The parent of all Metadata Extractors which use Apache Tika under the hood. This handles all the common parts of processing the files, and the common mappings.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <b>author:</b> -- cm:author
|
||||
* <b>title:</b> -- cm:title
|
||||
|
||||
+2
-2
@@ -120,7 +120,7 @@ public class IPTCMetadataExtractor extends AbstractTikaMetadataExtractorEmbeddor
|
||||
/**
|
||||
* Converts a date or date time strings into Iso8601 format
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* @param dateStrings
|
||||
* @return dateStrings in Iso8601 format
|
||||
* @see #iptcToIso8601DateString
|
||||
@@ -151,7 +151,7 @@ public class IPTCMetadataExtractor extends AbstractTikaMetadataExtractorEmbeddor
|
||||
* <li>"2001:02:01 16:15+00:00" will convert to "2001-02-01T16:15+00:00"</li>
|
||||
* <li>"2021-06-11 05:36-01:00" will convert to "2021-06-11T05:36-01:00"</li>
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* @param dateStr
|
||||
* @return dateStr in Iso8601 format
|
||||
*/
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ import org.alfresco.transform.tika.metadata.AbstractTikaMetadataExtractorEmbeddo
|
||||
* Configuration: (see OfficeMetadataExtractor_metadata_extract.properties and tika_engine_config.json)
|
||||
*
|
||||
* This extractor uses the POI library to extract the following:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <b>author:</b> -- cm:author
|
||||
* <b>title:</b> -- cm:title
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ import org.alfresco.transform.tika.metadata.AbstractTikaMetadataExtractorEmbeddo
|
||||
* <b>created:</b> -- cm:created
|
||||
* <b>Any custom property:</b> -- [not mapped]
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author Nick Burch
|
||||
* @author Neil McErlean
|
||||
* @author Dmitry Velichkevich
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ public class TikaAutoMetadataExtractor extends AbstractTikaMetadataExtractorEmbe
|
||||
|
||||
/**
|
||||
* Exif metadata for size also returns the string "pixels" after the number value , this function will stop at the first non digit character found in the text
|
||||
*
|
||||
*
|
||||
* @param sizeText
|
||||
* string text
|
||||
* @return the size value
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#
|
||||
# DWGMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Nick Burch
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
#
|
||||
# DWGMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Nick Burch
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
|
||||
@@ -138,4 +138,4 @@ XMP-plus\:PLUSVersion=plus:Version
|
||||
XMP-plus\:PropertyReleaseID=plus:PropertyReleaseID
|
||||
XMP-plus\:PropertyReleaseStatus=plus:PropertyReleaseStatus
|
||||
|
||||
stDim\:unit=stDim:unit
|
||||
stDim\:unit=stDim:unit
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
#
|
||||
# MP3MetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
namespace.prefix.audio=http://www.alfresco.org/model/audio/1.0
|
||||
|
||||
# Core mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
|
||||
# Audio descriptive mappings
|
||||
xmpDM\:album=audio:album
|
||||
xmpDM\:artist=audio:artist
|
||||
xmpDM\:composer=audio:composer
|
||||
xmpDM\:engineer=audio:engineer
|
||||
xmpDM\:genre=audio:genre
|
||||
xmpDM\:trackNumber=audio:trackNumber
|
||||
xmpDM\:releaseDate=audio:releaseDate
|
||||
#xmpDM:logComment
|
||||
|
||||
# Audio specific mappings
|
||||
xmpDM\:audioSampleRate=audio:sampleRate
|
||||
xmpDM\:audioSampleType=audio:sampleType
|
||||
xmpDM\:audioChannelType=audio:channelType
|
||||
xmpDM\:audioCompressor=audio:compressor
|
||||
#
|
||||
# MP3MetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
namespace.prefix.audio=http://www.alfresco.org/model/audio/1.0
|
||||
|
||||
# Core mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
|
||||
# Audio descriptive mappings
|
||||
xmpDM\:album=audio:album
|
||||
xmpDM\:artist=audio:artist
|
||||
xmpDM\:composer=audio:composer
|
||||
xmpDM\:engineer=audio:engineer
|
||||
xmpDM\:genre=audio:genre
|
||||
xmpDM\:trackNumber=audio:trackNumber
|
||||
xmpDM\:releaseDate=audio:releaseDate
|
||||
#xmpDM:logComment
|
||||
|
||||
# Audio specific mappings
|
||||
xmpDM\:audioSampleRate=audio:sampleRate
|
||||
xmpDM\:audioSampleType=audio:sampleType
|
||||
xmpDM\:audioChannelType=audio:channelType
|
||||
xmpDM\:audioCompressor=audio:compressor
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# MailMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
sentDate=cm:sentdate
|
||||
originator=cm:originator, cm:author
|
||||
addressee=cm:addressee
|
||||
addressees=cm:addressees
|
||||
subjectLine=cm:subjectline, cm:description
|
||||
#
|
||||
# MailMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
sentDate=cm:sentdate
|
||||
originator=cm:originator, cm:author
|
||||
addressee=cm:addressee
|
||||
addressees=cm:addressees
|
||||
subjectLine=cm:subjectline, cm:description
|
||||
|
||||
+14
-14
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# OfficeMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
subject=cm:description
|
||||
createDateTime=cm:created
|
||||
lastSaveDateTime=cm:modified
|
||||
#
|
||||
# OfficeMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
subject=cm:description
|
||||
createDateTime=cm:created
|
||||
lastSaveDateTime=cm:modified
|
||||
|
||||
+21
-21
@@ -1,21 +1,21 @@
|
||||
#
|
||||
# OpenDocumentMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
creationDate=cm:created
|
||||
creator=cm:author
|
||||
date=
|
||||
description=
|
||||
generator=
|
||||
initialCreator=
|
||||
keyword=
|
||||
language=
|
||||
printDate=
|
||||
printedBy=
|
||||
subject=cm:description
|
||||
title=cm:title
|
||||
#
|
||||
# OpenDocumentMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
creationDate=cm:created
|
||||
creator=cm:author
|
||||
date=
|
||||
description=
|
||||
generator=
|
||||
initialCreator=
|
||||
keyword=
|
||||
language=
|
||||
printDate=
|
||||
printedBy=
|
||||
subject=cm:description
|
||||
title=cm:title
|
||||
|
||||
+13
-13
@@ -1,13 +1,13 @@
|
||||
#
|
||||
# PdfBoxMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
subject=cm:description
|
||||
created=cm:created
|
||||
#
|
||||
# PdfBoxMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Derek Hulley
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
subject=cm:description
|
||||
created=cm:created
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#
|
||||
# PoiMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Neil McErlean
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
#
|
||||
# PoiMetadataExtracter - default mapping
|
||||
#
|
||||
# author: Neil McErlean
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
|
||||
+34
-34
@@ -1,34 +1,34 @@
|
||||
#
|
||||
# TikaAudioMetadataExtracter - audio mapping
|
||||
#
|
||||
# This is used to map from the Tika audio metadata onto your
|
||||
# content model. This will be used for any Audio content
|
||||
# for which an explicit extractor isn't defined
|
||||
#
|
||||
# author: Nick Burch
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
namespace.prefix.audio=http://www.alfresco.org/model/audio/1.0
|
||||
|
||||
# Core mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
|
||||
# Audio descriptive mappings
|
||||
xmpDM\:album=audio:album
|
||||
xmpDM\:artist=audio:artist
|
||||
xmpDM\:composer=audio:composer
|
||||
xmpDM\:engineer=audio:engineer
|
||||
xmpDM\:genre=audio:genre
|
||||
xmpDM\:trackNumber=audio:trackNumber
|
||||
xmpDM\:releaseDate=audio:releaseDate
|
||||
#xmpDM:logComment
|
||||
|
||||
# Audio specific mappings
|
||||
xmpDM\:audioSampleRate=audio:sampleRate
|
||||
xmpDM\:audioSampleType=audio:sampleType
|
||||
xmpDM\:audioChannelType=audio:channelType
|
||||
xmpDM\:audioCompressor=audio:compressor
|
||||
#
|
||||
# TikaAudioMetadataExtracter - audio mapping
|
||||
#
|
||||
# This is used to map from the Tika audio metadata onto your
|
||||
# content model. This will be used for any Audio content
|
||||
# for which an explicit extractor isn't defined
|
||||
#
|
||||
# author: Nick Burch
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
namespace.prefix.audio=http://www.alfresco.org/model/audio/1.0
|
||||
|
||||
# Core mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
|
||||
# Audio descriptive mappings
|
||||
xmpDM\:album=audio:album
|
||||
xmpDM\:artist=audio:artist
|
||||
xmpDM\:composer=audio:composer
|
||||
xmpDM\:engineer=audio:engineer
|
||||
xmpDM\:genre=audio:genre
|
||||
xmpDM\:trackNumber=audio:trackNumber
|
||||
xmpDM\:releaseDate=audio:releaseDate
|
||||
#xmpDM:logComment
|
||||
|
||||
# Audio specific mappings
|
||||
xmpDM\:audioSampleRate=audio:sampleRate
|
||||
xmpDM\:audioSampleType=audio:sampleType
|
||||
xmpDM\:audioChannelType=audio:channelType
|
||||
xmpDM\:audioCompressor=audio:compressor
|
||||
|
||||
+52
-52
@@ -1,52 +1,52 @@
|
||||
#
|
||||
# TikaAutoMetadataExtracter - default mapping
|
||||
#
|
||||
# This is used to map from the Tika and standard namespaces
|
||||
# onto your content model. This will be used for any
|
||||
# content for which an explicit extractor isn't defined,
|
||||
# by using Tika's auto-selection facilities.
|
||||
#
|
||||
# author: Nick Burch
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
namespace.prefix.exif=http://www.alfresco.org/model/exif/1.0
|
||||
namespace.prefix.audio=http://www.alfresco.org/model/audio/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
|
||||
geo\:lat=cm:latitude
|
||||
geo\:long=cm:longitude
|
||||
|
||||
tiff\:ImageWidth=exif:pixelXDimension
|
||||
tiff\:ImageLength=exif:pixelYDimension
|
||||
tiff\:Make=exif:manufacturer
|
||||
tiff\:Model=exif:model
|
||||
tiff\:Software=exif:software
|
||||
tiff\:Orientation=exif:orientation
|
||||
tiff\:XResolution=exif:xResolution
|
||||
tiff\:YResolution=exif:yResolution
|
||||
tiff\:ResolutionUnit=exif:resolutionUnit
|
||||
exif\:Flash=exif:flash
|
||||
exif\:ExposureTime=exif:exposureTime
|
||||
exif\:FNumber=exif:fNumber
|
||||
exif\:FocalLength=exif:focalLength
|
||||
exif\:IsoSpeedRatings=exif:isoSpeedRatings
|
||||
exif\:DateTimeOriginal=exif:dateTimeOriginal
|
||||
|
||||
xmpDM\:album=audio:album
|
||||
xmpDM\:artist=audio:artist
|
||||
xmpDM\:composer=audio:composer
|
||||
xmpDM\:engineer=audio:engineer
|
||||
xmpDM\:genre=audio:genre
|
||||
xmpDM\:trackNumber=audio:trackNumber
|
||||
xmpDM\:releaseDate=audio:releaseDate
|
||||
#xmpDM:logComment
|
||||
xmpDM\:audioSampleRate=audio:sampleRate
|
||||
xmpDM\:audioSampleType=audio:sampleType
|
||||
xmpDM\:audioChannelType=audio:channelType
|
||||
xmpDM\:audioCompressor=audio:compressor
|
||||
#
|
||||
# TikaAutoMetadataExtracter - default mapping
|
||||
#
|
||||
# This is used to map from the Tika and standard namespaces
|
||||
# onto your content model. This will be used for any
|
||||
# content for which an explicit extractor isn't defined,
|
||||
# by using Tika's auto-selection facilities.
|
||||
#
|
||||
# author: Nick Burch
|
||||
|
||||
# Namespaces
|
||||
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
|
||||
namespace.prefix.exif=http://www.alfresco.org/model/exif/1.0
|
||||
namespace.prefix.audio=http://www.alfresco.org/model/audio/1.0
|
||||
|
||||
# Mappings
|
||||
author=cm:author
|
||||
title=cm:title
|
||||
description=cm:description
|
||||
created=cm:created
|
||||
|
||||
geo\:lat=cm:latitude
|
||||
geo\:long=cm:longitude
|
||||
|
||||
tiff\:ImageWidth=exif:pixelXDimension
|
||||
tiff\:ImageLength=exif:pixelYDimension
|
||||
tiff\:Make=exif:manufacturer
|
||||
tiff\:Model=exif:model
|
||||
tiff\:Software=exif:software
|
||||
tiff\:Orientation=exif:orientation
|
||||
tiff\:XResolution=exif:xResolution
|
||||
tiff\:YResolution=exif:yResolution
|
||||
tiff\:ResolutionUnit=exif:resolutionUnit
|
||||
exif\:Flash=exif:flash
|
||||
exif\:ExposureTime=exif:exposureTime
|
||||
exif\:FNumber=exif:fNumber
|
||||
exif\:FocalLength=exif:focalLength
|
||||
exif\:IsoSpeedRatings=exif:isoSpeedRatings
|
||||
exif\:DateTimeOriginal=exif:dateTimeOriginal
|
||||
|
||||
xmpDM\:album=audio:album
|
||||
xmpDM\:artist=audio:artist
|
||||
xmpDM\:composer=audio:composer
|
||||
xmpDM\:engineer=audio:engineer
|
||||
xmpDM\:genre=audio:genre
|
||||
xmpDM\:trackNumber=audio:trackNumber
|
||||
xmpDM\:releaseDate=audio:releaseDate
|
||||
#xmpDM:logComment
|
||||
xmpDM\:audioSampleRate=audio:sampleRate
|
||||
xmpDM\:audioSampleType=audio:sampleType
|
||||
xmpDM\:audioChannelType=audio:channelType
|
||||
xmpDM\:audioCompressor=audio:compressor
|
||||
|
||||
+35
-35
@@ -1,35 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<external-parsers>
|
||||
<parser>
|
||||
<check>
|
||||
<command>exiftool -ver</command>
|
||||
<error-codes>126,127</error-codes>
|
||||
</check>
|
||||
<command>env FOO=${OUTPUT} exiftool -args -G1 -sep "|||" ${INPUT}</command>
|
||||
<mime-types>
|
||||
<mime-type>image/x-raw-hasselblad</mime-type>
|
||||
<mime-type>image/x-raw-sony</mime-type>
|
||||
<mime-type>image/x-raw-canon</mime-type>
|
||||
<mime-type>image/x-raw-adobe</mime-type>
|
||||
<mime-type>image/gif</mime-type>
|
||||
<mime-type>image/jp2</mime-type>
|
||||
<mime-type>image/jpeg</mime-type>
|
||||
<mime-type>image/x-raw-kodak</mime-type>
|
||||
<mime-type>image/x-raw-minolta</mime-type>
|
||||
<mime-type>image/x-raw-nikon</mime-type>
|
||||
<mime-type>image/x-raw-olympus</mime-type>
|
||||
<mime-type>image/x-raw-pentax</mime-type>
|
||||
<mime-type>image/png</mime-type>
|
||||
<mime-type>image/x-raw-fuji</mime-type>
|
||||
<mime-type>image/x-raw-panasonic</mime-type>
|
||||
<mime-type>image/tiff</mime-type>
|
||||
<mime-type>image/webp</mime-type>
|
||||
</mime-types>
|
||||
<metadata>
|
||||
<!-- Default output-->
|
||||
<match>\s*([A-Za-z0-9/ \(\)]+\S{1})\s+:\s+([A-Za-z0-9\(\)\[\] \:\-\.]+)\s*</match>
|
||||
<!-- args format-->
|
||||
<match>^-([\S]+)\=(.*)</match>
|
||||
</metadata>
|
||||
</parser>
|
||||
</external-parsers>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<external-parsers>
|
||||
<parser>
|
||||
<check>
|
||||
<command>exiftool -ver</command>
|
||||
<error-codes>126,127</error-codes>
|
||||
</check>
|
||||
<command>env FOO=${OUTPUT} exiftool -args -G1 -sep "|||" ${INPUT}</command>
|
||||
<mime-types>
|
||||
<mime-type>image/x-raw-hasselblad</mime-type>
|
||||
<mime-type>image/x-raw-sony</mime-type>
|
||||
<mime-type>image/x-raw-canon</mime-type>
|
||||
<mime-type>image/x-raw-adobe</mime-type>
|
||||
<mime-type>image/gif</mime-type>
|
||||
<mime-type>image/jp2</mime-type>
|
||||
<mime-type>image/jpeg</mime-type>
|
||||
<mime-type>image/x-raw-kodak</mime-type>
|
||||
<mime-type>image/x-raw-minolta</mime-type>
|
||||
<mime-type>image/x-raw-nikon</mime-type>
|
||||
<mime-type>image/x-raw-olympus</mime-type>
|
||||
<mime-type>image/x-raw-pentax</mime-type>
|
||||
<mime-type>image/png</mime-type>
|
||||
<mime-type>image/x-raw-fuji</mime-type>
|
||||
<mime-type>image/x-raw-panasonic</mime-type>
|
||||
<mime-type>image/tiff</mime-type>
|
||||
<mime-type>image/webp</mime-type>
|
||||
</mime-types>
|
||||
<metadata>
|
||||
<!-- Default output-->
|
||||
<match>\s*([A-Za-z0-9/ \(\)]+\S{1})\s+:\s+([A-Za-z0-9\(\)\[\] \:\-\.]+)\s*</match>
|
||||
<!-- args format-->
|
||||
<match>^-([\S]+)\=(.*)</match>
|
||||
</metadata>
|
||||
</parser>
|
||||
</external-parsers>
|
||||
|
||||
@@ -529,23 +529,23 @@
|
||||
{
|
||||
"transformerName": "IPTCMetadataExtractor",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "image/gif", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/jp2", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/jpeg", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/png", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/tiff", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/webp", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-adobe", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-canon", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-fuji", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-hasselblad", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-kodak", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-minolta", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-nikon", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-olympus", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-panasonic", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-pentax", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-sony", "priority": 45, "targetMediaType": "alfresco-metadata-extract"}
|
||||
{"sourceMediaType": "image/gif", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/jp2", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/jpeg", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/png", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/tiff", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/webp", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-adobe", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-canon", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-fuji", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-hasselblad", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-kodak", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-minolta", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-nikon", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-olympus", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-panasonic", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-pentax", "priority": 45, "targetMediaType": "alfresco-metadata-extract"},
|
||||
{"sourceMediaType": "image/x-raw-sony", "priority": 45, "targetMediaType": "alfresco-metadata-extract"}
|
||||
],
|
||||
"transformOptions": [
|
||||
"metadataOptions"
|
||||
@@ -1008,4 +1008,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user