i40-Tools / SemI40STOLandscape

MIT License
0 stars 0 forks source link

To remove the oldid from wasDerived from #8

Closed igrangel closed 6 years ago

igrangel commented 6 years ago

1 - Remove the ?oldid from nsprov:wasDerived For example, if you check the following: nsprov:wasDerivedFrom http://en.wikipedia.org/wiki/Fieldbus?oldid=742124333 ; you will obtain the current wikipedia link - http://en.wikipedia.org/wiki/Fieldbus The same occurs with the following: nsprov:wasDerivedFrom http://en.wikipedia.org/wiki/Object_Management_Group?oldid=734349043 http://en.wikipedia.org/wiki/Object_Management_Group.

2 - Therefore, after removing the ?oldid you check if what is still there is a valid URI 3 - If the obtained string is a valid URI include it in the result.

mmaltsev commented 6 years ago

?oldid is removed from nsprov:wasDerived by adding one more condition for excluding the postfix and validating obtained result.

igrangel commented 6 years ago

Great. Can you separate this in a method, and call the method in this part? I'm concerned with the complexity of this code and this will the readability as well as the separation of concerns. It is important to think about the maintainability and readability of the code from the very beginning.