Skip to content

Releases: metafacture/metafacture-core

Metafacture Core 4.0.0

09 Jan 19:10
Compare
Choose a tag to compare

This is the last release of metafacture-core as a single Maven artifact. The release concentrates on reorganising the sources to prepare for the split-up of metafacture-core in the next release.

Important: This release contains a number of breaking changes and updating from metafacture-core-3.5.0 is not trivial. The most notable changes are the update to Java 8 and the reorganisation of the package structure which changed the qualified names of all Metafacture modules and moved many of the other classes to new packages. Please refer to the list of modules per package at the end of the release notes to find the new module locations. All other relocated and renamed classes are listed below.

Changes

New features

Flux

  • Added the @FluxCommand annotation to all modules which can be use in Flux (see 4ff1ce5, b297e6d)

Metamorph

  • Fix #256: Support sameEntity in none and all. Add support for the sameEntity attribute to none and all statements. The attribute does not make sense in any statements (see 93bc48d)
  • The RestMap which looks up values by doing a REST request works now (thanks @philboeselager, see 704d4ad)
  • The new helper class InlineMorph simplifies embedding Metamorph scripts directly in Java. It was introduced to help writing test cases for Metamorph functions and collectors (see 9b6e7f1)

Metafacture modules

  • Added ForwardingStreamPipe as a base class for modules which only need to intercept some events but forward all others unmodified (see 4412623)
  • Added NullFilter which replaces null values with a replacement string or discards them (see c282c74)
  • Added JsonToElasticsearchBulk module to create Elasticsearch bulk import data from JSON (thanks @fsteeg and @blackwinter, see 9d85194, 056fe60)
  • Added AlephMabXmlHandler for the widely used Mab-Xml derivative created by Aleph exports (thanks @dr0i, see 482af42)
  • Added AseqDecoder. A decoder for aseq data (thanks @larsgsvensson, see f77b1ae)
  • Added XmlElementSplitter. The module splits an xml document at acertain element (thanks @dr0i, see 5517beb)
  • Added XmlFilenameWriter: The module extracts a file name from an xml document and saves the document to the extracted file. It's possible to store the file uncompressed and as bz2 (thanks @dr0i, see 40d290e)
  • Added XmlTee. A tee implementation for XML event streams. Allows to forward a stream to more than one downstream module (thanks @dr0i, see 3fb3b4d)
  • PojoEncoder: Added support for populating maps in POJOs (thanks @thomasseidel, see e23bc13)
  • IdChangePipe (now RecordIdChanger): Added corresponding getters for setters (see e8300a8)
  • Utf8Normalizer (now UnicodeNormalizer): Made normalisation form configurable (see 314a641)
  • PicaDecoder: Added record ids for level 1 & 2 records. Local system records (level 1) and holding records (level 2) do not store their record id in field 003@ $0 but in field 107F $0 or 203@ $0 (the latter may include an occurrence specification). These ids are now emitted as record ids in start-record events when level 1 or level 2 records are processed (see c955f4d, a9529dd)
  • Marc21Encoder: The record identifier field (001) can now be automatically created from the record identifier of the start record event. This is configured by the setGenerateRecordId(boolean) parameter (see 6d04d69)

Other

  • Added a framework reading and writing ISO 2709:2008 records (see 3b24df5)
  • ResourceUtil: Added readAll(InputStream, Charset) and readAll(Reader) to read a full stream into a string (see 9a70936)
  • XmlUtil: Added escape(String) method for escaping strings for xml output (see 9fb4154)

Bug fixes

Flux

  • The flux grammar supported octal escape sequence but failed to convert them into characters after parsing (see b4da5bf)

Metamorph

  • Fix #255: Metamorph emits null as entity name (see 8adafef)
  • Fix #257: Do not reset entity if reset is false (see a680a28)
  • Fix #265: split and switch-name-value functions emitted wrong source (see a7f6785)
  • Fixed resource leak in Metamorph file-maps (see d519e8c)

Metamorph-Test

  • Fix #6: Fix test names for Metamorph Test in Intellij. Intellij did not show the name of the xml files containing the tests but only the string "xml". This was caused by Intellij interpreting the test class name as a fully qualified java class name and attempting to extract the class name from it. By making sure that the Metamorph Test names do not contain any dots this problem can be avoided (see 033e6d0)

Metafacture modules

  • StreamUnicodeNormalizer no longer fails on null values in literals but simply forwards them (see 12e3420)
  • Marc21Encoder produced invalid MARC 21 records if the record data contained unicode codepoints which required more than one byte in UTF-8 encoding (see 6d04d69)

Removed features

Flux

  • Removed generic-xml Flux command. Use decode-xml followed by handle-generic-xml instead (see 53edfdb)
  • Removed MorphVisualizer. The tool was outdated and not well maintained. There is currently no replacement for it (see 73efd63)

Metamorph

  • Fix #226: Remove miss-spelled options from occurrence function. The occurrence function in Metamorph no longer supports lessThen and moreThen in its only attribute. Instead lessThan and moreThan must be used (see 800108e)
  • The constructors of the collector helper classes expected a reference to the Metamorph object. The parameter has been removed as collectors should not access the Metamorph object (see f76f39e)
  • CollectFactory, FunctionFactory and MapsFactory have been made package-private in the metamorph package. The are considered to be an internal part of Metamorph (see c805690)

Metamorph-Test

  • TestConfigurationException is removed and replaced with JUnit's InitializationError (see 35dfaf5)
  • MetamorphTestCase, MetamorphTestLoader and MetamorphTestRunner are made package-private as the are not required for using Metamorph-Test (see 35dfaf5)

Metafacture modules

  • Removed CGEntityDecoder, CGEntityEncoder, CGTextDecoder, CGEntityReader and the helper class CGEntity. Use FormetaDecoder and FormetaEncoder instead. To convert data cg-entity or cg-text format to Formeta use metafacture-3.5.0 which contains support for both formats (see ac1c71d)
  • Removed Bzip2Opener and GzipOpener. The generic FileOpener automatically recognises and handles compressed files (see c3f24eb)
  • Removed RecordBounderyRemover. The functionality provided by this module is also provided by StreamEventDiscarder (see 305c8d4)
  • Removed ObjectExceptionLogger in favour of ObjectExceptionCatcher which provides the same functionality (see 919349b)
  • Removed RecordBatcher. Use implementations of AbstractBatcher instead (see 52da508)
  • Removed StreamFormatter. The FormetaEncoder and StreamLogger modules provide very similar functionality and should be used instead (see 2f6bc2a)
  • Removed WrappingStreamPipe. Modules with nested pipelines should manage them themselves (see 52a5f21)
  • Removed SimpleJsonEncoder. The JsonEncoder module provides the same functionality (see 7d5e467)
  • Removed EventListSource. If used with EventList it can be often replaced with a StreamBuffer (see f77539b)
  • Removed MultiOpener. There were no concrete opener implementations registered to be used by MultiOpener. So, the class was completely useless (see 566022f)
  • Removed CsvReader, GenericXmlReader, LidoReader, MabReader, MarcReader, MetsModsReader and PicaXmlReader. Users who use these readers should replace them by the corresponding combination of a record splitting module and a recor...
Read more

Metafacture Core 3.5.0

08 Jul 14:45
Compare
Choose a tag to compare

This is a bug fix release with some small new features

Bug fixes
  • Fix #255: Metamorph emits null as entity name (9821220)
  • Fix #257: Do not reset entity if reset is false (ee9ef99)
New Features
  • Fix #256: Support sameEntity in none and all (f8ef044)

See commits for details

Maven Coordinates

Metafacture core is available on Maven Central:

<dependency>
  <groupId>org.culturegraph</groupId>
  <artifactId>metafacture-core</artifactId>
  <version>3.5.0</version>
</dependency>

Metafacture Core 3.4.0

08 Jul 13:49
Compare
Choose a tag to compare

This is a feature release which adds some new Metafacture modules

New Features
  • Add module RecordToEntity to turn records into entities (c337ce9)
  • Add module EntityPathTracker for returning the current entity path (0a3ff6f)
  • Add module StreamEventDiscarder (e613a26)
  • Add StreamDeferrer module (3acf7a1)
  • PicaDecoder: Make whitespace removal in field names optional (3547a43)

See commits for details.

Maven Coordinates

Metafacture core is available on Maven Central:

<dependency>
  <groupId>org.culturegraph</groupId>
  <artifactId>metafacture-core</artifactId>
  <version>3.4.0</version>
</dependency>

Metafacture Core 3.3.1

16 Mar 08:19
Compare
Choose a tag to compare

This is a small bug fix release.

Bug fixes
  • Fix #191: TriplesCollect Should not output endRecord() events in closeStream() and resetStream() events if no triples were received.

Maven Coordinates

Metafacture core is available on Maven Central:

<dependency>
  <groupId>org.culturegraph</groupId>
  <artifactId>metafacture-core</artifactId>
  <version>3.3.1</version>
</dependency>

Metafacture Core 3.3.0

17 Dec 16:37
Compare
Choose a tag to compare

This is a minor update.

Bug fixes
  • SimpleXmlEncoder did write a closing root tag if resetStream() was called even if no root tag was open (see #249, which describes the same issue in closeStream() for details)
New features
  • Fix #252: Add parameter (setWriteRootTag) to make output of root tag in SimpleXmlEncoder optional.

Maven Coordinates

Metafacture core is available on Maven Central:

<dependency>
  <groupId>org.culturegraph</groupId>
  <artifactId>metafacture-core</artifactId>
  <version>3.3.0</version>
</dependency>

Metafacture Core 3.2.0

16 Dec 15:16
Compare
Choose a tag to compare

This is mainly a bug fix release but it has some new features.

Changed Behaviour
  • The reset behaviour of the choose collector has changed when it is used with an if-condition: In the old implementation the chosen value was only cleared after it was actually emitted (so only if the condition was met). Now it is also cleared if it was attempted to be emitted but was not due to the condition not being met. This is in-line with the behaviour of the other collectors.
Bug fixes
  • Disable javadoc doclint in order to be able to create release builds and submit snapshots builds to http://oss.sonatype.org/ from Travis CI.
  • Fix #249: emits closing tag without opening tag in SimpleXmlEncoder
  • Fix #235, #237: Add PicaXmlHandler to flux-command.properties
New features
  • Resolve #49, #210, #250: The choose collector now supports reset and sameEntity and is reset even if an if-condition prevents emitting a value.
  • Resolve #247: set namespace map directly in SimpleXmlEncoder. It is no longer neccessary to use a MultiMap with a specially named key that contains the actual namespace map. Instead the namespace map can be passe directly to the SimpleXmlEncoder.
  • Resolve #248: support default namespace in SimpleXmlDecoder
  • Resolve #187: Make delimiter in concat is now optional
  • Resolve #238: the Travis build status is now shown in the readme file on github

Maven Coordinates

Metafacture core is available on Maven Central:

<dependency>
  <groupId>org.culturegraph</groupId>
  <artifactId>metafacture-core</artifactId>
  <version>3.2.0</version>
</dependency>

Metafacture Runner Distribution 3.1.2

26 Jul 17:10
Compare
Choose a tag to compare

This release updates the metafacture-core dependency to version 3.1.2 Please see the release notes for metafacture-core for a list of changes.

Metafacture Core 3.1.2

16 Dec 15:05
Compare
Choose a tag to compare

This is a bug fix release.

Bug fixes
  • Fix #233: Do not trim MarcXML record leader
  • Java 8 support: update Antlr and updates for Travis CI (see #211, #230). Please note: metafacture-core is still built for Java 6. The changes only allow to built the library on JDK 8.

Maven Coordinates

Metafacture core is available on Maven Central:

<dependency>
  <groupId>org.culturegraph</groupId>
  <artifactId>metafacture-core</artifactId>
  <version>3.1.2</version>
</dependency>

Metafacture Runner Distribution 3.1.1

26 Jul 16:58
Compare
Choose a tag to compare

This release updates the metafacture-core dependency to version 3.1.1 Please see the release notes for metafacture-core for a list of changes.

Metafacture Core 3.1.1

01 Jun 11:55
Compare
Choose a tag to compare

This is a bug fix release.

Bug fixes
  • #231 Marc21Encoder now ignores literals named type which are emitted by the MarcXmlHandler. This prevented the conversion of marcxml to marc21.
  • #232 MarcXmlHandler accessed some attributes in not by name but by index. This makes the implementation depending on the order of the attributes in the data. This is fixed now.

Maven Coordinates

Metafacture core is available on Maven Central:

<dependency>
  <groupId>org.culturegraph</groupId>
  <artifactId>metafacture-core</artifactId>
  <version>3.1.1</version>
</dependency>