Skip to content

Commit

Permalink
Data Model Deployment 10/16/2021
Browse files Browse the repository at this point in the history
Data models complete! Also adjusted some old ones to make getIndex() standard
  • Loading branch information
Rusettsten committed Oct 16, 2021
1 parent 5f05b79 commit f14011c
Show file tree
Hide file tree
Showing 13 changed files with 379 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class BeamPalette extends Palette {

//Only need the constructor
public BeamPalette(float bpNumIn, String UIDin, String nameIn, boolean absoluteIn, boolean lockedIn) {
super(bpNumIn, UIDin, nameIn, absoluteIn, lockedIn);
public BeamPalette(float bpNumIn, int indexIn, String uidIn) {
super(bpNumIn, indexIn, uidIn);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class ColorPalette extends Palette {

//Only need the constructor
public ColorPalette(float cpNumIn, String UIDin, String nameIn, boolean absoluteIn, boolean lockedIn) {
super(cpNumIn, UIDin, nameIn, absoluteIn, lockedIn);
public ColorPalette(float cpNumIn, int indexIn, String uidIn) {
super(cpNumIn, indexIn, uidIn);
}
}
47 changes: 47 additions & 0 deletions photon/src/main/java/com/strikete/photon/objects/Curve.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.strikete.photon.objects;

public class Curve {

/*
* VARIABLES
*/
private int curveNum;
private int index;
private String uid;
private String label;


/*
* METHODS - GETTERS
*/
public int getCurveNumber() {
return curveNum;
}
public int getIndex() {
return index;
}
public String getUid() {
return uid;
}
public String getLabel() {
return label;
}


/*
* METHODS - SETTER
*/
public void setLabel(String labelIn) {
this.label = labelIn;
}


/*
* CONSTRUCTOR
*/
public Curve(int curveNumIn, int indexIn, String uidIn) {
this.curveNum = curveNumIn;
this.index = indexIn;
this.uid = uidIn;
}
}
66 changes: 44 additions & 22 deletions photon/src/main/java/com/strikete/photon/objects/Effect.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,78 @@ public class Effect {
/*
* VARIABLES
*/
private float fxNum;
private String UID;
private String name;
private String effectType; //TODO: Make enumeration of types
private float effectNum;
private int index;
private String uid;
private String label;
private String effectType;
private String entry;
private String exit;
private String duration;
private String scale;


/*
* METHODS
* METHODS - GETTERS
*/
public float getEffectNum() {
return this.fxNum;
public float getEffectNumber() {
return effectNum;
}
public int getIndex() {
return index;
}
public String getUID() {
return this.UID;
public String getUid() {
return uid;
}
public String getName() {
return this.name;
public String getLabel() {
return label;
}
public String getEffectType() {
return this.effectType;
return effectType;
}
public String getEntry() {
return this.entry;
return entry;
}
public String getExit() {
return this.exit;
return exit;
}
public String getDuration() {
return this.duration;
return duration;
}
public String getScale() {
return this.scale;
return scale;
}


/*
* CONSTRUCTOR
* METHODS - SETTERS
*/
public Effect(float fxNumIn, String UIDin, String nameIn, String effectTypeIn, String entryIn, String exitIn, String durationIn, String scaleIn) {
this.fxNum = fxNumIn;
this.UID = UIDin;
this.name = nameIn;
public void setLabel(String labelIn) {
this.label = labelIn;
}
public void setEffectType(String effectTypeIn) {
this.effectType = effectTypeIn;
}
public void setEntry(String entryIn) {
this.entry = entryIn;
}
public void setExit(String exitIn) {
this.exit = exitIn;
}
public void setDuration(String durationIn) {
this.duration = durationIn;
}
public void setScale(String scaleIn) {
this.scale = scaleIn;
}


}
/*
* CONSTRUCTOR
*/
public Effect(float effectNumIn, int indexIn, String uidIn) {
this.effectNum = effectNumIn;
this.index = indexIn;
this.uid = uidIn;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class FocusPalette extends Palette {

//Only need the constructor
public FocusPalette(float fpNumIn, String UIDin, String nameIn, boolean absoluteIn, boolean lockedIn) {
super(fpNumIn, UIDin, nameIn, absoluteIn, lockedIn);
public FocusPalette(float fpNumIn, int indexIn, String uidIn) {
super(fpNumIn, indexIn, uidIn);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Group {
public float getGroupNumber() {
return groupNum;
}
public float getIndexNumber() {
public float getIndex() {
return index;
}
public String getUid() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class IntensityPalette extends Palette {

//Only need the constructor
public IntensityPalette(float ipNumIn, String UIDin, String nameIn, boolean absoluteIn, boolean lockedIn) {
super(ipNumIn, UIDin, nameIn, absoluteIn, lockedIn);
public IntensityPalette(float ipNumIn, int indexIn, String uidIn) {
super(ipNumIn, indexIn, uidIn);
}
}
47 changes: 47 additions & 0 deletions photon/src/main/java/com/strikete/photon/objects/MagicSheet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.strikete.photon.objects;

public class MagicSheet {

/*
* VARIABLES
*/
private int magicSheetNum;
private int index;
private String uid;
private String label;


/*
* METHODS - GETTERS
*/
public int getMagicSheetNumber() {
return magicSheetNum;
}
public int getIndex() {
return index;
}
public String getUid() {
return uid;
}
public String getLabel() {
return label;
}


/*
* METHODS - SETTER
*/
public void setLabel(String labelIn) {
this.label = labelIn;
}


/*
* CONSTRUCTOR
*/
public MagicSheet(int magicSheetNumIn, int indexIn, String uidIn) {
this.magicSheetNum = magicSheetNumIn;
this.index = indexIn;
this.uid = uidIn;
}
}
108 changes: 77 additions & 31 deletions photon/src/main/java/com/strikete/photon/objects/Palette.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,108 @@

import java.util.ArrayList;

public class Palette {
public class Palette implements CsvLevelDataSetter {

/*
* VARIABLES
*/
private float paletteNum;
private String UID;
private String name;
private int index;
private String uid;
private String label;
private boolean absolute;
private boolean locked;
private ArrayList<Channel> channels = new ArrayList<Channel>();
private ArrayList<Effect> effects = new ArrayList<Effect>();
private ArrayList<Integer> channelList = new ArrayList<Integer>();
private ArrayList<Integer> byTypeChannelList = new ArrayList<Integer>();
private ArrayList<Integer> channels = new ArrayList<Integer>();
private ArrayList<String> parameters = new ArrayList<String>();
private ArrayList<Float> levels = new ArrayList<Float>();


/*
* METHODS
* METHODS - GETTERS
*/

public float getPaletteNum() {
return this.paletteNum;
public float getPaletteNumber() {
return paletteNum;
}
public String getUID() {
return this.UID;
public int getIndex() {
return index;
}
public String getName() {
return this.name;
public String getUid() {
return uid;
}
public String getLabel() {
return label;
}
public boolean getAbsolute() {
return this.absolute;
return absolute;
}
public boolean getLocked() {
return this.locked;
return locked;
}
public Channel getChannel(int indexNum) {
return channels.get(indexNum);
public ArrayList<Integer> getChannelList() {
return channelList;
}
public int getChannelCount() {
return channels.size();
public ArrayList<Integer> getByTypeChannelList() {
return byTypeChannelList;
}
public int getEffectCount() {
return effects.size();
public ArrayList<Integer> getChannels() {
return channels;
}
public void addChannel(Channel channelIn) {
channels.add(channelIn);
public ArrayList<String> getParameters() {
return parameters;
}
public void addEffect(Effect effectIn) {
effects.add(effectIn);
public ArrayList<Float> getLevels() {
return levels;
}


/*
* CONSTRUCTOR
* METHODS - SETTERS
*/
public Palette(float paletteNumIn, String UIDin, String nameIn, boolean absoluteIn, boolean lockedIn) {
this.paletteNum = paletteNumIn;
this.UID = UIDin;
this.name = nameIn;
public void setLabel(String labelIn) {
this.label = labelIn;
}
public void setAbsolute(boolean absoluteIn) {
this.absolute = absoluteIn;
}
public void setLocked(boolean lockedIn) {
this.locked = lockedIn;
}
}
public void setChannelList(ArrayList<Integer> channelListIn) {
this.channelList = channelListIn;
}
public void setByTypeChannelList(ArrayList<Integer> byTypeChannelListIn) {
this.byTypeChannelList = byTypeChannelListIn;
}
public void setChannels(ArrayList<Integer> channelsIn) {
this.channels = channelsIn;
}
public void setParamters(ArrayList<String> parametersIn) {
this.parameters = parametersIn;
}
public void setLevels(ArrayList<Float> levelsIn) {
this.levels = levelsIn;
}


/*
* METHODS - INTERFACES
*/
@Override
public void addCsvLevelData(int channelIn, String parameterIn, float levelIn) {
this.channels.add(channelIn);
this.parameters.add(parameterIn);
this.levels.add(levelIn);
}


/*
* CONSTRUCTOR
*/
public Palette(float paletteNumIn, int indexIn, String uidIn) {
this.paletteNum = paletteNumIn;
this.index = indexIn;
this.uid = uidIn;
}
}
Loading

0 comments on commit f14011c

Please sign in to comment.