# HG changeset patch # User Sebastien Jodogne # Date 1714748802 -7200 # Node ID 0f5586c498d19d7d6dc67eedd414fa6c275e019f # Parent fc3914c07dd38d5b891689b50f699c193af9f17a removed FindRequest::FilterConstraint as it was mostly redundant with DicomTagConstraint diff -r fc3914c07dd3 -r 0f5586c498d1 OrthancServer/Sources/Database/FindRequest.h --- a/OrthancServer/Sources/Database/FindRequest.h Fri May 03 17:02:02 2024 +0200 +++ b/OrthancServer/Sources/Database/FindRequest.h Fri May 03 17:06:42 2024 +0200 @@ -157,183 +157,12 @@ } }; - // TODO-FIND: this class hierarchy actually adds complexity and is very redundant with DicomTagConstraint. - // e.g, in this class hierarchy, it is difficult to implement an equivalent to DicomTagConstraint::ConvertToDatabaseConstraint - // I have the feeling we can just have a MetadataConstraint in the same way as DicomTagConstraint - // and both convert to a DatabaseConstraint in StatelessDatabaseOperations - // class FilterConstraint : public boost::noncopyable - // { - // Key key_; - - // protected: - // FilterConstraint(const Key& key) : - // key_(key) - // { - // } - - // public: - // virtual ~FilterConstraint() - // { - // } - - // const Key& GetKey() const - // { - // return key_; - // } - - // virtual ConstraintType GetType() const = 0; - // virtual bool IsCaseSensitive() const = 0; // Needed for PN VR - - - // }; - - - // class MandatoryConstraint : public FilterConstraint - // { - // public: - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Mandatory; - // } - // }; - - - // class StringConstraint : public FilterConstraint - // { - // private: - // bool caseSensitive_; - - // public: - // StringConstraint(Key key, - // bool caseSensitive) : - // FilterConstraint(key), - // caseSensitive_(caseSensitive) - // { - // } - - // bool IsCaseSensitive() const - // { - // return caseSensitive_; - // } - // }; - - - // class EqualityConstraint : public StringConstraint - // { - // private: - // std::string value_; - - // public: - // explicit EqualityConstraint(Key key, - // bool caseSensitive, - // const std::string& value) : - // StringConstraint(key, caseSensitive), - // value_(value) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Equality; - // } - - // const std::string& GetValue() const - // { - // return value_; - // } - // }; - - - // class RangeConstraint : public StringConstraint - // { - // private: - // std::string start_; - // std::string end_; // Inclusive - - // public: - // RangeConstraint(Key key, - // bool caseSensitive, - // const std::string& start, - // const std::string& end) : - // StringConstraint(key, caseSensitive), - // start_(start), - // end_(end) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Range; - // } - - // const std::string& GetStart() const - // { - // return start_; - // } - - // const std::string& GetEnd() const - // { - // return end_; - // } - // }; - - - // class WildcardConstraint : public StringConstraint - // { - // private: - // std::string value_; - - // public: - // explicit WildcardConstraint(Key& key, - // bool caseSensitive, - // const std::string& value) : - // StringConstraint(key, caseSensitive), - // value_(value) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Wildcard; - // } - - // const std::string& GetValue() const - // { - // return value_; - // } - // }; - - - // class ListConstraint : public StringConstraint - // { - // private: - // std::set values_; - - // public: - // ListConstraint(Key key, - // bool caseSensitive) : - // StringConstraint(key, caseSensitive) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_List; - // } - - // const std::set& GetValues() const - // { - // return values_; - // } - // }; - private: // filter & ordering fields ResourceType level_; // The level of the response (the filtering on tags, labels and metadata also happens at this level) OrthancIdentifiers orthancIdentifiers_; // The response must belong to this Orthanc resources hierarchy - // std::deque filterConstraints_; // All tags and metadata filters (note: the order is not important) std::vector dicomTagConstraints_; // All tags filters (note: the order is not important) std::deque /* TODO-FIND */ metadataConstraints_; // All metadata filters (note: the order is not important) bool hasLimits_; diff -r fc3914c07dd3 -r 0f5586c498d1 OrthancServer/Sources/Database/FindResponse.h --- a/OrthancServer/Sources/Database/FindResponse.h Fri May 03 17:02:02 2024 +0200 +++ b/OrthancServer/Sources/Database/FindResponse.h Fri May 03 17:06:42 2024 +0200 @@ -109,11 +109,6 @@ { } - ResourceType GetLevel() const - { - return level_; - } - const std::string& GetIdentifier() const { return identifier_;