ControlTier > controltier-core
 

query

Command Reference

Description

Query the model

Queries the model for objects matching the selected criteria. Query results can be presented in several output formats.

This command is a simple wrapper around the: GetQuery Task. For information about the query language see: EntityQuery Type Reference

static: This command can be run outside of an object context.

Usage

ctl -m modelutil -c query -depot <> -file <> [-format <properties>] [-output <>]

Options

Option Description Type Default
depot project depot name string ${context.depot}
file file containing query restrictions string
format output format. properties,xml,maprefuri
  • properties: entity.properties format
  • xml: viewdoc xml format. TODO: create an xsl template to generate project.xml
  • maprefuri: comma separated list of maprefuris
string properties
output Output file string

Examples

Execute a query stored in a file

ctl -p demo -t modelutil -c query -- -file /tmp/q.xml

File listing: /tmp/q.xml

		  <query>
		    <!-- match resources named "simpleTomcat" -->
		    <textrestriction name="label" value="simpleTomcat"/>
		  </query>