Class RDFServiceImpl

    • Field Detail

      • defaultWriteGraphURI

        protected String defaultWriteGraphURI
      • registeredJenaListeners

        protected List<org.apache.jena.rdf.model.ModelChangedListener> registeredJenaListeners
      • graphURIs

        protected final List<String> graphURIs
      • rebuildGraphURICache

        protected volatile boolean rebuildGraphURICache
      • isRebuildGraphURICacheRunning

        protected volatile boolean isRebuildGraphURICacheRunning
    • Constructor Detail

      • RDFServiceImpl

        public RDFServiceImpl()
    • Method Detail

      • newIndividual

        public void newIndividual​(String individualURI,
                                  String individualTypeURI)
                           throws RDFServiceException
        Description copied from interface: RDFService
        If the given individual already exists in the default write graph, throws an RDFServiceException, otherwise adds one type assertion to the default write graph.
        Specified by:
        newIndividual in interface RDFService
        Parameters:
        individualURI - - URI of the individual to be added
        individualTypeURI - - URI of the type for the individual
        Throws:
        RDFServiceException
      • newIndividual

        public void newIndividual​(String individualURI,
                                  String individualTypeURI,
                                  String graphURI)
                           throws RDFServiceException
        Description copied from interface: RDFService
        If the given individual already exists in the given graph, throws an RDFServiceException, otherwise adds one type assertion to the given graph.
        Specified by:
        newIndividual in interface RDFService
        Parameters:
        individualURI - - URI of the individual to be added
        individualTypeURI - - URI of the type for the individual
        graphURI - - URI of the graph to which to add the individual
        Throws:
        RDFServiceException
      • rebuildGraphUris

        protected abstract void rebuildGraphUris()
      • registerJenaModelChangedListener

        public void registerJenaModelChangedListener​(org.apache.jena.rdf.model.ModelChangedListener changeListener)
                                              throws RDFServiceException
        Description copied from interface: RDFService
        Registers a Jena listener to listen to changes in any graph in the RDF store.
        Specified by:
        registerJenaModelChangedListener in interface RDFService
        Parameters:
        changeListener - - the change listener
        Throws:
        RDFServiceException
      • unregisterJenaModelChangedListener

        public void unregisterJenaModelChangedListener​(org.apache.jena.rdf.model.ModelChangedListener changeListener)
                                                throws RDFServiceException
        Description copied from interface: RDFService
        Unregisters a Jena listener from listening to changes in any graph in the RDF store
        Specified by:
        unregisterJenaModelChangedListener in interface RDFService
        Parameters:
        changeListener - - the change listener
        Throws:
        RDFServiceException
      • getRegisteredJenaModelChangedListeners

        public List<org.apache.jena.rdf.model.ModelChangedListener> getRegisteredJenaModelChangedListeners()
      • notifyListenersOfEvent

        public void notifyListenersOfEvent​(Object event)
      • sparqlTriple

        protected static String sparqlTriple​(org.apache.jena.graph.Triple triple)
      • sparqlNodeUpdate

        protected static String sparqlNodeUpdate​(org.apache.jena.graph.Node node,
                                                 String varName)
      • sparqlNode

        protected static String sparqlNode​(org.apache.jena.graph.Node node,
                                           String varName)
      • separateStatementsWithBlankNodes

        protected org.apache.jena.rdf.model.Model[] separateStatementsWithBlankNodes​(org.apache.jena.rdf.model.Model gm)
        Returns a pair of models. The first contains any statement containing at least one blank node. The second contains all remaining statements.
        Parameters:
        gm - Jena model
      • getTriples

        public org.apache.jena.rdf.model.Model getTriples​(org.apache.jena.rdf.model.RDFNode subject,
                                                          org.apache.jena.rdf.model.RDFNode predicate,
                                                          org.apache.jena.rdf.model.RDFNode object,
                                                          long limit,
                                                          long offset)
                                                   throws RDFServiceException
        Specified by:
        getTriples in interface RDFService
        Throws:
        RDFServiceException
      • setVitroRequest

        public void setVitroRequest​(VitroRequest vitroRequest)
        Description copied from interface: RDFService
        UQAM-Bug-Correction Useful among other things to transport the linguistic context in the service
        Specified by:
        setVitroRequest in interface RDFService
      • updateGraphURIs

        protected void updateGraphURIs​(Set<String> newURIs)