Github user afs commented on the issue:

    https://github.com/apache/jena/pull/274
  
    This adds `NamedGraph` - a graph wrapper that carries around a graph name.
    
    The problem is now that graphs in a general dataset only have an associated 
name by virtue of the slot in the map they occupy, unlike ones from a quad 
dataset where the graph is a `GrahView`, a restriction of the "G" slot of the 
quad to a specific name.
    
    The updated test case on 
[JENA-1381](https://issues.apache.org/jira/browse/JENA-1381) shows this - it 
tests three kinds of dataset in memory.
    
    | Dataset factory | Implementation | Characteristics | Status (before PR) |
    | --------------- | -------------- | --------- | ---- |
    | `create()`               | `DatasetGraphMap` | Copy-in on add graph | No 
graph index |
    | `createGeneral()`  | `DatasetGraphMapLink` | Link to added graphs | No 
graph index |
    | TIM | Quads |   `getGraph` returns a `GraphView` | OK |
    | TDB | Quads |   `getGraph` returns a `GraphView` | OK |
    
    **`create()`** : `DatasetGraphMap` can change to use a  `NamedGraph` by 
changing the `GraphMaker` interface to take a name and then using 
`NamedGraphWrapper` aroudn an in-memeory graph.
    
    **`createGeneral()`** : `DatasetGraphMapLink` can either change to return a 
`NamedGraph` which mean 
    the graph returned by `getGraph` is not the graph added, or can remain not 
supporting test query graph. The general dataset is already less aligned with 
the other implementations and can be considered "special purposes only" - 
usually complex mixtures of graph types or inference graphs.
    
    The javadoc for `DatasetFactory` is supposed to discourage use of the 
linking `createGeneral`.
    
    The recent commits provide this and update the javadoc in `DatasetFactory`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to