Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
__ ___ __ __
|__) |__ / _` \_/ |\/| | | | |__)
| \ |___ \__> / \ | | |___ |___ | |__)
__ ___ __ __
|__) |__ / _` \_/ |\/| | | | |__)
| \ |___ \__> / \ | | |___ |___ | |__)


INTRODUCTION
============

regxmllib is a collection of tools and libraries for the creation of
regxmllib is a collection of tools and libraries for the creation of
RegXML (SMPTE ST 2001-1) representations of MXF header metadata
(SMPTE ST 377-1). A RegXML Fragment example can be found at [1]

Expand All @@ -21,15 +21,15 @@ Two implementations of regxmllib are provided:
KNOWN ISSUES AND LIMITATIONS
============================

regxmllib relies on SMPTE Metadata Registers that conform to SMPTE ST 335,
regxmllib relies on SMPTE Metadata Registers that conform to SMPTE ST 335,
ST 395, ST 400, ST 2003. These registers are published at [1].

[1] https://smpte-ra.org/smpte-metadata-registry

regxmllib deviates from ST 2001-1:2013 in a few narrow instances. Such deviations
are noted in the source code and are expected to be submitted for consideration at
regxmllib deviates from ST 2001-1:2013 in a few narrow instances. Such deviations
are noted in the source code and are expected to be submitted for consideration at
the next revision of ST 2001-1. In particular:

* no baseline metadictionary is used, instead one extension metadictionary per
namespace is used

Expand All @@ -51,47 +51,47 @@ Maven

(recommended) Git

(recommended) SMPTE Metadata Registers (Types, Elements, Groups and Labels)
(recommended) SMPTE Metadata Registers (Types, Elements, Groups and Labels)


Quick Start
-----------

The following outputs to path PATH_TO_FRAGMENT an XML representation
of the header metadata of the MXF file at path PATH_TO_MXF_FILE
of the header metadata of the MXF file at path PATH_TO_MXF_FILE

* build the 'jar' target using Maven 'package' goal
* `mvn package -Pwith-dependencies`

* choose one of the following:

* OPTION 1

* retrieve the four SMPTE Metadata Registers (see [1] above)

* build the metadictionaries from the SMPTE registers

java -cp <PATH_TO_JAR> com.sandflow.smpte.tools.XMLRegistersToDict -e <PATH_TO_ELEMENTS_REG>
-l <PATH_TO_LABELS_REG> -g <PATH_TO_GROUPS_REG> -t <PATH_TO_TYPES_REG> PATH_TO_DICT_DIR

* OPTION 2

* retrieve metadictionaries from [3]

[3] https://github.com/sandflow/IMF/tree/master/dict

* generate the RegXML fragment
run java -cp <PATH_TO_JAR> com.sandflow.smpte.tools.RegXMLDump -all -d <PATH_TO_DICT1> <PATH_TO_DICT2> ...

run java -cp target/regxmllib-jar-with-dependencies.jar com.sandflow.smpte.tools.RegXMLDump -all -d <PATH_TO_DICT1> <PATH_TO_DICT2> ...
-i <PATH_TO_MXF_FILE> > <PATH_TO_FRAGMENT>

* (optional) generate XSDs for RegXML Fragments

run java -cp <PATH_TO_JAR> com.sandflow.smpte.tools.GenerateDictionaryXMLSchema -d <PATH_TO_DICT1> <PATH_TO_DICT2> ...
run java -cp target/regxmllib-jar-with-dependencies.jar com.sandflow.smpte.tools.GenerateDictionaryXMLSchema -d <PATH_TO_DICT1> <PATH_TO_DICT2> ...
-o <PATH_TO_OUTPUT_DIR>

* (optional) generate XSDs for SMPTE registers

run java -cp <PATH_TO_JAR> com.sandflow.smpte.tools.GenerateXMLSchemaDocuments -cp <CLASS_PATH_TO_REGISTER_MODEL>
run java -cp target/regxmllib-jar-with-dependencies.jar com.sandflow.smpte.tools.GenerateXMLSchemaDocuments -cp <CLASS_PATH_TO_REGISTER_MODEL>
-d <PATH_TO_OUTPUT_DIR>

where <CLASS_PATH_TO_REGISTER_MODEL> is equal to com.sandflow.smpte.register.catsup.TypesRegisterModel, etc.
Expand All @@ -103,7 +103,7 @@ Architecture
At the heart of regxmllib is the FragmentBuilder.fragmentFromTriplet() method
that creates an XML fragment from a KLV group given a
a RegXML metadictionary and a collection of KLV groups from which strong
references are resolved. The rules engine implemented in
references are resolved. The rules engine implemented in
FragmentBuilder.fragmentFromTriplet() is intended to follow the rules specified
in ST 2001-1 as closely as possible. A sister method, XMLSchemaBuilder.fromDictionary(),
creates a matching XML Schema that can be used to validate RegXML fragments.
Expand All @@ -119,17 +119,17 @@ Packages
--------

com.sandflow.smpte.klv : Classes for processing SMPTE KLV triplets (ST 336)

com.sandflow.smpte.mxf: Classes for processing SMPTE MXF structures (ST 377-1)

com.sandflow.smpte.register: Classes for processing SMPTE metadata registers
(ST 335, ST 395, ST 400, ST 2003)

com.sandfow.smpte.regxml: Classes for managing RegXML metadictionaries and
creating RegXML representations of MXF structures

com.sandfow.smpte.tools: Application-level tools

com.sandfow.smpte.util: Utilities classes


Expand All @@ -138,13 +138,13 @@ Tools

RegXMLDump: dumps either the first essence descriptor or the entire header
metadata of an MXF file as a RegXML structure

XMLRegistersToDict: converts XML-based SMPTE metadata registers to a RegXML metadictionaries

GenerateXMLSchemaDocuments: generates XSDs for the SMPTE metadata registers

GenerateDictionaryXMLSchema: generate XSDs for RegXML Fragments from the RegXML metadictionaries


Unit Test
---------
Expand All @@ -155,12 +155,12 @@ to reference RegXML fragments located at [3].

[1] src/test/mxf-files
[2] src/test/registers
[3] src/test/regxml-files
[3] src/test/regxml-files

Reference RegXML fragments can regenerated by running the package goal with the build-reference-test-files profile:

mvn package -Pbuild-reference-files


Maven Artifacts
---------------
Expand Down Expand Up @@ -188,7 +188,7 @@ Xerces-C++ Version 3.1.4 (or above) [1]
(recommended) CMake

[1] https://xerces.apache.org/xerces-c/


Architecture
------------
Expand All @@ -214,7 +214,7 @@ to reference RegXML fragments located at [3].

[1] src/test/mxf-files
[2] src/test/regxml-dicts
[3] src/test/regxml-files
[3] src/test/regxml-files


DIRECTORIES AND NOTABLE FILES
Expand All @@ -227,28 +227,28 @@ pom.xml Maven POM file
CMakeLists.txt CMake build file

target Output of the Maven build process, including the JAR

src/java regxmllibj codebase

src/cpp regxmllibc codebase

src/main/config/repoversion.properties
Template Java properties file used to host the
Template Java properties file used to host the
a unique source code version generated using
git by the build system

src/main/resources/reg.xsd
Common XML Schema definitions used when generating
XML Schemas for RegXML Fragments

src/test/resources/regxml-files
Reference RegXML fragment used for unit testing

src/test/resources/registers
Reference SMPTE registers used for unit testing

src/test/resources/mxf-files
Sample MXF files used for unit testing
Sample MXF files used for unit testing

src/test/resources/regxml-dicts
Reference metadictionaries used for unit testing
Reference metadictionaries used for unit testing
39 changes: 32 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>4.0.5</version>
<version>4.0.6</version>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -121,7 +122,7 @@
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<version>3.2.0</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -141,6 +142,30 @@
</plugins>
</build>
</profile>
<profile>
<id>with-dependencies</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<distributionManagement>
Expand All @@ -158,7 +183,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -171,7 +196,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>3.12.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -184,7 +209,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -198,7 +223,7 @@
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<version>0.9.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
Expand Down