assure("importMetadataFile: null stream allowed", false);
} catch (IllegalArgumentException e) {
// ignore
}
try {
XInputStream xFooIn =
new StreamSimulator(tempDir + "empty.rdf", true, param);
xDMA.importMetadataFile(FileFormat.RDF_XML, xFooIn, "",
foo, new XURI[0]);
assure("importMetadataFile: empty filename allowed", false);
} catch (IllegalArgumentException e) {
// ignore
}
try {
XInputStream xFooIn =
new StreamSimulator(tempDir + "empty.rdf", true, param);
xDMA.importMetadataFile(FileFormat.RDF_XML, xFooIn, "meta.xml",
foo, new XURI[0]);
assure("importMetadataFile: meta.xml filename allowed", false);
} catch (IllegalArgumentException e) {
// ignore
}
try {
XInputStream xFooIn =
new StreamSimulator(tempDir + "empty.rdf", true, param);
xDMA.importMetadataFile(FileFormat.RDF_XML,
xFooIn, "foo", null, new XURI[0]);
assure("importMetadataFile: null base URI allowed", false);
} catch (IllegalArgumentException e) {
// ignore
}
try {
XInputStream xFooIn =
new StreamSimulator(tempDir + "empty.rdf", true, param);
xDMA.importMetadataFile(FileFormat.RDF_XML,
xFooIn, "foo", rdf_type, new XURI[0]);
assure("importMetadataFile: non-absolute base URI allowed",
false);