class LwM2MImporter {

	public ValidationReport validate(InputStream fileInput) {
		try {
			LWM2M lwm2m = parse(fileInput);
			if (lwm2m.getObject().isEmpty()) {
				return ValidationReport.invalid("File does not contain any object definitions.");
			} else {
				return ValidationReport.valid("File is a valid LwM2M description");
			}

		} catch (Exception ex) {
			return ValidationReport.invalid(ex.getMessage());
		}
	}

}