Giter Site home page Giter Site logo

Comments (4)

SebastianLisken avatar SebastianLisken commented on June 11, 2024

I think naming this attribute "path" would be confusing, because the annotated property contains the main part of the path. How about subPath or relPath?

from neba.

DaniRey avatar DaniRey commented on June 11, 2024

I also think that a simple "path" might be confusing, although being an attribute of @reference should give it some context.
Maybe targetPath would be an option as well.

from neba.

SebastianLisken avatar SebastianLisken commented on June 11, 2024

The problem is how to best express what is really a multi-step process: 1. from the resource modelled by the current class, navigate to a string property whose relative path is either the name of the annotated class variable or expressed by the @path annotation; 2. read the string and resolve it to a resource; 3. potentially move from that resource to a different resource whose relative path is to be named by the new attribute; 4. potentially replace the resource by its children. (Finally, adapt if desired.) Could we even want to add another move to a relative path after step 4, or exhange steps 3 and 4? Difficult to choose names that express this clearly, particularly as the name for step 1 is already fixed because it will be expressed by the @path attribute.

from neba.

olaf-otto avatar olaf-otto commented on June 11, 2024

My main concern is that is must be 100% clear what these settings are doing. As Sebastain correctly said, the resolution process has multiple steps and it may be unclear where an additional path segment is applied.

For the @reference annotation:
Here, the provided path is appended to all of the references. I would thus call the property "append", to signal that the path is appended to all of the references (in case of a collection) as well as any single reference:

@Reference(append = "/jcr:content")

For the @children annotation:
This is a bit more tricky. Two things must be made clear: a) The given path is resolved on every child and b) It is a relative path. I would thus call the property "resolveBelowEveryChild" to make clear that each child is affected and that the resolution is below (relative):

@Children(resolveBelowEveryChild = "/jcr:content")

from neba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.