filter¶
Filter that removes all but specified instances in the collection.
DLiteFilterConfig
¶
Bases: FilterConfig
DLite generate strategy config.
Source code in oteapi_dlite/strategies/filter.py
79 80 81 82 83 84 85 | |
configuration
instance-attribute
¶
DLiteFilterStrategy
¶
Filter that removes all but specified instances in the collection.
The query configuration should be a regular expression matching labels
to keep in the collection. All other labels will be removed.
Registers strategies:
("filterType", "application/vnd.dlite-filter")
Source code in oteapi_dlite/strategies/filter.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
filter_config
instance-attribute
¶
get()
¶
Execute the strategy.
Source code in oteapi_dlite/strategies/filter.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
initialize()
¶
Initialize.
Source code in oteapi_dlite/strategies/filter.py
103 104 105 106 107 108 109 | |
DLiteQueryConfig
¶
Bases: DLiteResult
Configuration for the DLite filter strategy.
First the remove_label and remove_datamodel configurations are
used to mark matching instances for removal. If neither
remove_label or remove_datamodel are given, all instances are
marked for removal.
Then instances matching keep_label and keep_datamodel are unmarked
for removal.
If keep_referred is true, any instance that is referred to by
an instance not marked for removal is also unmarked for removal.
Finally, the instances that are still marked for removal are removed from the collection.
Source code in oteapi_dlite/strategies/filter.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |