/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <gmi:MI_Operation>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the metadata to be marshalled. */ @XmlElementRef public DefaultOperation getElement() { return DefaultOperation.castOrCopy(metadata); }
/** * Sets the description of the mission on which the platform observations are made and the * objectives of that mission. * * @param newValue the new description value. */ public void setDescription(final InternationalString newValue) { checkWritePermission(); description = newValue; }
/** * Returns the sub-missions that make up part of a larger mission. * * @return sub-missions. */ @Override @XmlElement(name = "childOperation") public Collection<Operation> getChildOperations() { return childOperations = nonNullCollection(childOperations, Operation.class); }
/** * Adds an event that describe the time at which data were acquired. * Storage location is: * * <ul> * <li>{@code metadata/acquisitionInformation/operation/significantEvent/time}</li> * </ul> * * @param time the acquisition time, or {@code null} for no-operation. * * @see #addTemporalExtent(Date, Date) */ public final void addAcquisitionTime(final Date time) { if (time != null) { final DefaultEvent event = new DefaultEvent(); event.setContext(Context.ACQUISITION); event.setTime(time); final DefaultOperation op = new DefaultOperation(); op.setSignificantEvents(singleton(event)); op.setType(OperationType.REAL); op.setStatus(Progress.COMPLETED); addIfNotPresent(acquisition().getOperations(), op); } }
/** * Adds the identifier of the operation used to acquire the dataset. * Examples: "GHRSST", "NOAA CDR", "NASA EOS", "JPSS", "GOES-R". * Storage location is: * * <ul> * <li>{@code metadata/acquisitionInformation/operation/identifier}</li> * </ul> * * @param program identification of the mission, or {@code null} if none. * @param identifier unique identification of the operation, or {@code null} for no-operation. */ public final void addAcquisitionOperation(final CharSequence program, String identifier) { if (identifier != null && !(identifier = identifier.trim()).isEmpty()) { final DefaultOperation r = new DefaultOperation(); r.setIdentifier(sharedIdentifier(program, identifier)); addIfNotPresent(acquisition().getOperations(), r); } }
/** * Returns a SIS metadata implementation with the values of the given arbitrary implementation. * This method performs the first applicable action in the following choices: * * <ul> * <li>If the given object is {@code null}, then this method returns {@code null}.</li> * <li>Otherwise if the given object is already an instance of * {@code DefaultOperation}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultOperation} instance is created using the * {@linkplain #DefaultOperation(Operation) copy constructor} * and returned. Note that this is a <cite>shallow</cite> copy operation, since the other * metadata contained in the given object are not recursively copied.</li> * </ul> * * @param object the object to get as a SIS implementation, or {@code null} if none. * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultOperation castOrCopy(final Operation object) { if (object == null || object instanceof DefaultOperation) { return (DefaultOperation) object; } return new DefaultOperation(object); }
/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Operation) */ public DefaultOperation(final Operation object) { super(object); if (object != null) { description = object.getDescription(); citation = object.getCitation(); identifiers = singleton(object.getIdentifier(), Identifier.class); status = object.getStatus(); type = object.getType(); childOperations = copyCollection(object.getChildOperations(), Operation.class); objectives = copyCollection(object.getObjectives(), Objective.class); parentOperation = object.getParentOperation(); plan = object.getPlan(); platforms = copyCollection(object.getPlatforms(), Platform.class); significantEvents = copyCollection(object.getSignificantEvents(), Event.class); } }
/** * Sets the unique identification of the operation. * * @param newValue the new identifier value. */ public void setIdentifier(final Identifier newValue) { checkWritePermission(); identifiers = nonNullCollection(identifiers, Identifier.class); NonMarshalledAuthority.setMarshallable(identifiers, newValue); }
/** * Adds an event that describe the time at which data were acquired. * Storage location is: * * <ul> * <li>{@code metadata/acquisitionInformation/operation/significantEvent/time}</li> * </ul> * * @param time the acquisition time, or {@code null} for no-operation. * * @see #addTemporalExtent(Date, Date) */ public final void addAcquisitionTime(final Date time) { if (time != null) { final DefaultEvent event = new DefaultEvent(); event.setContext(Context.ACQUISITION); event.setTime(time); final DefaultOperation op = new DefaultOperation(); op.setSignificantEvents(singleton(event)); op.setType(OperationType.REAL); op.setStatus(Progress.COMPLETED); addIfNotPresent(acquisition().getOperations(), op); } }
/** * Adds the identifier of the operation used to acquire the dataset. * Examples: "GHRSST", "NOAA CDR", "NASA EOS", "JPSS", "GOES-R". * Storage location is: * * <ul> * <li>{@code metadata/acquisitionInformation/operation/identifier}</li> * </ul> * * @param program identification of the mission, or {@code null} if none. * @param identifier unique identification of the operation, or {@code null} for no-operation. */ public final void addAcquisitionOperation(final CharSequence program, String identifier) { if (identifier != null && !(identifier = identifier.trim()).isEmpty()) { final DefaultOperation r = new DefaultOperation(); r.setIdentifier(sharedIdentifier(program, identifier)); addIfNotPresent(acquisition().getOperations(), r); } }
/** * Returns a SIS metadata implementation with the values of the given arbitrary implementation. * This method performs the first applicable action in the following choices: * * <ul> * <li>If the given object is {@code null}, then this method returns {@code null}.</li> * <li>Otherwise if the given object is already an instance of * {@code DefaultOperation}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultOperation} instance is created using the * {@linkplain #DefaultOperation(Operation) copy constructor} * and returned. Note that this is a <cite>shallow</cite> copy operation, since the other * metadata contained in the given object are not recursively copied.</li> * </ul> * * @param object the object to get as a SIS implementation, or {@code null} if none. * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultOperation castOrCopy(final Operation object) { if (object == null || object instanceof DefaultOperation) { return (DefaultOperation) object; } return new DefaultOperation(object); }
/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Operation) */ public DefaultOperation(final Operation object) { super(object); if (object != null) { description = object.getDescription(); citation = object.getCitation(); identifiers = singleton(object.getIdentifier(), Identifier.class); status = object.getStatus(); type = object.getType(); childOperations = copyCollection(object.getChildOperations(), Operation.class); objectives = copyCollection(object.getObjectives(), Objective.class); parentOperation = object.getParentOperation(); plan = object.getPlan(); platforms = copyCollection(object.getPlatforms(), Platform.class); significantEvents = copyCollection(object.getSignificantEvents(), Event.class); } }
/** * Sets the collection technique for the operation. * * @param newValue the new type value. */ public void setType(final OperationType newValue) { checkWritePermission(); type = newValue; }
/** * Returns the platform (or platforms) used in the operation. * * @return platforms used in the operation. */ @Override @XmlElement(name = "platform") public Collection<Platform> getPlatforms() { return platforms = nonNullCollection(platforms, Platform.class); }
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <mac:MI_Operation>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the metadata to be marshalled. */ @XmlElementRef public DefaultOperation getElement() { return DefaultOperation.castOrCopy(metadata); }
/** * Sets the plan satisfied by the operation. * * @param newValue the new plan value. */ public void setPlan(final Plan newValue) { checkWritePermission(); plan = newValue; }
/** * Returns the record of an event occurring during an operation. * * @return record of an event occurring during an operation. */ @Override @XmlElement(name = "significantEvent") public Collection<Event> getSignificantEvents() { return significantEvents = nonNullCollection(significantEvents, Event.class); }
/** * Sets the heritage of the operation. * * @param newValue the new parent operation value. */ public void setParentOperation(final Operation newValue) { checkWritePermission(); parentOperation = newValue; }
/** * Returns object(s) or area(s) of interest to be sensed. * * @return object(s) or area(s) of interest. */ @Override @XmlElement(name = "objective") public Collection<Objective> getObjectives() { return objectives = nonNullCollection(objectives, Objective.class); }
/** * Sets the identification of the mission. * * @param newValue the new citation value. */ public void setCitation(final Citation newValue) { checkWritePermission(); citation = newValue; }