Skip to content

Commit 9f7ccbc

Browse files
committed
Refactored dependencies
1 parent b695af4 commit 9f7ccbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+46
-109
lines changed

class-generator/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,23 @@
2626
<version>4.4.0</version>
2727
</dependency>
2828
</dependencies>
29+
30+
<build>
31+
<plugins>
32+
<plugin>
33+
<groupId>org.apache.maven.plugins</groupId>
34+
<artifactId>maven-deploy-plugin</artifactId>
35+
<configuration>
36+
<skip>true</skip>
37+
</configuration>
38+
</plugin>
39+
<plugin>
40+
<groupId>org.apache.maven.plugins</groupId>
41+
<artifactId>maven-jar-plugin</artifactId>
42+
<configuration>
43+
<skip>true</skip>
44+
</configuration>
45+
</plugin>
46+
</plugins>
47+
</build>
2948
</project>

class-generator/src/main/java/com/sandflow/smpte/mxf/ClassGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ public class ClassGenerator {
131131
classTemplate = handlebars.with(EscapingStrategy.HTML_ENTITY).compile("hbs/Class.java");
132132
enumerationTemplate = handlebars.compile("hbs/Enumeration.java");
133133
recordTemplate = handlebars.compile("hbs/Record.java");
134-
classFactoryTemplate = handlebars.compile("hbs/ClassFactoryInitializer.java");
134+
classFactoryTemplate = handlebars.compile("hbs/ClassFactory.java");
135135
fixedArrayTemplate = handlebars.compile("hbs/FixedArray.java");
136136
variableArrayTemplate = handlebars.compile("hbs/VariableArray.java");
137137
labelsTemplate = handlebars.compile("hbs/Labels.java");
138-
localTagsTemplate = handlebars.compile("hbs/StaticLocalTagsInitializer.java");
138+
localTagsTemplate = handlebars.compile("hbs/StaticLocalTags.java");
139139
essenceKeysTemplate = handlebars.compile("hbs/EssenceKeys.java");
140140
} catch (Exception e) {
141141
throw new InternalError("Failed to load class generator templates", e);
@@ -726,10 +726,10 @@ public static void generate(MetaDictionaryCollection mds, LabelsRegister lr, Ess
726726
}
727727

728728
/* generate the class factory */
729-
g.generateSource(classFactoryTemplate, "com.sandflow.smpte.mxf", "ClassFactoryInitializer", g.classList);
729+
g.generateSource(classFactoryTemplate, "com.sandflow.smpte.mxf", "ClassFactory", g.classList);
730730

731731
/* generate the static local tags */
732-
g.generateSource(localTagsTemplate, "com.sandflow.smpte.mxf", "StaticLocalTagsInitializer", propList);
732+
g.generateSource(localTagsTemplate, "com.sandflow.smpte.mxf", "StaticLocalTags", propList);
733733

734734
/* generate labels */
735735
g.generateSource(

class-generator/src/main/resources/hbs/Class.java.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import java.io.IOException;
3434

3535
{{#if ownMembers}}import com.sandflow.smpte.klv.Triplet;
3636
import com.sandflow.smpte.util.AUID;
37-
import com.sandflow.smpte.mxf.SetItemAdapter;{{/if}}
37+
import com.sandflow.smpte.mxf.adapters.SetItemAdapter;{{/if}}
3838
import com.sandflow.smpte.util.UL;
3939
import com.sandflow.smpte.util.UUID;
4040
import com.sandflow.smpte.mxf.ClassFactory;

class-generator/src/main/java/com/sandflow/smpte/mxf/ClassFactory.java renamed to class-generator/src/main/resources/hbs/ClassFactory.java.hbs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@
3232

3333
import java.util.HashMap;
3434

35+
{{#.}}import com.sandflow.smpte.mxf.types.{{getSymbol}};
36+
{{/.}}
3537
import com.sandflow.smpte.mxf.types.IndexTableSegment;
3638
import com.sandflow.smpte.util.UL;
3739

3840
public class ClassFactory {
3941
static protected final HashMap<UL, Class<?>> classMap = new HashMap<>();
4042

4143
static {
42-
try {
43-
Class.forName("com.sandflow.smpte.mxf.ClassFactoryInitializer");
44-
} catch (Exception e) {
45-
throw new InternalError("Could not initialize the MXF class factory", e);
46-
}
44+
{{#.}}
45+
ClassFactory.putClass({{getSymbol}}.getKey(), {{getSymbol}}.class);{{/.}}
4746

4847
ClassFactory.putClass(IndexTableSegment.getKey(), IndexTableSegment.class);
4948
}

class-generator/src/main/resources/hbs/ClassFactoryInitializer.java.hbs

Lines changed: 0 additions & 43 deletions
This file was deleted.

class-generator/src/main/java/com/sandflow/smpte/mxf/StaticLocalTags.java renamed to class-generator/src/main/resources/hbs/StaticLocalTags.java.hbs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ public class StaticLocalTags {
3939
private static final LocalTagRegister reg = new LocalTagRegister();
4040

4141
static {
42-
try {
43-
Class.forName("com.sandflow.smpte.mxf.StaticLocalTagsInitializer");
44-
} catch (Exception e) {
45-
throw new InternalError("Cannot initialize local tag register", e);
46-
}
42+
{{#.}}
43+
StaticLocalTags.add({{getLocalIdentification}}, AUID.fromURN("{{getIdentification}}"));{{/.}}
4744
}
4845

4946
private StaticLocalTags() {

class-generator/src/main/resources/hbs/StaticLocalTagsInitializer.java.hbs

Lines changed: 0 additions & 40 deletions
This file was deleted.

class-generator/src/main/java/com/sandflow/smpte/mxf/MXFInputContext.java renamed to common/src/main/java/com/sandflow/smpte/mxf/MXFInputContext.java

File renamed without changes.

class-generator/src/main/java/com/sandflow/smpte/mxf/MXFOutputContext.java renamed to common/src/main/java/com/sandflow/smpte/mxf/MXFOutputContext.java

File renamed without changes.

class-generator/src/main/java/com/sandflow/smpte/mxf/adapters/ASCIICharacterAdapter.java renamed to common/src/main/java/com/sandflow/smpte/mxf/adapters/ASCIICharacterAdapter.java

File renamed without changes.

0 commit comments

Comments
 (0)