spring-fedora's People
spring-fedora's Issues
RestTemplate: Spring send http requests
DESC
- read about standard behavior in spring sending http requests
- like: https://attacomsian.com/blog/http-requests-resttemplate-spring-boot
- https://reflectoring.io/spring-webclient/
TODOs
- implement some http wrapper class? as dao e.g.?
Bootstraping: Create object prototypes
DESC
- prototypes are not really something built-in in fedora. Are implemented via gams logic - "clone object"
- maybe play around with TEI or simple content models
TODOs
- add as empty containers
- think about: take over TransactionManager + FedoraProxy? (for adding some very basic RDF)
- implement TEI prototype with some basic RDF?
Add basic thymeleaf CRUD client functionality
DESC
- control via client basic opeartions
TODOs
- implement very basic search for objects via pid
- add tymeleaf index html
- implement create object form?
- add link to fcrepo/rest + apply two cols layout on main
CRUD: Server managed triples might be ignored via Prefer: handling=lenient
DESC
- would remove requirement to filter SMTs (=Server managed triples ) from the metadata xml
- https://wiki.lyrasis.org/display/FEDORAM6M1P0/Server+Managed+Triples
TODOs
- implement
Simulate creation of ldp binary
DESC
- create binaries like for datastreams on gams4
TODOs
- Resource model must contain mimetype
- fix checking if datastream already exists
- datastream must be linked to a digital object
- add content to datastream!
- remove rdfxml field ?
- decide: resource must contain all available info? base rdf? AND additional datastreams?
- add to ResourceReposiotry ability to create container types (handle via enum?)
Add methods to validate datastream id AND pid
DESC
- needs to be validated
- copy over from johannes
TODOs
- pid validation
- datastream validation (datastream id should be validated?)
- custom exception?
Get request: specify which information should by get requested from fedora
DESC
- prefere header is setable / could exclude fedora intern triples!
- see rest api doc at get request https://wiki.lyrasis.org/display/FEDORAM6M1P0/REST+API+Specification#RESTAPISpecification-put-example3
- fcrepo client api has the .preferRespresentation method ()
Implement transaction workflow
DESC
- take a look how transactions are managed on GAMS
- check how to adapt to Spring workflows?
- like here: https://www.baeldung.com/spring-programmatic-transaction-management
- https://www.tutorialspoint.com/spring/spring_transaction_management.htm
- https://medium.com/javarevisited/spring-transaction-management-95ab4b2cf513
- https://www.youtube.com/results?search_query=spring+transactions
TODOs
- implement some kind of lambda functionaliy? so that no passing around of transaction ids is necessary
- implement
- import RepositoryUtils to append fedora response body if available to error messages
- implement doGetTransaction() with correct error handling - txid better being an optional?
- Check on hot to handle if txid is null / optional / when transaction is expired or not!
- Repository layer of fedora must grab transaction id from application / transaction context?
- injecting own spring component as holder for transaction id??
-
implement FedoraHttpProxy as spring component--> not necessary! - declutter service methods - being able to be transaction save = no intern method calls / using only from external instances injected by spring
- update DigitalObjectRepository to work with transactions
- deletion of datastreams must be transaction safe
- update DatastreamRepository to work with transactions
- update ResourceRepository to work with transactions
- implement transaction save service layer!
Centralize error handling
DESC
- https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc
- https://reflectoring.io/spring-boot-exception-handling/
- let repository / service lvl escalate through the exceptions and return them to client (try to mimic setup from johannes with own defined exceptions extending spring exceptions?)
TODOs
- implement using Johanneses FedoraException class?
Spring Security integration / Fedora authorization and authentication
DESC
- establish basic authorization workflow like current version of GAMS4
- integration with existing authorization processes (oauth2 / keycloak)
- like: https://www.baeldung.com/spring-boot-keycloak
- fedora authentication and authorization: https://wiki.lyrasis.org/display/FEDORAM6M1P0/Authentication+and+Authorization
- fedora: https://wiki.lyrasis.org/display/FEDORAM6M1P0/Auth+Framework
- https://www.baeldung.com/get-user-in-spring-security
Summary
- fedora auth is based on linked data - and therefoe complex / first level of security should be implemented via spring and oauth processes
- keycloak adapters are deprecated therefore best way is to use spring-ouauth2-client library for spring integration. (e.g. spring-boot-keycloak adapter is deprecated https://www.keycloak.org/2022/02/adapter-deprecation)
- simplest authorization workflow would be authorization-code-flow for spring based web clients
- using keycloak as authorization server
Most useful resources for spring based authorization
- https://www.youtube.com/watch?v=t9O99l4gjAc&ab_channel=ProgrammingTechie
- https://www.baeldung.com/spring-security-openid-connect
- https://www.todaystechnology.org/post/secure-spring-rest-api-using-openid-connect-and-keycloak-part-4
TODOs
- gather material / resources
- implement
Think about: validation via spring!
DESC
- there is a standardized way of validating spring stuff
- EnumPatternValidator! - https://www.baeldung.com/javax-validations-enums
- validating list of allowed values: https://stackoverflow.com/questions/40096694/spring-validation-for-list-of-accepted-string-values
- https://stackoverflow.com/questions/6294587/java-string-validation-using-enum-values-and-annotation
TODOs
- test out controller based validation
- check - validation on entity instantiation?
- refactoring: centralize validation on model / entity layer?
- think about: centralized validation
Document major non-functional workflows
DESC
TODOs
- transaction workflow
- authentication
- authorization
- add more here
Clean up model classes
DESC
- clean up old and unused properties!
TODOs
- clean up resource + datastream fields
- digital object should inherit from resource
- correct view: show only datastream ids on digital object view
Add specific ldp repository functionality like update Triples
DESC
- accordng to ldp
TODOs
- implement updateTriples
Initialize using spring initializer with base functionality
DESC
- initial setup / provide some basic links etc.
TODOs
- create spring fedora setup
- init commit
- add basic content to readme
Sample request: Match incoming legacy path to actual fedora path
DESC
- return model class as JSON as standard spring workflow
- e.g. o:derla.sty --> return rdf of object
TODOs
- implement
add datastreams to prototypes
DESC
- like for TEI prototype object
TODOs
- e.g. small dublin core file
Simulate centralization of environment variables via spring workflow
DESC
- in old code there are a lot of System.getEnv() etc. calls - better to be handled via standard spring workflows?
- e.g. https://www.baeldung.com/properties-with-spring
- reading out system environment like hostname etc.
- https://stackoverflow.com/questions/48450121/how-can-i-get-spring-boot-to-load-the-java-system-getenv-variables-into-the-en
- System.getenv(): "Spring boot automatically loads all the System.getenv() into the Environment variable at startup."
TODOs
- implement
Add bootstrap setup according to GAMS configuration
DESC
- check which LDP containers need to be breated
- try to copy over code from Johannes (FedoraConnector init method?)
TODOs
- add fedora client to spring boot app
- create bootstrap component as in rdf4j zimlab
- think about: stored in fedora are resources AND containers --> is it truely a ResourceRepository?
- check how to wrap code in some kind of fedora wrapper? services / repository layer? (I think fedora should work as DigitalObjectRepository? --- because fedora is something application dependent - spring should not know about fedora)
- implement startup according to initial gams setup
Add cm4f metadata to digital objects / datastreams
DESC
have difficulties to configure custom namespaces in fedora atm! (unexpected crashes)
TODOs
- add cm4f namespace to fedora6
- add cm4f properties
Delete resource in fedora (+tombstone page)
DESC
- try to delete a fedora resource
- additionally try to remove the tombstone entry
- tombstone is just another resource in fedora and can be deleted via postfixing "/fcr:tombstone" to the deleted fedora resource's path
TODOs
- implement
Create datastreams via web client
DESC
- mimic Johannes method to create datastreams via cirilo
- mimic some prototype behaviors
TODOs
- #20
- let datastream be added + file upload via web client Sprign MultiPartFile
- show parsed list of datastreams -> this must be done via external indexer! (ask database sepcifically for children of digital object - and not parse out from metadata rdf?)
- link to datastreams from fedora via thymeleaf?
- remove existing datastreams?
- improve general bootstrap display
Create digital object via pid (etc.)
DESC
- match pid to fedora path
- e.g. when context:bla -> aggregation. o:cantus -> objects etc. these paths must be mapped!
TODOs
- implement renaming as in gams - take a look at the Rename.java
Completely implement resource repository
DESC
- implement all methods that need to be overriden
- think about additional methods? (but might also be more in direction of service layer)
TODOs
- implement
Create basic spring boot setup
DESC
- according to: https://zimlab.uni-graz.at/gams/working-groups/geo/gisdatabasesprototypes/rdf4j_springboot
- add folder structure with readme files etc.?
TODOs
- implement
Calls simple search API to display overview of objects?
DESC
- just to display on main page or something like that
- via: https://www.delftstack.com/howto/java/handling-json-arrays-in-java/
TODOs
- refactor: use spring env variables for fedora location (address + port)
- add to DigitalObjectService
- add to view part somewhere?
- link from digital object overview to individual digital objects
- add ability to delete digital objects
- update initializing: creation of each object should be able to fail
- fully craft DigitalObjectRepository
- fill in more stuff to the digital objects?
- improve error handling
- think about: dto concept?
Implement some kind of content model workflow at object creation
DESC
- e.g. classes for ContentModel datastreams DC / TEI_SOURCE etc.?
- craft content model workflow for gams
- add cm4f properties like on testserver
TODOs
- better utils location for mapPidToResourcePath!
- implement DigitalObjectRepository (findById)
- add to digital object service: createFromPrototype
- compare with Johanneses impl / create own class for masrhalling etc.?
- implement dublin core workflow?
- think about adding more fields to DigitalObject fields?
- implement
- add to view ability to create object from prototype
- digital object service: map model statements to prototype pids somewhere!
Document API via OpenAPI / Swagger
DTO-Marshalling - Get object: use parsed rdf json and pass to model?
DESC
- instead of writing xml internally use the json response and auto-parse as pojos?
- atm we are operating via xml + rdf -- means using Document API --> process RDF as XML by hand
- alternatives: via RDF API / via json / etc.
TODOs
- test + implement
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.