use of org.openforis.idm.metamodel.ModelVersion in project collect by openforis.
the class CollectRecordSummary method fromRecord.
public static CollectRecordSummary fromRecord(CollectRecord r) {
CollectSurvey survey = (CollectSurvey) r.getSurvey();
ModelVersion version = r.getVersion();
CollectRecordSummary summary = new CollectRecordSummary();
summary.setCreatedBy(r.getCreatedBy());
summary.setCreationDate(r.getCreationDate());
summary.setId(r.getId());
summary.setModifiedBy(r.getModifiedBy());
summary.setModifiedDate(r.getModifiedDate());
summary.setSurvey(survey);
summary.setVersion(version);
summary.setOwner(r.getOwner());
summary.setRootEntityDefinitionId(r.getRootEntityDefinitionId());
summary.setStep(r.getStep());
summary.setWorkflowSequenceNumber(r.getWorkflowSequenceNumber());
StepSummary stepSummary = new StepSummary(r.getStep());
stepSummary.setSequenceNumber(r.getDataWorkflowSequenceNumber());
stepSummary.setState(r.getState());
stepSummary.setCompletionPercent(r.calculateCompletionPercent());
stepSummary.setEntityCounts(r.getEntityCounts());
stepSummary.setTotalErrors(r.getTotalErrors());
stepSummary.setErrors(r.getErrors());
stepSummary.setFilledAttributesCount(r.countTotalFilledAttributes());
stepSummary.setMissing(r.getMissing());
stepSummary.setMissingErrors(r.getMissingErrors());
stepSummary.setMissingWarnings(r.getMissingWarnings());
stepSummary.setRootEntityKeyValues(r.getRootEntityKeyValues());
stepSummary.setSkipped(r.getSkipped());
stepSummary.setTotalErrors(r.getTotalErrors());
stepSummary.setWarnings(r.getWarnings());
summary.addStepSummary(stepSummary);
return summary;
}
use of org.openforis.idm.metamodel.ModelVersion in project collect by openforis.
the class VersioningVM method getItemsInternal.
@Override
protected List<ModelVersion> getItemsInternal() {
CollectSurvey survey = getSurvey();
List<ModelVersion> versions = survey.getSortedVersions();
return versions;
}
use of org.openforis.idm.metamodel.ModelVersion in project collect by openforis.
the class VersioningVM method isVersionInUse.
protected boolean isVersionInUse(ModelVersion version, VersionableSurveyObject object) {
ModelVersion sinceVersion = object.getSinceVersion();
ModelVersion deprecatedVersion = object.getDeprecatedVersion();
return version.equals(sinceVersion) || version.equals(deprecatedVersion);
}
use of org.openforis.idm.metamodel.ModelVersion in project collect by openforis.
the class EditableListOfNodesVM method getLayoutFormVersion.
public ModelVersion getLayoutFormVersion() {
SessionStatus sessionStatus = getSessionStatus();
ModelVersion version = sessionStatus.getLayoutFormVersion();
return version;
}
use of org.openforis.idm.metamodel.ModelVersion in project collect by openforis.
the class TabsGroupPanelVM method getFormVersion.
public ModelVersion getFormVersion() {
SessionStatus sessionStatus = super.getSessionStatus();
ModelVersion version = sessionStatus.getLayoutFormVersion();
return version;
}
Aggregations