The getRelatedDocument Method
This method is required when you work with linked dictionaries. You must connect to MDS, find the related dictionary file, and then return it in a string format. The code sample below shows how to find the path of the linked dictionaries that are stored within the ../oracle/rules directory in a local file system:
public String getRelatedDocument(RelatedMetadataPath relatedMetadataPath) {
String currPath = RULES_FILE1.substring(0, RULES_FILE1.indexOf("oracle/rules"));
String relatedDoc = currPath + "oracle/rules/" + relatedMetadataPath.getValue();
URL url = null;
try {
url = new URL(relatedDoc);
return readFile(url);
} catch (IOException e) {
System.err.println(e);
}
return "";
}