mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 06:23:10 +00:00
DS-3363 CSV import error says "row", means "column"
This commit is contained in:
@@ -91,16 +91,16 @@ public class MetadataImportInvalidHeadingException extends Exception
|
|||||||
{
|
{
|
||||||
if (type == SCHEMA)
|
if (type == SCHEMA)
|
||||||
{
|
{
|
||||||
return "Unknown metadata schema in row " + column + ": " + badHeading;
|
return "Unknown metadata schema in column " + column + ": " + badHeading;
|
||||||
} else if (type == ELEMENT)
|
} else if (type == ELEMENT)
|
||||||
{
|
{
|
||||||
return "Unknown metadata element in row " + column + ": " + badHeading;
|
return "Unknown metadata element in column " + column + ": " + badHeading;
|
||||||
} else if (type == MISSING)
|
} else if (type == MISSING)
|
||||||
{
|
{
|
||||||
return "Row with missing header: Row " + column;
|
return "Row with missing header: column " + column;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
return "Bad metadata declaration in row " + column + ": " + badHeading;
|
return "Bad metadata declaration in column" + column + ": " + badHeading;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -96,7 +96,7 @@ public class DSpaceCSVTest extends AbstractUnitTest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
assertThat("testDSpaceCSV Bad heading CSV", e.getMessage(), equalTo("Unknown metadata element in row 4: dc.contributor.foobar"));
|
assertThat("testDSpaceCSV Bad heading CSV", e.getMessage(), equalTo("Unknown metadata element in column 4: dc.contributor.foobar"));
|
||||||
}
|
}
|
||||||
lines = dcsv.getCSVLinesAsStringArray();
|
lines = dcsv.getCSVLinesAsStringArray();
|
||||||
assertThat("testDSpaceCSV Good CSV", lines.length, equalTo(7));
|
assertThat("testDSpaceCSV Good CSV", lines.length, equalTo(7));
|
||||||
@@ -126,7 +126,7 @@ public class DSpaceCSVTest extends AbstractUnitTest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
assertThat("testDSpaceCSV Bad heading CSV", e.getMessage(), equalTo("Unknown metadata schema in row 3: dcdc.title"));
|
assertThat("testDSpaceCSV Bad heading CSV", e.getMessage(), equalTo("Unknown metadata schema in column 3: dcdc.title"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the test file
|
// Delete the test file
|
||||||
|
Reference in New Issue
Block a user