Closed ronaldtse closed 3 years ago
As I understand URN is type of docidentifier. We don't have any methods we can use via API or command-line. We just have a second doc identifier:
...
<docidentifier type="IEC">IEC 61058-2-4:1995+AMD1:2003 CSV</docidentifier>
<docidentifier type="URN">urn:iec:std:iec:61058-2-4:1995::csv:en:plus:amd:1:2003</docidentifier>
...
@andrew2net I’d like to have some documentation on:
Thanks!
- how do you generate this URN? There must be a method to generate it, can someone else call “mymethod(“IEC 12345”)” and get “urn:iec:std:iec:12345”?
Currently, URN is generated in the Scraper module but of course, we can extract the piece of code into a public method.
- Can we also fetch a document based on the URN?
We can't fetch documents by URN now. The relaton gem uses references like "IEC 12345" to handle documents filenames. So we need a method to convert URN to a usual reference. The flavor gems have different rules to covert to/form URN therefore we need to implement the method in the flavor gems and call them from the relaton gem. Do we need to implement such a functionality?
Currently, URN is generated in the Scraper module but of course, we can extract the piece of code into a public method.
Yes, please make it available and document it on relaton.org.
We can't fetch documents by URN now.
We should at least enable it in the relaton-iec gem, because you already support generating it, so parsing it is just an enhancement.
I suggest we extract the IEC URN code into a separate gem so that people (and our gems) can re-use it?
@ronaldtse I've implemented code_to_urn
method and updated README. There is a question. Do you know any document with a component or related asset information in its identifier? https://github.com/relaton/relaton-iec/issues/22#issuecomment-687191326
Could you help document this method so others can directly use it too, via API and command line? Thanks.
Originally posted by @ronaldtse in https://github.com/relaton/relaton-iec/issues/22#issuecomment-690786388