Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor bucket map #3

Open
pietercolpaert opened this issue Oct 22, 2021 · 1 comment
Open

Refactor bucket map #3

pietercolpaert opened this issue Oct 22, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@pietercolpaert
Copy link
Member

Instead of having a map like this: root → ["a", ... ]

Let’s design it as root→ [{ value: "a", type: "SubstringRelation", nodeId: "a", remainingItems: 5}, ...]

This way, the bucketizer can look up all parameters necessary to correctly describe the fragmentation in a generic way. It will open the door to mixed fragment trees as well.

The geospatial bucketizer then could keep a map like this: root→ [{ value: "POLYGON (... ... ...)", type: "GeospatiallyContainsRelation", nodeId: "x/y/z", remainingItems: 5}, ...]

Question: value is usually an RDF.Term when we get it from the web. Do we already of here need to describe it as an RDF.Term instead of merely a string? E.g., it could be that the value is a literal with a specific datatype (e.g., xsd:dateTIme), then that has a huge influence on a GreaterThanRelation, as the datetime will need to be compared based on later in time.

@pietercolpaert pietercolpaert added the enhancement New feature or request label Oct 22, 2021
@ddvlanck
Copy link
Contributor

ddvlanck commented Nov 12, 2021

In the TREEcg/types repository, we added this as RelationParameters in version 0.0.11.

RelationParameters is an interface with the following properties:

  • nodeId → string representing the node id
  • type → RelationType (which is an enum with all relation types that currently exist in the TREE spec)
  • value (optional) → Array of RDF.Term
  • remainingItems (optional) → number

The abstract class Bucketizer, contains hypermediacontrols as a Map<string, RelationParameters[]>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants