Skip to content

Commit

Permalink
Rename method 'getNumberOfElements'.
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Nov 14, 2024
1 parent a24e66c commit 01f6d71
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public CreateProcessForm() {
* @throws XMLStreamException when retrieving EAD from XML data fails
*/
public void calculateNumberOfEadElements() throws XMLStreamException {
numberOfEadElements = XMLUtils.getNumberOfElements(xmlString, selectedEadLevel);
numberOfEadElements = XMLUtils.getNumberOfEADElements(xmlString, selectedEadLevel);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public static DataRecord createRecordFromXMLElement(String xmlContent, ImportCon
* @return number of EAD elements with given level
* @throws XMLStreamException when parsing XML string fails
*/
public static int getNumberOfElements(String xmlString, String eadLevel) throws XMLStreamException {
public static int getNumberOfEADElements(String xmlString, String eadLevel) throws XMLStreamException {
int count = 0;
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLStreamReader reader = factory.createXMLStreamReader(new StringReader(xmlString));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ private List<Element> getEADElements(Document document, String level) {
* @throws XMLStreamException when retrieving number of tags in XML content fails
*/
public boolean isMaxNumberOfRecordsExceeded(String xmlString, String tagName) throws XMLStreamException {
int numberOfRecords = XMLUtils.getNumberOfElements(xmlString, tagName);
int numberOfRecords = XMLUtils.getNumberOfEADElements(xmlString, tagName);
return numberOfRecords > ConfigCore.getIntParameterOrDefaultValue(ParameterCore.MAX_NUMBER_OF_PROCESSES_FOR_IMPORT_MASK);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void run() {
List<Integer> newProcessIds = new ArrayList<>();
int newParentId = 0;
try {
int numberOfElements = XMLUtils.getNumberOfElements(xmlString, eadLevel);
int numberOfElements = XMLUtils.getNumberOfEADElements(xmlString, eadLevel);
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
XMLEventReader eventReader = inputFactory.createXMLEventReader(new StringReader(xmlString));
boolean inProcessElement = false;
Expand Down

0 comments on commit 01f6d71

Please sign in to comment.