Class SecurityEvaluatorAssembler

All Implemented Interfaces:
Assembler, AssemblerConstants

public class SecurityEvaluatorAssembler extends AssemblerBase implements Assembler, AssemblerConstants
A simple assembler for a SecurityEvaluator

This assembler load the specified class, locates the first constructor that accepts the number of arguments in the assembler file, and calls it passing the arguments. Generally the result of this assembler is passed to a sec:Model construction.

  • The evaluator must have one and only one public constructor that takes the number of arguments specified in the assembler file.
  • The evaluator may have more constructors but they may not have the same number of arguments as specified in the assembler file.
  • The arguments must be specified in the assembler file in the order that they should be passed to the constructor.

Literal arguments are converted to their data type before calling the constructor. For example "13"^^xsd:int will be converted to an Integer with the value of 13.

The assembler file should include the following
 prefix xsd:        <>

 <> ja:loadClass    "" .

 sec:Model rdfs:subClassOf ja:NamedModel .

The model definition should include something like.
 ex:myEvaluator a sec:Evaluator ;
    sec:args [ rdf:_1 "argument 1 for my evaluator constructor" ;
               rdf:_2 "13"^^xsd:int ; ];
    sec:evaluatorClass "evaluatorClassname";
Terms used in above example:
The security evaluator as referenced in the assembler file.
Identifies my:secEvaluator as a SecurityEvaluator
Identifies the argument list
The first argument
The second argument (an integer in this case
The fully qualified name of the SecurityEvaluator class to call. This class must extend SecurityEvaluator, and must have one and only one constructor that takes the number of arguments specified in sec:args
See Also: