-
Notifications
You must be signed in to change notification settings - Fork 8
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
1154 add loc ids #1179
1154 add loc ids #1179
Conversation
This also upgrades rails as this is necessary via the dependency entry for specroutes. Additionally it also makes sense to use the latest bugfixes.
This is a result of `rails g specroutes:routes`.
During Ontology-Creation the loc/id field will be set according to the definition. This includes the generate_locid and the locid_for_child method which generate a locid for a single-/distributed-ontology and single-in-distributed-ontology respectively.
This includes dropping the query-string from path, as it is not necessary for standard loc/id routes. Additionally for ref/routes we do not drop the leading '/' as it is necessary per loc/id definition.
This produces a url according to the requests base_url (which has the benefit of actually using the hostname that was used to contact the site) and the resource's locid attribute.
Additionally add mechanism to set the loc/id during ontology-parsing.
As we currently do not have a useable symbols#show we'll use symbols#index instead to route symbol loc/id's.
For /children and /symbols redirect we should also use the loc/id iri system. This will achieve that.
Additionally add mechanism to set the loc/id during ontology-parsing.
As we currently do not have a useable sentences#show we'll use sentences#index instead to route sentence loc/id's.
Additionally add mechanism to set the loc/id during ontology-parsing.
In distinction from sentences and symbols we actually do have a page to display for mappings so we'll do exactly that when resolving the loc/id.
This currently only includes the ontologies themselves, members of ontologies (children, symbols, sentences, mappings) or index-routes based on ontologies (metadata, versions and so on).
As per our API-definition we'll use a prefix of three slashes (///) to denote an API-command. Ontology-Subsites are defined as general API commands.
We support commands for triple-slash as additional args to locid_for and a hash at the end for the query-strings key-value pairs.
There is now a COMMAND part to loc/ids which is separated from other elements by three slashes (///). We will need to recognize that.
For some reason the proc was transformed into a method. Such a method cannot work with `&method_name`, but must use `&:method_name`. However that is still not feasible as we can't pass arguments to methods. That is why we need the manual block which takes care of that.
Later on this should be fixed by providing a correct implementation of the FormalityLevelsController.
['Metadata', locid_for(resource, :metadata), :metadata], | ||
['Versions', locid_for(resource, :ontology_versions), :ontology_versions], | ||
['Graphs', locid_for(resource, :graphs), :graphs], | ||
['Mappings', locid_for(resource, :mappings), :mappings] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/TrailingComma: Put a comma after the last item of a multiline array.
28fcb56
to
aa6a6b2
Compare
|
||
specified_get '/:repository_id/*locid' => 'symbols#index', | ||
as: :symbol_iri, | ||
constraints: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/AlignHash: Align the elements of a hash literal if they span more than one line.
Test on jenkins probably fails because there is no libxml available, can you take care of that @eugenk? |
Will do, but not today. |
test this please |
test this build |
with fresh seeds, on http://ontohub.dev/default/partial_order//partial_order///mappings, I get:
|
...and I see this is a problem introduced by the renaming of models. I'm creating a new branch for that one. For this branch: 👍 |
This is a partial pull-request for #1154. It shall implement loc/id support for ontologies and their subsites (e.g. children, symbols, mappings, versions). Additionally it contains loc/id support for ontology-members.
The extended loc/id support (for /ref-style domains) will be provided in a later pull-request.