Package org.opengis.util

Examples of org.opengis.util.InternationalString


    /**
     * Creates the citation to use for testing purpose.
     */
    private static DefaultCitation createCitation() {
        final DefaultCitation citation = new DefaultCitation();
        final InternationalString title = new SimpleInternationalString("Undercurrent");
        citation.setTitle(title);
        citation.setISBN("9782505004509");
        citation.getPresentationForms().add(PresentationForm.DOCUMENT_HARDCOPY);
        citation.getPresentationForms().add(PresentationForm.IMAGE_HARDCOPY);
        citation.getAlternateTitles().add(new SimpleInternationalString("Alt A"));
View Full Code Here


     * @return {@code true} if the given object contains all localized strings found in this
     *         international string.
     */
    public synchronized boolean isSubsetOf(final Object candidate) {
        if (candidate instanceof InternationalString) {
            final InternationalString string = (InternationalString) candidate;
            for (final Map.Entry<Locale,String> entry : localeMap.entrySet()) {
                final Locale locale = entry.getKey();
                final String text   = entry.getValue();
                if (!text.equals(string.toString(locale))) {
                    return false;
                }
            }
        } else if (candidate instanceof CharSequence) {
            final String string = candidate.toString();
View Full Code Here

     */
    private static CharSequence name(final GenericName name) {
        if (name instanceof DefaultLocalName) {
            return ((DefaultLocalName) name).name;
        }
        final InternationalString label = name.toInternationalString();
        return (label != null) ? label : name.toString();
    }
View Full Code Here

     * @return A version inferred from the authority given at construction time, or {@code null} if none.
     */
    @Override
    public String getVersion() {
        if (authority != null) {
            final InternationalString version = authority.getEdition();
            if (version != null) {
                return version.toString();
            }
        }
        return null;
    }
View Full Code Here

    /**
     * @see org.geotools.data.ResourceInfo#getTitle()
     */
    public String getTitle() {
        InternationalString description = info.getFeatureType().getDescription();
        return description == null ? info.getFeatureTypeName() : description.toString();
    }
View Full Code Here

         * Now, constructs the sample dimensions. We will inconditionnaly provides a "nodata"
         * category for floating point images targeting unsigned integers, since we don't know
         * if the user plan to have NaN values. Even if the current image doesn't have NaN values,
         * it could have NaN later if the image uses a writable raster.
         */
        final InternationalString n = SimpleInternationalString.wrap(name);
        NumberRange sourceRange = TypeMap.getRange(sourceType);
        for (int b=0; b<numBands; b++) {
            final Color[] c = colors!=null ? colors[b] : null;
            if (needScaling) {
                sourceRange = NumberRange.create(min[b], max[b]).castTo(sourceRange.getElementClass());
View Full Code Here

     * Creates the view and logs a record.
     */
    private static GridCoverage2D createView(final GridCoverage2D coverage, final RenderedOp view,
            final GridSampleDimension[] targetBands, final int code, final Hints userHints)
    {
        final InternationalString name = coverage.getName();
        if (GridCoverage2D.LOGGER.isLoggable(CoverageProcessor.OPERATION)) {
            // Logs a message using the same level than grid coverage processor.
            final String operation = view.getOperationName();
            final String shortName = operation.substring(operation.lastIndexOf('.') + 1);
            final Locale    locale = coverage.getLocale();
            final LogRecord record = Loggings.getResources(locale).getLogRecord(
                    CoverageProcessor.OPERATION, LoggingKeys.SAMPLE_TRANSCODE_$3, new Object[] {
                        (name != null) ? name.toString(locale) :
                            Vocabulary.getResources(locale).getString(VocabularyKeys.UNTITLED),
                        Integer.valueOf(code), shortName
                    });
            record.setSourceClassName(GridCoverage2D.class.getName());
            record.setSourceMethodName("geophysics");
View Full Code Here

        String description = variableDS.getDescription();
        final StringBuilder sb = new StringBuilder();
        final Set<SampleDimension> sampleDims = new HashSet<SampleDimension>();
        sampleDims.add(new GridSampleDimension(description + ":sd", (Category[]) null, null));

        InternationalString desc = null;
        if (description != null && !description.isEmpty()) {
            desc = new SimpleInternationalString(description);
        }
        final FieldType fieldType = new DefaultFieldType(new NameImpl(getName()), desc, sampleDims);
        sb.append(description != null ? description.toString() + "," : "");
View Full Code Here

        if (name != null) {
            properties.put(IdentifiedObject.NAME_KEY,
                           new NamedIdentifier(authority, name.trim()));
        }
        if (code != null) {
            final InternationalString edition = authority.getEdition();
            final String version = (edition!=null) ? edition.toString() : null;
            properties.put(IdentifiedObject.IDENTIFIERS_KEY,
                           new NamedIdentifier(authority, code.trim(), version));
        }
        if (remarks!=null && (remarks=remarks.trim()).length()!=0) {
            properties.put(IdentifiedObject.REMARKS_KEY, remarks);
View Full Code Here

    @Test
    public void testDescribeIdentity() {
        NameImpl name = new NameImpl("bean", "Identity");
        DescribeProcess describeProcessAnno = IdentityProcess.class.getAnnotation(DescribeProcess.class);

        InternationalString desc = factory.getDescription(name);
        assertTrue(desc.toString().equals(describeProcessAnno.description()));
        InternationalString title = factory.getTitle(name);
        assertTrue(title.toString().equals(describeProcessAnno.title()));

        Map<String, Parameter<?>> params = factory.getParameterInfo(name);
        assertEquals(1, params.size());

        Parameter<?> input = params.get("input");
View Full Code Here

TOP

Related Classes of org.opengis.util.InternationalString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.