All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.anno4j.model.ExternalWebResourceSupport Maven / Gradle / Ivy

Go to download

Read and write API for W3C Web Annotation Data Model (http://www.w3.org/TR/annotation-model/) and W3C Open Annotation Data Model (http://www.openannotation.org/spec/core/)

There is a newer version: 2.4
Show newest version
package com.github.anno4j.model;

import java.util.HashSet;

/**
 * Support class for the ExternalWebResource interface.
 */
public abstract class ExternalWebResourceSupport extends CreationProvenanceSupport implements ExternalWebResource {

    /**
     * {@inheritDoc}
     */
    @Override
    public void addLanguage(String language) {
        HashSet languages = new HashSet<>();

        if(this.getLanguages() != null) {
            languages.addAll(this.getLanguages());
        }

        languages.add(language);
        this.setLanguages(languages);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy