/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <gmd:MD_Format>} 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 DefaultFormat getElement() { return DefaultFormat.castOrCopy(metadata); }
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <mrd:MD_Format>} 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 DefaultFormat getElement() { return DefaultFormat.castOrCopy(metadata); }
/** * Creates the distribution format object if it does not already exists, then returns it. * * @return the distribution format (never {@code null}). */ private DefaultFormat format() { DefaultFormat df = DefaultFormat.castOrCopy(format); if (df == null) { format = df = new DefaultFormat(); } return df; }
/** * Creates the distribution format object if it does not already exists, then returns it. * * @return the distribution format (never {@code null}). */ private DefaultFormat format() { DefaultFormat df = DefaultFormat.castOrCopy(format); if (df == null) { format = df = new DefaultFormat(); } return df; }
/** * Sets the file format. The given name should be a short name like "GeoTIFF". * The long name will be inferred from the given short name, if possible. * Storage location is: * * <ul> * <li>{@code metadata/identificationInfo/resourceFormat/formatSpecificationCitation/alternateTitle}</li> * </ul> * * @param abbreviation the format short name or abbreviation, or {@code null} for no-operation. * @throws MetadataStoreException if this method can not connect to the {@code jdbc/SpatialMetadata} database. * Callers should generally handle this exception as a recoverable one (i.e. log a warning and continue). * * @see #addCompression(CharSequence) */ public final void setFormat(final String abbreviation) throws MetadataStoreException { if (abbreviation != null && abbreviation.length() != 0) { if (format == null) { format = MetadataSource.getProvided().lookup(Format.class, abbreviation); /* * Additional step for converting deprecated "name" and "specification" into non-deprecated properties. * This step is not required on SIS branches that depend on development branches of GeoAPI 3.1 or 4.0. */ format = DefaultFormat.castOrCopy(format); } } }
format = DefaultFormat.castOrCopy(format); } else { addFormatName(abbreviation);