Class SecuredAssembler

  • All Implemented Interfaces:
    Assembler, AssemblerConstants

    public class SecuredAssembler
    extends ModelAssembler
    implements AssemblerConstants
    Assembler for a secured model.

    The assembler file should include the following

     <> ja:loadClass    "org.apache.jena.permission.SecuredAssembler" .
    
     sec:Model rdfs:subClassOf ja:NamedModel .
    
     sec:evaluator rdfs:domain sec:Model ;
                   rdfs:range sec:Evaluator .
     
    The model definition should include something like.
     my:secModel a sec:Model ;
        sec:baseModel my:baseModel ;
        ja:modelName "http://example.com/securedModel" ;
        sec:evaluatorFactory "org.apache.jena.permission.MockSecurityEvaluator" ;
        .
     
    Terms used in above example:
    my:secModel
    The secured model as referenced in the assembler file.
    sec:Model
    Identifes my:secModel as a secured model
    sec:baseModel
    Identifies my:baseModel as the base model we are applying permissions to
    my:baseModel
    a ja:Model (or subclass) defined elsewhere in the assembler file
    ja:modelName
    The name of the graph as it will be addressed in the permission environment (see ja:NamedModel examples from Jena)
    sec:evaluatorFactory
    Identifies "org.apache.jena.permission.MockSecurityEvaluator" as the java class that implements an Evaluator Factory. The Factory must have static method getInstance() that returns a SecurityEvaluator.
    or if using an evaluator assembler
     my:secModel a sec:Model ;
        sec:baseModel my:baseModel ;
        ja:modelName "http://example.com/securedModel" ;
        sec:evaluatorImpl ex:myEvaluator;
        .
    
     ex:myEvaluator a sec:Evaluator ;
        ex:arg1 "argument 1 for my evaluator constructor" ;
        ex:arg2 "argument 2 for my evaluator constructor" ;
        .
    
     
    Terms used in above example:
    my:secModel
    The secured model as referenced in the assembler file.
    sec:Model
    Identifes my:secModel as a secured model
    sec:baseModel
    Identifies my:baseModel as the base model we are applying permissions to
    my:baseModel
    a ja:Model (or subclass) defined elsewhere in the assembler file
    ja:modelName
    The name of the graph as it will be addressed in the permission environment (see ja:NamedModel examples from Jena)
    sec:evaluatorImpl
    Identifies ex:myEvaluator as a SecurityEvaluator defined elsewhere in the assembler file. It must subclass as a sec:Evaluator.
    ex:arg1 and ex:arg2
    Arguments as defined by the user defined security evaluator assembler.

    • Constructor Detail

      • SecuredAssembler

        public SecuredAssembler()
    • Method Detail

      • init

        public static void init()
        Initialize the assembler. Registers the prefix "sec" with the uri http://apache.org/jena/permission/Assembler# and registers this assembler with the uri http://apache.org/jena/permission/Assembler#Model