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

nl.vpro.domain.classification.ClassificationScheme Maven / Gradle / Ivy

Go to download

The classes needed for the 'classification' service used in POMS. This os based on ClassificationScheme xml's as provided by EBU. It at the moment is only used for genres, but it could in principle accommodate other types of classification based on a fixed list.

There is a newer version: 8.3.0
Show newest version
/*
 * Copyright (C) 2014 Licensed under the Apache License, Version 2.0
 * VPRO The Netherlands
 */
package nl.vpro.domain.classification;

import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.*;

import org.checkerframework.checker.nullness.qual.Nullable;

/**
 * @author Roelof Jan Koekoek
 * @since 3.0
 */
@XmlType(propOrder = {
})
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement(name = "ClassificationScheme")
@ToString
public class ClassificationScheme implements TermContainer {

    @XmlElement(name = "Term")
    private List terms;

    @XmlAttribute
    @Nullable
    private String uri;

    public ClassificationScheme(@Nullable String uri, List rootTerms) {
        this.terms = rootTerms;
        this.uri = uri;
    }

    private ClassificationScheme() {
    }

    @Nullable
    public String getUri() {
        return uri;
    }

    @Override
    public List getTerms() {
        if (terms == null) {
            terms = new ArrayList<>();
        }
        return terms;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy