Improve XDS Validations
As reported in https://groups.google.com/forum/#!topic/ipf-user/FTvCuqXSaJ4: According to ITI TF-3:4.1.4, we have to check that the SubmissionSet contains Associations to all its DocumentEntries, Folders, and Folder-DocumentEntry Associations.
Subtask 1 -- Check completeness of XDS Associations, see above
Subtask 2 -- Check uniqueness of uniqueIDs As reported in https://groups.google.com/forum/#!topic/ipf-dev/Bj58Vl-7IeI: XDSRegistryDuplicateUniqueIdInMessage error shall be returned when "A uniqueId value was found to be used more than once within the submission. The errorCode indicates where the error was detected. The codeContext shall indicate the duplicate uniqueId"
Current OIDValidator regexp require two digit at the begining of OID, but for example ISO root start with one digit.
See https://wiki.ihe.net/index.php/OID_Registration and https://en.wikipedia.org/wiki/Object_identifier
Note quite. It allows one or two digits at the beginning. Which is a bit lax, as OIDs may only start with 0, 1 or 2.
I disagree. You can test it here https://regexr.com/38m0v Better version of regexp would be "([1-9]|[1-9][0-9])(.(0|([1-9][0-9])))+" or this most recent "([1-9]|[1-9][0-9])(\.(0|([1-9][0-9])))+" Which OIDs start with zero?
@FinOxy: In the wikipedia link you have mentioned (e.g. https://en.wikipedia.org/wiki/Object_identifier) and also the ISO 9834 specification, you can see that the root arc "0" belong to ITU-T, here a official Oid from that tree: http://www.oid-info.com/cgi-bin/display?oid=0.9.2342.19200300.100.4 So the first digit can be only a 0,1 or 2 - so the regex is ok (but sure not perform according to the iso spec).
The java JDK also bring a Oid class (org.ietf.jgss.Oid) which contain a strong validation (also following certain other rules of ISO 9834). We could think about replacing the regex with the validation by the Oid class constructor, but since validation is quiet often performed and might be performance critical, the regex might be sufficient for our purpose.