Class SecuredAssembler

java.lang.Object
org.apache.jena.assembler.assemblers.AssemblerBase
org.apache.jena.assembler.assemblers.ModelAssembler
org.apache.jena.permissions.SecuredAssembler
All Implemented Interfaces:
org.apache.jena.assembler.Assembler, AssemblerConstants

public class SecuredAssembler extends org.apache.jena.assembler.assemblers.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
Identifies 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.
  • Field Summary

    Fields inherited from interface org.apache.jena.assembler.Assembler

    content, defaultModel, documentManager, general, infModel, memoryModel, ontModel, ontModelSpec, prefixMapping, reasonerFactory, ruleSet, unionModel
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Initialize the assembler.
    org.apache.jena.rdf.model.Model
    open(org.apache.jena.assembler.Assembler a, org.apache.jena.rdf.model.Resource root, org.apache.jena.assembler.Mode mode)
     

    Methods inherited from class org.apache.jena.assembler.assemblers.ModelAssembler

    openModel

    Methods inherited from class org.apache.jena.assembler.assemblers.AssemblerBase

    getOptionalClassName, getRequiredResource, open, open, openModel

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.jena.assembler.Assembler

    open, open, openModel
  • Constructor Details

    • SecuredAssembler

      public SecuredAssembler()
  • Method Details

    • 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
    • open

      public org.apache.jena.rdf.model.Model open(org.apache.jena.assembler.Assembler a, org.apache.jena.rdf.model.Resource root, org.apache.jena.assembler.Mode mode)
      Specified by:
      open in interface org.apache.jena.assembler.Assembler
      Overrides:
      open in class org.apache.jena.assembler.assemblers.ModelAssembler