/** Validate unnamed group of type NXmonitor. */ private void validateGroup_entry_NXmonitor(final NXmonitor group) throws NexusValidationException { // validate that the group is not null validateGroupNotNull(null, NXmonitor.class, group); clearLocalGroupDimensionPlaceholderValues(); // validate field 'mode' of unknown type. final IDataset mode = group.getMode(); validateFieldNotNull("mode", mode); validateFieldEnumeration("mode", mode, "monitor", "timer"); // validate field 'preset' of type NX_FLOAT. final IDataset preset = group.getPreset(); validateFieldNotNull("preset", preset); validateFieldType("preset", preset, NX_FLOAT); validateFieldUnits("preset", preset, NX_ANY); // validate field 'distance' of type NX_FLOAT. final IDataset distance = group.getDistance(); validateFieldNotNull("distance", distance); validateFieldType("distance", distance, NX_FLOAT); validateFieldUnits("distance", distance, NX_LENGTH); // validate field 'data' of type NX_INT. final IDataset data = group.getData(); validateFieldNotNull("data", data); validateFieldType("data", data, NX_INT); validateFieldUnits("data", data, NX_ANY); validateFieldRank("data", data, 1); validateFieldDimensions("data", data, null, "ntimechan"); // validate field 'time_of_flight' of type NX_FLOAT. final IDataset time_of_flight = group.getTime_of_flight(); validateFieldNotNull("time_of_flight", time_of_flight); validateFieldType("time_of_flight", time_of_flight, NX_FLOAT); validateFieldUnits("time_of_flight", time_of_flight, NX_TIME_OF_FLIGHT); validateFieldRank("time_of_flight", time_of_flight, 1); validateFieldDimensions("time_of_flight", time_of_flight, null, "ntimechan"); // validate field 'integral_counts' of type NX_INT. Note: field not defined in base class. final IDataset integral_counts = group.getDataset("integral_counts"); validateFieldNotNull("integral_counts", integral_counts); validateFieldType("integral_counts", integral_counts, NX_INT); validateFieldUnits("integral_counts", integral_counts, NX_UNITLESS); }
/** Validate group 'control' of type NXmonitor. */ private void validateGroup_entry_control(final NXmonitor group) throws Exception { // validate that the group is not null validateGroupNotNull("control", NXmonitor.class, group); clearLocalGroupDimensionPlaceholderValues(); // validate field 'mode' of unknown type. final IDataset mode = group.getMode(); validateFieldNotNull("mode)", mode); validateFieldEnumeration("mode", mode, "monitor", "timer"); // validate field 'preset' of type NX_FLOAT. final IDataset preset = group.getPreset(); validateFieldNotNull("preset)", preset); validateFieldType("preset)", preset, NX_FLOAT); validateFieldUnits("preset", preset, NX_ANY); // validate field 'data' of type NX_FLOAT. final IDataset data = group.getData(); validateFieldNotNull("data)", data); validateFieldType("data)", data, NX_FLOAT); validateFieldUnits("data", data, NX_ANY); validateFieldRank("data", data, 1); validateFieldDimensions("data", data, null, "NP"); }