public class DumpParameterListExample extends Object
The following is an example based on this demonstration class file. The class main() requires a command line argument to point to the database file instead of the "myfile.xml" used in the example code below.
try {
XTCEDatabase db = new XTCEDatabase( new File( "myfile.xml" ),
false, // skip XSD validation
true, // apply the XIncludes
true ); // ReadOnly
List<XTCEParameter> parameters = db.getTelemetryParameters();
for ( XTCEParameter parameter : parameters ) {
List<XTCEAlias> aliases = parameter.getAliasSet();
StringBuilder builder = new StringBuilder();
for ( XTCEAlias alias : aliases ) {
builder.append( alias.getFullAliasName() );
builder.append( " " );
}
System.out.println( parameter.getName() +
" " +
builder.toString() );
}
} catch ( Exception ex ) {
System.out.println( "Exception: " + ex.getLocalizedMessage() );
ex.printStackTrace();
}
| Constructor and Description |
|---|
DumpParameterListExample() |
public static void main(String[] args)
args - the command line arguments. One argument is expected,
which is the name of an XTCE database file to load.Copyright © 2015–2019. All rights reserved.