Search in sources :

Example 46 with InternationalString

use of org.opengis.util.InternationalString in project sis by apache.

the class MetadataBuilder method addAbstract.

/**
 * Adds a brief narrative summary of the resource(s).
 * If a summary already exists, the new one will be appended after a new line.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/identificationInfo/abstract}</li>
 * </ul>
 *
 * @param description  the summary of resource(s), or {@code null} for no-operation.
 *
 * @see #addTitle(CharSequence)
 * @see #addPurpose(CharSequence)
 */
public final void addAbstract(final CharSequence description) {
    final InternationalString i18n = trim(description);
    if (i18n != null) {
        final DefaultDataIdentification identification = identification();
        identification.setAbstract(append(identification.getAbstract(), i18n));
    }
}
Also used : InternationalString(org.opengis.util.InternationalString) DefaultDataIdentification(org.apache.sis.metadata.iso.identification.DefaultDataIdentification)

Example 47 with InternationalString

use of org.opengis.util.InternationalString in project sis by apache.

the class MetadataBuilder method addOtherCitationDetails.

/**
 * Adds other information required to complete the citation that is not recorded elsewhere.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/identificationInfo/citation/otherCitationDetails}</li>
 * </ul>
 *
 * @param  details  other details, or {@code null} for no-operation.
 */
public final void addOtherCitationDetails(final CharSequence details) {
    final InternationalString i18n = trim(details);
    if (i18n != null) {
        final DefaultCitation citation = citation();
        citation.setOtherCitationDetails(append(citation.getOtherCitationDetails(), i18n));
    }
}
Also used : InternationalString(org.opengis.util.InternationalString) DefaultCitation(org.apache.sis.metadata.iso.citation.DefaultCitation)

Example 48 with InternationalString

use of org.opengis.util.InternationalString in project sis by apache.

the class MetadataBuilder method addEdition.

/**
 * Adds a version of the resource.
 * If a version already exists, the new one will be appended after a new line.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/identificationInfo/citation/edition}</li>
 * </ul>
 *
 * @param version  the version of resource(s), or {@code null} for no-operation.
 */
public final void addEdition(final CharSequence version) {
    final InternationalString i18n = trim(version);
    if (i18n != null) {
        final DefaultCitation citation = citation();
        citation.setEdition(append(citation.getEdition(), i18n));
    }
}
Also used : InternationalString(org.opengis.util.InternationalString) DefaultCitation(org.apache.sis.metadata.iso.citation.DefaultCitation)

Example 49 with InternationalString

use of org.opengis.util.InternationalString in project sis by apache.

the class MetadataBuilder method addCompression.

/**
 * Adds a compression name.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/identificationInfo/resourceFormat/fileDecompressionTechnique}</li>
 * </ul>
 *
 * @param value  the compression name, or {@code null} for no-operation.
 *
 * @see #setFormat(String)
 */
public final void addCompression(final CharSequence value) {
    final InternationalString i18n = trim(value);
    if (i18n != null) {
        final DefaultFormat format = format();
        format.setFileDecompressionTechnique(append(format.getFileDecompressionTechnique(), i18n));
    }
}
Also used : InternationalString(org.opengis.util.InternationalString) DefaultFormat(org.apache.sis.metadata.iso.distribution.DefaultFormat)

Example 50 with InternationalString

use of org.opengis.util.InternationalString in project sis by apache.

the class MetadataBuilder method addPurpose.

/**
 * Adds a summary of the intentions with which the resource(s) was developed.
 * If a purpose already exists, the new one will be appended after a new line.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/identificationInfo/purpose}</li>
 * </ul>
 *
 * @param intention  the summary of intention(s), or {@code null} for no-operation.
 *
 * @see #addAbstract(CharSequence)
 */
public final void addPurpose(final CharSequence intention) {
    final InternationalString i18n = trim(intention);
    if (i18n != null) {
        final DefaultDataIdentification identification = identification();
        identification.setPurpose(append(identification.getPurpose(), i18n));
    }
}
Also used : InternationalString(org.opengis.util.InternationalString) DefaultDataIdentification(org.apache.sis.metadata.iso.identification.DefaultDataIdentification)

Aggregations

InternationalString (org.opengis.util.InternationalString)86 SimpleInternationalString (org.apache.sis.util.iso.SimpleInternationalString)20 Test (org.junit.Test)17 DefaultCitation (org.apache.sis.metadata.iso.citation.DefaultCitation)13 IdentifiedObject (org.opengis.referencing.IdentifiedObject)10 ArrayList (java.util.ArrayList)7 Locale (java.util.Locale)6 GenericName (org.opengis.util.GenericName)6 Extent (org.opengis.metadata.extent.Extent)5 DefaultDataIdentification (org.apache.sis.metadata.iso.identification.DefaultDataIdentification)4 DependsOnMethod (org.apache.sis.test.DependsOnMethod)4 Vocabulary (org.apache.sis.util.resources.Vocabulary)4 Citation (org.opengis.metadata.citation.Citation)4 IllegalArgumentException (com.sun.star.lang.IllegalArgumentException)3 ResultSet (java.sql.ResultSet)3 HashMap (java.util.HashMap)3 Map (java.util.Map)3 TableAppender (org.apache.sis.io.TableAppender)3 AbstractIdentifiedObject (org.apache.sis.referencing.AbstractIdentifiedObject)3 DataStoreException (org.apache.sis.storage.DataStoreException)3