-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-SITESITE-3013 - This flag can be used to determine whether the results returned are 0 because there are no issues or because they were limited by severityLevel
- Loading branch information
Showing
2 changed files
with
123 additions
and
113 deletions.
There are no files selected for viewing
231 changes: 120 additions & 111 deletions
231
src/main/java/org/sitenv/referenceccda/dto/ValidationResultsMetaData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,120 @@ | ||
package org.sitenv.referenceccda.dto; | ||
|
||
import org.sitenv.referenceccda.validators.enums.ValidationResultType; | ||
|
||
import java.util.ArrayList; | ||
import java.util.LinkedHashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicInteger; | ||
|
||
|
||
public class ValidationResultsMetaData { | ||
private String ccdaDocumentType; | ||
private String ccdaVersion; | ||
private String objectiveProvided; | ||
private boolean serviceError; | ||
private String serviceErrorMessage; | ||
private String ccdaFileName; | ||
private String ccdaFileContents; | ||
private final Map<String, AtomicInteger> errorCounts = new LinkedHashMap<String, AtomicInteger>(); | ||
private List<ResultMetaData> resultMetaData; | ||
private int vocabularyValidationConfigurationsCount; | ||
|
||
public ValidationResultsMetaData() { | ||
for (ValidationResultType resultType : ValidationResultType.values()) { | ||
errorCounts.put(resultType.getTypePrettyName(), new AtomicInteger(0)); | ||
} | ||
} | ||
|
||
public String getCcdaDocumentType() { | ||
return ccdaDocumentType; | ||
} | ||
|
||
public void setCcdaDocumentType(String ccdaDocumentType) { | ||
this.ccdaDocumentType = ccdaDocumentType; | ||
} | ||
|
||
public void setCcdaVersion(String ccdaVersion) { | ||
this.ccdaVersion = ccdaVersion; | ||
} | ||
|
||
public String getCcdaVersion() { | ||
return ccdaVersion; | ||
} | ||
|
||
public String getObjectiveProvided() { | ||
return objectiveProvided; | ||
} | ||
|
||
|
||
public void setObjectiveProvided(String objectiveProvided) { | ||
this.objectiveProvided = objectiveProvided; | ||
} | ||
|
||
|
||
public boolean isServiceError() { | ||
return serviceError; | ||
} | ||
|
||
public void setServiceError(boolean serviceError) { | ||
this.serviceError = serviceError; | ||
} | ||
|
||
public String getServiceErrorMessage() { | ||
return serviceErrorMessage; | ||
} | ||
|
||
public void setServiceErrorMessage(String serviceErrorMessage) { | ||
this.serviceErrorMessage = serviceErrorMessage; | ||
} | ||
|
||
public List<ResultMetaData> getResultMetaData() { | ||
resultMetaData = new ArrayList<ResultMetaData>(); | ||
for (Map.Entry<String, AtomicInteger> entry : errorCounts.entrySet()) { | ||
resultMetaData.add(new ResultMetaData(entry.getKey(), entry.getValue().intValue())); | ||
} | ||
return resultMetaData; | ||
} | ||
|
||
public String getCcdaFileName() { | ||
return ccdaFileName; | ||
} | ||
|
||
public void setCcdaFileName(String ccdaFileName) { | ||
this.ccdaFileName = ccdaFileName; | ||
} | ||
|
||
public String getCcdaFileContents() { | ||
return ccdaFileContents; | ||
} | ||
|
||
public void setCcdaFileContents(String ccdaFileContents) { | ||
this.ccdaFileContents = ccdaFileContents; | ||
} | ||
|
||
public void addCount(ValidationResultType resultType) { | ||
if (errorCounts.containsKey(resultType.getTypePrettyName())) { | ||
errorCounts.get(resultType.getTypePrettyName()).addAndGet(1); | ||
} else { | ||
errorCounts.put(resultType.getTypePrettyName(), new AtomicInteger(1)); | ||
} | ||
} | ||
|
||
public int getVocabularyValidationConfigurationsCount() { | ||
return vocabularyValidationConfigurationsCount; | ||
} | ||
|
||
public void setVocabularyValidationConfigurationsCount(int vocabularyValidationConfigurationsCount) { | ||
this.vocabularyValidationConfigurationsCount = vocabularyValidationConfigurationsCount; | ||
} | ||
} | ||
package org.sitenv.referenceccda.dto; | ||
|
||
import org.sitenv.referenceccda.validators.enums.ValidationResultType; | ||
|
||
import java.util.ArrayList; | ||
import java.util.LinkedHashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicInteger; | ||
|
||
|
||
public class ValidationResultsMetaData { | ||
private String ccdaDocumentType; | ||
private String ccdaVersion; | ||
private String objectiveProvided; | ||
private boolean serviceError; | ||
private String serviceErrorMessage; | ||
private String ccdaFileName; | ||
private String ccdaFileContents; | ||
private final Map<String, AtomicInteger> errorCounts = new LinkedHashMap<String, AtomicInteger>(); | ||
private List<ResultMetaData> resultMetaData; | ||
private int vocabularyValidationConfigurationsCount; | ||
private String severityLevel; | ||
|
||
public ValidationResultsMetaData() { | ||
for (ValidationResultType resultType : ValidationResultType.values()) { | ||
errorCounts.put(resultType.getTypePrettyName(), new AtomicInteger(0)); | ||
} | ||
} | ||
|
||
public String getCcdaDocumentType() { | ||
return ccdaDocumentType; | ||
} | ||
|
||
public void setCcdaDocumentType(String ccdaDocumentType) { | ||
this.ccdaDocumentType = ccdaDocumentType; | ||
} | ||
|
||
public void setCcdaVersion(String ccdaVersion) { | ||
this.ccdaVersion = ccdaVersion; | ||
} | ||
|
||
public String getCcdaVersion() { | ||
return ccdaVersion; | ||
} | ||
|
||
public String getObjectiveProvided() { | ||
return objectiveProvided; | ||
} | ||
|
||
|
||
public void setObjectiveProvided(String objectiveProvided) { | ||
this.objectiveProvided = objectiveProvided; | ||
} | ||
|
||
|
||
public boolean isServiceError() { | ||
return serviceError; | ||
} | ||
|
||
public void setServiceError(boolean serviceError) { | ||
this.serviceError = serviceError; | ||
} | ||
|
||
public String getServiceErrorMessage() { | ||
return serviceErrorMessage; | ||
} | ||
|
||
public void setServiceErrorMessage(String serviceErrorMessage) { | ||
this.serviceErrorMessage = serviceErrorMessage; | ||
} | ||
|
||
public List<ResultMetaData> getResultMetaData() { | ||
resultMetaData = new ArrayList<ResultMetaData>(); | ||
for (Map.Entry<String, AtomicInteger> entry : errorCounts.entrySet()) { | ||
resultMetaData.add(new ResultMetaData(entry.getKey(), entry.getValue().intValue())); | ||
} | ||
return resultMetaData; | ||
} | ||
|
||
public String getCcdaFileName() { | ||
return ccdaFileName; | ||
} | ||
|
||
public void setCcdaFileName(String ccdaFileName) { | ||
this.ccdaFileName = ccdaFileName; | ||
} | ||
|
||
public String getCcdaFileContents() { | ||
return ccdaFileContents; | ||
} | ||
|
||
public void setCcdaFileContents(String ccdaFileContents) { | ||
this.ccdaFileContents = ccdaFileContents; | ||
} | ||
|
||
public void addCount(ValidationResultType resultType) { | ||
if (errorCounts.containsKey(resultType.getTypePrettyName())) { | ||
errorCounts.get(resultType.getTypePrettyName()).addAndGet(1); | ||
} else { | ||
errorCounts.put(resultType.getTypePrettyName(), new AtomicInteger(1)); | ||
} | ||
} | ||
|
||
public int getVocabularyValidationConfigurationsCount() { | ||
return vocabularyValidationConfigurationsCount; | ||
} | ||
|
||
public void setVocabularyValidationConfigurationsCount(int vocabularyValidationConfigurationsCount) { | ||
this.vocabularyValidationConfigurationsCount = vocabularyValidationConfigurationsCount; | ||
} | ||
|
||
public String getSeverityLevel() { | ||
return severityLevel; | ||
} | ||
|
||
public void setSeverityLevel(String severityLevel) { | ||
this.severityLevel = severityLevel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters