package org.simantics.plant3d.utils; public class Item { public enum Type{EQUIPMENT,INLINE,TURN,END,NOZZLE}; private String uri; private String name; private String label; private Type type; private boolean code = false; private boolean variable = false; private boolean modifiable = false; private boolean sizeChange = false; private boolean rotated = false; public Item(String type, String name) { this.uri = type; this.name = name; } public Item(String type, String name, String label) { this.uri = type; this.name = name; this.label = label; } public String getUri() { return uri; } public String getName() { return name; } public Type getType() { return type; } public void setType(Type type) { this.type = type; } public boolean isCode() { return code; } public void setCode(boolean code) { this.code = code; } public boolean isVariable() { return variable; } public void setVariable(boolean variable) { this.variable = variable; } public boolean isModifiable() { return modifiable; } public void setModifiable(boolean modifiable) { this.modifiable = modifiable; } public boolean isSizeChange() { return sizeChange; } public void setSizeChange(boolean sizeChange) { this.sizeChange = sizeChange; } public boolean isRotated() { return rotated; } public void setRotated(boolean rotated) { this.rotated = rotated; } @Override public boolean equals(Object obj) { if (obj.getClass() != getClass()) return false; return uri.equals(((Item)obj).uri); } @Override public int hashCode() { return uri.hashCode(); } public String getLabel() { return label; } }