Class SecurityEvaluatorAssembler

java.lang.Object
org.apache.jena.assembler.assemblers.AssemblerBase
org.apache.jena.permissions.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:        <http://www.w3.org/2001/XMLSchema#>

 <> ja:loadClass    "org.apache.jena.security.SecuredAssembler" .

 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:
my:secEvaluator
The security evaluator as referenced in the assembler file.
sec:Evaluator
Identifies my:secEvaluator as a SecurityEvaluator
sec:args
Identifies the argument list
rdf:_1
The first argument
rdf:_2
The second argument (an integer in this case
sec:evaluatorClass
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: