Skip to content

ENH: Expanding Attribute Resource's Query Functionality

Attribute Resource's queryOperation now uses a Pegtl-based approach which now provides the following benefits:

  • In addition to querying on Attribute Type, you can now also query based on Property and Property Value
  • Type Query can now include Regular Expressions.

Here are some example queries:

  • attribute[type = 'baseSupplyDef'] - shows you can now have arbitrary spaces
  • attribute[type='baseSupplyDef', long {'alpha'}] - shows combining type and property type constraints
  • attribute[type='baseSupplyDef', long {'alpha' = 4}] - shows combining type and property value constraints
  • attribute[type= /base.*/] - showing the use of a Regular Expression for attribute type

Note that this expanded syntax can now be used in specifying a Reference Item Definition's Accept and Reject rules.

See smtk/attribute/testing/cxx/unitAssociationTest.cxx for a complete example.

Merge request reports