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

com.nedap.archie.rm.directory.Folder Maven / Gradle / Ivy

package com.nedap.archie.rm.directory;

import com.nedap.archie.rm.archetyped.Locatable;
import com.nedap.archie.rm.support.identification.ObjectRef;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

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

/**
 * Created by pieter.bos on 21/06/16.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FOLDER", propOrder = {
        "items",
        "folders"
})
public class Folder extends Locatable {
    @Nullable
    private List items = new ArrayList<>();
    @Nullable
    private List folders = new ArrayList<>();

    @Nullable
    public List getItems() {
        return items;
    }

    public void setItems(@Nullable List items) {
        this.items = items;
    }

    public void addItem(ObjectRef item) {
        this.items.add(item);
    }

    @Nullable
    public List getFolders() {
        return folders;
    }

    public void setFolders(@Nullable List folders) {
        this.folders = folders;
        setThisAsParent(folders, "folders");
    }

    public void addFolder(Folder folder) {
        this.folders.add(folder);
        this.setThisAsParent(folder, "folders");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy