Closed mkutmon closed 3 years ago
Xref x = new Xref("1234", DataSource.getExistingBySystemCode("L"));
String urn = x.getMiriamURN();
That results in "urn:miriam:ncbigene:1234" which contains the prefix but it's a little cumbersome to access it like this.
I just implemented this, which will be part of BridgeDb 3.0.5, which I'll release later today (I intend):
DataSource ds = DataSource.getExistingBySystemCode("L");
String prefix = ds.getCompactIdentifierPrefix();
Is it possible to implement a function for datasource to get the prefix? Currently, you can parse it per identifier using the Xref function getMiriamURN() but it would be nice to just get the prefix for a datasource directly.
Example:
Output would be "ncbigene"