001package jmri.jmrit.signalsystemeditor;
002
003import java.util.ArrayList;
004import java.util.List;
005
006/**
007 * A signal system
008 *
009 * @author Daniel Bergqvist (C) 2022
010 */
011public class SignalSystem {
012
013    private final String _folderName;
014    private String _name;
015    private String _processingInstructionHRef;
016    private String _processingInstructionType;
017    private String _aspectSchema;
018    private String _date;
019    private final List<String> _references = new ArrayList<>();
020    private final Copyright _copyright = new Copyright();
021    private final List<Author> _authors = new ArrayList<>();
022    private final List<Aspect> _aspects = new ArrayList<>();
023    private final List<Revision> _revisions = new ArrayList<>();
024    private final List<ImageType> _imageTypes = new ArrayList<>();
025    private final List<SignalMastType> _signalMastTypes = new ArrayList<>();
026
027    public SignalSystem(String folderName) {
028        this._folderName = folderName;
029    }
030
031    public String getFolderName() {
032        return this._folderName;
033    }
034
035    public void setName(String name) {
036        this._name = name;
037    }
038
039    public String getName() {
040        return this._name;
041    }
042
043    public void setProcessingInstructionHRef(String href) {
044        this._processingInstructionHRef = href;
045    }
046
047    public String getProcessingInstructionHRef() {
048        return _processingInstructionHRef;
049    }
050
051    public void setProcessingInstructionType(String type) {
052        this._processingInstructionType = type;
053    }
054
055    public String getProcessingInstructionType() {
056        return _processingInstructionType;
057    }
058
059    public void setAspectSchema(String schema) {
060        this._aspectSchema = schema;
061    }
062
063    public String getAspectSchema() {
064        return this._aspectSchema;
065    }
066
067    public void setDate(String date) {
068        this._date = date;
069    }
070
071    public String getDate() {
072        return this._date;
073    }
074
075    public List<String> getReferences() {
076        return this._references;
077    }
078
079    public Copyright getCopyright() {
080        return this._copyright;
081    }
082
083    public List<Author> getAuthors() {
084        return this._authors;
085    }
086
087    public List<Revision> getRevisions() {
088        return this._revisions;
089    }
090
091    public List<Aspect> getAspects() {
092        return this._aspects;
093    }
094
095    public List<ImageType> getImageTypes() {
096        return this._imageTypes;
097    }
098
099    public ImageType getImageType(String type) {
100        for (ImageType imageType : _imageTypes) {
101            if (type.equals(imageType.getType())) {
102                return imageType;
103            }
104        }
105        throw new IllegalArgumentException("Image type '"+type+"' does not exists");
106    }
107
108    public List<SignalMastType> getSignalMastTypes() {
109        return this._signalMastTypes;
110    }
111
112}