Feature QUERY

Description and Priority

The system should allow the user to query the repository of defects and gather information on them. It should present this information to the user as the user requests by showing desired "leaves" of the defects.

Stimulus/Response Sequences

QUERY.UC.LIST-MATCHES

Description

The user queries the database by using the command yaktrack query issue-template match-expression; the system scans the submitted issues under the given template and returns feedback according to the match-expression. Match expressions will be in the format of a subset of XPath or XQL.

Requires

An installed database with read access

Ensures

A resultant list of matching ids and feedback

Normal Course

Table 4-2. Normal Course of Action

Actor ActionsSystem Actions
Types yaktrack query issue-template match-expressionChecks for existence of a parent repository
 Checks for existence of an appropriate issues/[template] subdirectory in the repository
 Creates a pattern object for the given match pattern
 Parses each file in the issues/[template] subdirectory as an XML file with the given template
 For each match, prints the desired results.

Functional Requirements

QUERY.FR1. The system should have a command named query which provides for querying the repository

QUERY.FR2. The system should support match-expressions of the form node-name

QUERY.FR3. The system should support nested match-expressions of the form node-name/child-name

QUERY.FR4. The system should support match-expressions of the form /, denoting the root element -- currently deprecated

QUERY.FR5. The system should support match-expressions of the form node-name/*/grandchild-name, denoting grandchildren with grandparents of node-name -- currently deprecated

QUERY.FR6. The system should support match-expressions of the form node-name[@attribute-name], denoting nodes with the given name and containing a given attribute

QUERY.FR7. The system should support match-expressions of the form node-name[@attribute-name="value"], denoting nodes with the given name and containing a given attribute with the given value

QUERY.FR8. The system should gather feedback on matching expressions, displaying them in the format provided.

QUERY.FR9. The system should support match-expressions of the form node-name[child-name="value"], denoting nodes with children of the requested type containing the text "value"; the match is made using regular expressions.

QUERY.FR10. The system should support match-expressions of the form node-name[child_name], denoting nodes containing children of the requested type