/** * Adds a platform on which instrument are installed. If a platform was already defined * with a different identifier, then a new platform instance will be created. * Storage location is: * * <ul> * <li>{@code metadata/acquisitionInformation/platform/identifier}</li> * </ul> * * @param authority identifiers the authority that define platform codes, or {@code null} if none. * @param identifier identifier of the platform to add, or {@code null} for no-operation. */ public final void addPlatform(final CharSequence authority, String identifier) { if (identifier != null && !(identifier = identifier.trim()).isEmpty()) { if (platform != null) { final Identifier current = platform.getIdentifier(); if (current != null) { if (identifier.equals(current.getCode())) { return; } acquisition().getPlatforms().add(platform); platform = null; } } platform().setIdentifier(sharedIdentifier(authority, identifier)); } }
/** * Adds a platform on which instrument are installed. If a platform was already defined * with a different identifier, then a new platform instance will be created. * Storage location is: * * <ul> * <li>{@code metadata/acquisitionInformation/platform/identifier}</li> * </ul> * * @param authority identifiers the authority that define platform codes, or {@code null} if none. * @param identifier identifier of the platform to add, or {@code null} for no-operation. */ public final void addPlatform(final CharSequence authority, String identifier) { if (identifier != null && !(identifier = identifier.trim()).isEmpty()) { if (platform != null) { final Identifier current = platform.getIdentifier(); if (current != null) { if (identifier.equals(current.getCode())) { return; } acquisition().getPlatforms().add(platform); platform = null; } } platform().setIdentifier(sharedIdentifier(authority, identifier)); } }