/** * 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 DefaultObjective}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultObjective} instance is created using the * {@linkplain #DefaultObjective(Objective) 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 DefaultObjective castOrCopy(final Objective object) { if (object == null || object instanceof DefaultObjective) { return (DefaultObjective) object; } return new DefaultObjective(object); }
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <mac:MI_Objective>} 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 DefaultObjective getElement() { return DefaultObjective.castOrCopy(metadata); }
/** * Sets the priority applied to the target. * * @param newValue the new priority value. */ public void setPriority(final InternationalString newValue) { checkWritePermission(priority); priority = newValue; }
/** * Sets the collection technique for the objective. * * @param newValues the new types values. */ public void setTypes(final Collection<? extends ObjectiveType> newValues) { types = writeCollection(newValues, types, ObjectiveType.class); }
/** * Returns the instrument which senses the objective data. * * @return instrument which senses the objective data. */ @Override @XmlElement(name = "sensingInstrument") public Collection<Instrument> getSensingInstruments() { return sensingInstruments = nonNullCollection(sensingInstruments, Instrument.class); }
/** * 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(Objective) */ public DefaultObjective(final Objective object) { super(object); if (object != null) { identifiers = copyCollection(object.getIdentifiers(), Identifier.class); priority = object.getPriority(); types = copyCollection(object.getTypes(), ObjectiveType.class); functions = copyCollection(object.getFunctions(), InternationalString.class); extents = copyCollection(object.getExtents(), Extent.class); objectiveOccurences = copyCollection(object.getObjectiveOccurences(), Event.class); pass = copyCollection(object.getPass(), PlatformPass.class); sensingInstruments = copyCollection(object.getSensingInstruments(), Instrument.class); } }
/** * Sets the instrument which senses the objective data. * * @param newValues the new sensing instruments values. */ public void setSensingInstruments(final Collection<? extends Instrument> newValues) { sensingInstruments = writeCollection(newValues, sensingInstruments, Instrument.class); } }
/** * Returns the role or purpose performed by or activity performed at the objective. * * @return role or purpose performed by or activity performed at the objective. */ @Override @XmlElement(name = "function") public Collection<InternationalString> getFunctions() { return functions = nonNullCollection(functions, InternationalString.class); }
/** * 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(Objective) */ public DefaultObjective(final Objective object) { super(object); if (object != null) { identifiers = copyCollection(object.getIdentifiers(), Identifier.class); priority = object.getPriority(); types = copyCollection(object.getTypes(), ObjectiveType.class); functions = copyCollection(object.getFunctions(), InternationalString.class); extents = copyCollection(object.getExtents(), Extent.class); objectiveOccurences = copyCollection(object.getObjectiveOccurences(), Event.class); pass = copyCollection(object.getPass(), PlatformPass.class); sensingInstruments = copyCollection(object.getSensingInstruments(), Instrument.class); } }
/** * Sets the extent information including the bounding box, bounding polygon, vertical and * temporal extent of the objective. * * @param newValues the new extents values. */ public void setExtents(final Collection<? extends Extent> newValues) { extents = writeCollection(newValues, extents, Extent.class); }
/** * Returns the instrument which senses the objective data. * * @return instrument which senses the objective data. */ @Override @XmlElement(name = "sensingInstrument") public Collection<Instrument> getSensingInstruments() { return sensingInstruments = nonNullCollection(sensingInstruments, Instrument.class); }
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <gmi:MI_Objective>} 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 DefaultObjective getElement() { return DefaultObjective.castOrCopy(metadata); }
/** * Sets the priority applied to the target. * * @param newValue the new priority value. */ public void setPriority(final InternationalString newValue) { checkWritePermission(); priority = newValue; }
/** * 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 DefaultObjective}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultObjective} instance is created using the * {@linkplain #DefaultObjective(Objective) 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 DefaultObjective castOrCopy(final Objective object) { if (object == null || object instanceof DefaultObjective) { return (DefaultObjective) object; } return new DefaultObjective(object); }
/** * Sets the role or purpose performed by or activity performed at the objective. * * @param newValues the new functions values. */ public void setFunctions(final Collection<? extends InternationalString> newValues) { functions = writeCollection(newValues, functions, InternationalString.class); }
/** * Returns the role or purpose performed by or activity performed at the objective. * * @return role or purpose performed by or activity performed at the objective. */ @Override @XmlElement(name = "function") public Collection<InternationalString> getFunctions() { return functions = nonNullCollection(functions, InternationalString.class); }
/** * Sets the extent information including the bounding box, bounding polygon, vertical and * temporal extent of the objective. * * @param newValues the new extents values. */ public void setExtents(final Collection<? extends Extent> newValues) { extents = writeCollection(newValues, extents, Extent.class); }
/** * Returns the event or events associated with objective completion. * * @return events associated with objective completion. */ @Override @XmlElement(name = "objectiveOccurence", required = true) public Collection<Event> getObjectiveOccurences() { return objectiveOccurences = nonNullCollection(objectiveOccurences, Event.class); }
/** * Sets the event or events associated with objective completion. * * @param newValues the new objective occurrences values. */ public void setObjectiveOccurences(final Collection<? extends Event> newValues) { objectiveOccurences = writeCollection(newValues, objectiveOccurences, Event.class); }
/** * Returns the collection technique for the objective. * * @return collection technique for the objective. */ @Override @XmlElement(name = "type") public Collection<ObjectiveType> getTypes() { return types = nonNullCollection(types, ObjectiveType.class); }