From 1b69ad3ad60ec0302f2c5e8aed249f9d05447eb5 Mon Sep 17 00:00:00 2001 From: Brian Rosenberg Date: Fri, 25 Aug 2023 13:44:31 -0400 Subject: [PATCH 1/2] Get rid of GetDetectionType --- .../mpf/examples/audiovideo/AudioVideoComponent.java | 4 ---- .../org/mitre/mpf/examples/hello/HelloWorldComponent.java | 4 ---- .../api/detection/MPFDetectionComponentInterface.java | 7 ------- .../MPFAudioAndVideoDetectionComponentAdapter.java | 2 -- .../MPFAudioAndVideoDetectionComponentAdapterTest.java | 8 +------- 5 files changed, 1 insertion(+), 24 deletions(-) diff --git a/detection/examples/AudioVideoComponent/src/main/java/org/mitre/mpf/examples/audiovideo/AudioVideoComponent.java b/detection/examples/AudioVideoComponent/src/main/java/org/mitre/mpf/examples/audiovideo/AudioVideoComponent.java index d4c955c..75be495 100755 --- a/detection/examples/AudioVideoComponent/src/main/java/org/mitre/mpf/examples/audiovideo/AudioVideoComponent.java +++ b/detection/examples/AudioVideoComponent/src/main/java/org/mitre/mpf/examples/audiovideo/AudioVideoComponent.java @@ -94,8 +94,4 @@ public List getDetections(MPFAudioJob mpfAudioJob) throws MPFComp return tracks; } - - public String getDetectionType() { - return "AUDIOVIDEO"; - } } diff --git a/detection/examples/HelloWorldComponent/src/main/java/org/mitre/mpf/examples/hello/HelloWorldComponent.java b/detection/examples/HelloWorldComponent/src/main/java/org/mitre/mpf/examples/hello/HelloWorldComponent.java index e45423f..023615e 100755 --- a/detection/examples/HelloWorldComponent/src/main/java/org/mitre/mpf/examples/hello/HelloWorldComponent.java +++ b/detection/examples/HelloWorldComponent/src/main/java/org/mitre/mpf/examples/hello/HelloWorldComponent.java @@ -282,8 +282,4 @@ public boolean supports(MPFDataType mpfDataType) { } return false; } - - public String getDetectionType() { - return "HELLO"; - } } diff --git a/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/MPFDetectionComponentInterface.java b/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/MPFDetectionComponentInterface.java index e6a976e..6bfdc89 100644 --- a/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/MPFDetectionComponentInterface.java +++ b/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/MPFDetectionComponentInterface.java @@ -89,11 +89,4 @@ public interface MPFDetectionComponentInterface extends MPFComponentInterface { * @return True if the data type is supported by this component. */ boolean supports(MPFDataType dataType); - - /** - * Gets the detection type for the component. - * - * @return The detection type. - */ - String getDetectionType(); } diff --git a/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapter.java b/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapter.java index 9248b4c..d5d9b81 100644 --- a/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapter.java +++ b/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapter.java @@ -141,6 +141,4 @@ public List getDetections(MPFGenericJob job) throws MPFComponen public boolean supports(MPFDataType dataType) { return (MPFDataType.AUDIO == dataType) || (MPFDataType.VIDEO == dataType); } - - public abstract String getDetectionType(); } diff --git a/detection/java-component-api/src/test/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapterTest.java b/detection/java-component-api/src/test/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapterTest.java index 8997095..6ccf0c2 100644 --- a/detection/java-component-api/src/test/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapterTest.java +++ b/detection/java-component-api/src/test/java/org/mitre/mpf/component/api/detection/adapters/MPFAudioAndVideoDetectionComponentAdapterTest.java @@ -93,12 +93,6 @@ public List getDetections(MPFAudioJob job) throws MPFComponentDet } return tracks; } - - @Override - public String getDetectionType() { - return "TEST"; - } - } -} \ No newline at end of file +} From 645f8a4479ddfc70209ed512c9bb4f2900d1f65a Mon Sep 17 00:00:00 2001 From: Brian Rosenberg Date: Tue, 5 Sep 2023 08:37:48 -0400 Subject: [PATCH 2/2] Add trackType to examples --- .../AudioVideoComponent/plugin-files/descriptor/descriptor.json | 1 + .../HelloWorldComponent/plugin-files/descriptor/descriptor.json | 1 + 2 files changed, 2 insertions(+) diff --git a/detection/examples/AudioVideoComponent/plugin-files/descriptor/descriptor.json b/detection/examples/AudioVideoComponent/plugin-files/descriptor/descriptor.json index 3f83d7c..908c35e 100755 --- a/detection/examples/AudioVideoComponent/plugin-files/descriptor/descriptor.json +++ b/detection/examples/AudioVideoComponent/plugin-files/descriptor/descriptor.json @@ -9,6 +9,7 @@ "name": "JavaAudioVideo", "description": "An example detection component for audio processing of audio and video media.", "actionType": "DETECTION", + "trackType": "AUDIOVIDEO", "outputChangedCounter" : 1, "requiresCollection": { "states": [] diff --git a/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json b/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json index 0d6da94..2988686 100755 --- a/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json +++ b/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json @@ -9,6 +9,7 @@ "name": "JavaHelloWorld", "description": "A simple example detection component.", "actionType": "DETECTION", + "trackType": "HELLO", "outputChangedCounter" : 1, "requiresCollection": { "states": []