wso2-dev/carbon-registry — pull request #25 by denuwanthi (2014-10-09 09:41:44+00:00)
Title: Fix for JIRA:https://wso2.org/jira/browse/REGISTRY-2310

When there is circular refernced schemas,
the same schema file 'IS_CMM_MessageEnvelope_v2.xsd'
gets two source URIs.(example)
1.file:///home/denuwanthi/G-reg/supportissues/CAPGRPDEV-91/G-reg/wso2greg-4.6.0/tmp/wsdl4429442587491522786/IS_CMM_MessageEnvelope_v2.xsd
2.file:/home/denuwanthi/G-reg/supportissues/CAPGRPDEV-91/G-reg/wso2greg-4.6.0/tmp/wsdl4429442587491522786/IS_CMM_MessageEnvelope_v2.xsd

This only happens when it is a file uri. For, http urls, that problem does not occur.
The '.file:///' is shown when it is the master schema.
So, if a certain source uri is formthe master schema & it is 'file' uri, we take the absolute file path (the temp location inside G-reg), and compare it. That way, the duplication of absolute paths can be identified.