Comments (5)
Thanks for your advice!
I added the Copyable<> interface in org.apache.jena.atlas.lib. That seemed to be the appropriate location since e.g. the Closeble interface is also located there.
G#copy is also available.
from jena.
I implemented the feature in a separate clean branch .
Any comments are welcome.
from jena.
Could someone take a look at this improvement?
Unfortunately, I don't see a way to implement really fast cloning of graphs as a lightweight sidecar or in a separate module or project.
I have extended the underlying collections and then implemented the function within the graphs.
If I want to use fast cloning today, I need to maintain duplicates of the source code of the collections and the graphs in my project.
--> Do you see the extension as beneficial for the Jena project?
--> Otherwise, I would also be happy if someone had an idea for a less invasive implementation.
from jena.
Could someone take a look at this improvement?
Unfortunately, I don't see a way to implement really fast cloning of graphs as a lightweight sidecar or in a separate module or project. I have extended the underlying collections and then implemented the function within the graphs.
Tbh the branch doesn't look that heavyweight to me.
What I might consider is generalising your approach by adding a new interface Copyable<T>
which provides a single T copy()
method and having all relevant interfaces/classes extend/implement as appropriate.
You could then consider adding a new utility method Graph G.copy(Graph original)
that could check whether the provided instance implements the new interface, and if so defers to the copy()
method, otherwise does G.copyGraphSrcToDst(original, GraphFactory.createGraphMem())
If I want to use fast cloning today, I need to maintain duplicates of the source code of the collections and the graphs in my project. --> Do you see the extension as beneficial for the Jena project? --> Otherwise, I would also be happy if someone had an idea for a less invasive implementation.
Yes there's definitely value here
Generalising it and making it opt-in may make it less invasive and allow us to adopt it over time in other places as appropriate.
from jena.
For reference - G.copyGraphSrcToDst()
- which is basically equivalent to your copy in your description
from jena.
Related Issues (20)
- Remove commons-cli dependency from jena-core
- Update various @Deprecation to include "forRemoval"
- The CORS filter has references to Jetty code.
- Make jena-fuseki-core independent of Eclipse Jetty
- Lookup script name "javascript"
- Fuseki WAR file fails to start HOT 1
- vite-plugin-istanbul 6.0.1+ not compatible with Fuseki UI build. HOT 1
- moving/renaming `:jena-ontapi` vocabularies.
- [Fuseki] Reloadable configuration files HOT 5
- `mvn clean install` fails HOT 8
- RDFXML: can't parse rdf:XMLLiteral HOT 17
- Spread out the days dependabot PRs are generated
- OntModel enhancements HOT 3
- Fuseki query endpoint stopped working on jena-fuseki-main upgrade HOT 6
- jena-benchmark-jmh module defunct HOT 10
- Remove <dependencyPath> from POMs where it is unnecessary
- Clean warnings in jena-ontapi
- trouble with Fuseki UI and one AJAX request (/$/stats) HOT 7
- Fuseki HttpAction: Check and improve the transaction lifecycle for HTTP action execution.
- Fuseki - setting the context path to a relative path causes 404s.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jena.