Commit 7d8fb4706f06f9cd77eddc69ec38660337d8d912

Authored by Josh Klontz
1 parent 503aab0b

remove filterdupmetadata

openbr/plugins/metadata/filterdupemetadata.cpp deleted
1   -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2   - * Copyright 2012 The MITRE Corporation *
3   - * *
4   - * Licensed under the Apache License, Version 2.0 (the "License"); *
5   - * you may not use this file except in compliance with the License. *
6   - * You may obtain a copy of the License at *
7   - * *
8   - * http://www.apache.org/licenses/LICENSE-2.0 *
9   - * *
10   - * Unless required by applicable law or agreed to in writing, software *
11   - * distributed under the License is distributed on an "AS IS" BASIS, *
12   - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13   - * See the License for the specific language governing permissions and *
14   - * limitations under the License. *
15   - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16   -
17   -#include <openbr/plugins/openbr_internal.h>
18   -
19   -namespace br
20   -{
21   -
22   -/*!
23   - * \ingroup transforms
24   - * \brief Removes duplicate Templates based on a unique metadata key
25   - * \author Austin Blanton \cite imaus10
26   - */
27   -class FilterDupeMetadataTransform : public TimeVaryingTransform
28   -{
29   - Q_OBJECT
30   -
31   - Q_PROPERTY(QString key READ get_key WRITE set_key RESET reset_key STORED false)
32   - BR_PROPERTY(QString, key, "TemplateID")
33   -
34   - QSet<QString> excluded;
35   -
36   - void projectUpdate(const TemplateList &src, TemplateList &dst)
37   - {
38   - foreach (const Template &t, src) {
39   - QString id = t.file.get<QString>(key);
40   - if (!excluded.contains(id)) {
41   - dst.append(t);
42   - excluded.insert(id);
43   - }
44   - }
45   - }
46   -
47   -public:
48   - FilterDupeMetadataTransform() : TimeVaryingTransform(false,false) {}
49   -};
50   -
51   -BR_REGISTER(Transform, FilterDupeMetadataTransform)
52   -
53   -} // namespace br
54   -
55   -#include "metadata/filterdupemetadata.moc"