com.hp.hpl.jena.eyeball
Class Report

java.lang.Object
  extended by com.hp.hpl.jena.eyeball.Report

public class Report
extends java.lang.Object

A Report is a collection of ReportItems, each of which is an RDF subgraph rooted on a fresh bnode. It also contains a predicate registry, recording the predicates that will be used in the reports and their order of output preference for the text renderer, and a prefix mapping to be used for the report model.

Author:
hedgehog

Field Summary
protected  com.hp.hpl.jena.rdf.model.Model mitems
           
protected  com.hp.hpl.jena.shared.PrefixMapping prefixes
           
protected  PredicateRegister register
           
protected  java.util.Map<com.hp.hpl.jena.rdf.model.Statement,com.hp.hpl.jena.rdf.model.ReifiedStatement> statementMap
           
 
Constructor Summary
Report()
          Initialise this Report with an empty configuration.
 
Method Summary
 ReportItem createItem()
          Answer a new ReportItem for this Report.
 ReportItem createItem(com.hp.hpl.jena.rdf.model.Statement s)
          Answer a new ReportItem for this Report, associated with a statement s from the model under inspection.
protected  com.hp.hpl.jena.rdf.model.ReifiedStatement createReifiedStatement(com.hp.hpl.jena.rdf.model.Statement s)
           
 Report declareOrder(com.hp.hpl.jena.rdf.model.Property p1, com.hp.hpl.jena.rdf.model.Property p2)
          Declare that both p1 and p2 are properties used as report properties.
 Report declareProperty(com.hp.hpl.jena.rdf.model.Property p)
          Declare that the property p is a property used as a report property.
 PredicateRegister getPredicateRegister()
          Answer the predicate registry associated with this Report.
 com.hp.hpl.jena.rdf.model.Literal integer(int n)
          Answer a Literal object from the report model, representing the integer value n as an XSDDatatype.XSDinteger.
 com.hp.hpl.jena.rdf.model.Model model()
          Answer a model containing all the report items from this report.
 Report setMitems(com.hp.hpl.jena.rdf.model.Model mitems)
           
 void setPrefixes(com.hp.hpl.jena.shared.PrefixMapping pm)
          Add the prefixes pm to this Report's prefix mapping.
 boolean valid()
          Answer true iff there are no report items in this report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mitems

protected com.hp.hpl.jena.rdf.model.Model mitems

prefixes

protected final com.hp.hpl.jena.shared.PrefixMapping prefixes

register

protected final PredicateRegister register

statementMap

protected final java.util.Map<com.hp.hpl.jena.rdf.model.Statement,com.hp.hpl.jena.rdf.model.ReifiedStatement> statementMap
Constructor Detail

Report

public Report()
Initialise this Report with an empty configuration.

Method Detail

setMitems

public Report setMitems(com.hp.hpl.jena.rdf.model.Model mitems)

valid

public boolean valid()
Answer true iff there are no report items in this report.


model

public com.hp.hpl.jena.rdf.model.Model model()
Answer a model containing all the report items from this report. The model will have the prefix mappings that have been set using setPrefixes, with additional mappings from PrefixMapping.Extended and a binding of eye to the Eyeball URI.


setPrefixes

public void setPrefixes(com.hp.hpl.jena.shared.PrefixMapping pm)
Add the prefixes pm to this Report's prefix mapping. Only prefixes not already in the map are added (ie, this uses PrefixMapping::withDefaultMappings.


createItem

public ReportItem createItem()
Answer a new ReportItem for this Report. The ReportItem will then have report properties and values added to it. The item is not associated with any particular statement of the model.


createItem

public ReportItem createItem(com.hp.hpl.jena.rdf.model.Statement s)
Answer a new ReportItem for this Report, associated with a statement s from the model under inspection. (The statement is stored as a reified statement in the Report model.)


integer

public com.hp.hpl.jena.rdf.model.Literal integer(int n)
Answer a Literal object from the report model, representing the integer value n as an XSDDatatype.XSDinteger.


createReifiedStatement

protected com.hp.hpl.jena.rdf.model.ReifiedStatement createReifiedStatement(com.hp.hpl.jena.rdf.model.Statement s)

getPredicateRegister

public PredicateRegister getPredicateRegister()
Answer the predicate registry associated with this Report.


declareProperty

public Report declareProperty(com.hp.hpl.jena.rdf.model.Property p)
Declare that the property p is a property used as a report property. Only declared properties will be displayed by the text renderer. Answer this Report object.


declareOrder

public Report declareOrder(com.hp.hpl.jena.rdf.model.Property p1,
                           com.hp.hpl.jena.rdf.model.Property p2)
Declare that both p1 and p2 are properties used as report properties. Further, if possible, the text renderer should display p1 before p2. Answer this Report object.