|
|
(9 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
− | bundle: org.eclipse.eilf.datamodel.tools
| + | #REDIRECT [[SMILA/Documentation/Data_Model_and_Serialization_Formats#Record Filters]] |
− | class: org.eclipse.eilf.datamodel.tools.record.filter.RecordFilterHelper
| + | |
− | used in: org.eclipse.eilf.blackboard
| + | |
− | | + | |
− | Ordinary, Record contains many attributes and annotations but only a few of them are used. To increase productivity, decrease information sent (by SCA) or stored in JMS queue its better to strip unused data. Record filter is a tool that allows to create a copy of Record with only filtered Attributes and Annotations. Filtering rules should be described as XML.
| + | |
− | | + | |
− | Utility class: org.eclipse.eilf.datamodel.tools.record.filter.RecordFilterHelper)
| + | |
− | Configuration schema: org.eclipse.eilf.datamodel.tools/schemas/RecordFilters.xsd
| + | |
− | | + | |
− | One Record Filter instance is preloaded by Blackboard service (org.eclipse.eilf.blackboard). Its possible to get filtered Record from Blackboard.
| + | |
− | | + | |
− | == Configuration ==
| + | |
− | | + | |
− | By default, Blackboard uses record filter configuration file RecordFilters.xml
| + | |
− | | + | |
− | Schema: RecordFilters.xsd (see in schemas/ directory of bundle)
| + | |
− | | + | |
− | There are series of filters (tag Filter)
| + | |
− | Record filter will search first appropriate Filter by name specified. If there is no filter found, RecordFilterNotFoundException will be thrown. Attribute/Annotation will be copied if correspondent, by name, Attribute/Annotation tag will be found in Filter. Attribute "keepAnnotations" is a flag to copy internal attribute annotations.
| + | |
− | | + | |
− | == Example ==
| + | |
− | | + | |
− | <source lang="xml">
| + | |
− | <RecordFilters>
| + | |
− | <Filter name="only-attributes">
| + | |
− | <Attribute name="*"/>
| + | |
− | </Filter>
| + | |
− | <Filter name="no-filter">
| + | |
− | <Attribute name="*" keepAnnotations="true"/>
| + | |
− | <Annotation name="*"/>
| + | |
− | </Filter>
| + | |
− | <Filter name="nothing"/>
| + | |
− | <Filter name="only-attribute1">
| + | |
− | <Attribute name="attribute1"/>
| + | |
− | </Filter>
| + | |
− | <Filter name="filter-single-and-datetime">
| + | |
− | <Attribute name="single value"/>
| + | |
− | <Attribute name="datetime value"/>
| + | |
− | </Filter>
| + | |
− | </RecordFilters>
| + | |
− | </source>
| + | |
− | | + | |
− | [[Category:SMILA]]
| + | |