package jalview.io.xdb.genbank;
/**
- * A short mnemonic name for the entry, chosen to suggest the
- * sequence's definition. Mandatory keyword/exactly one record.
- *
- * <p>The LOCUS field contains a number of different data elements, including locus name,
- * sequence length, molecule type, GenBank division, and modification date. Each element
- * is described below.</p>
- *
+ * A short mnemonic name for the entry, chosen to suggest the sequence's
+ * definition. Mandatory keyword/exactly one record.
+ *
+ * <p>
+ * The LOCUS field contains a number of different data elements, including locus
+ * name, sequence length, molecule type, GenBank division, and modification
+ * date. Each element is described below.
+ * </p>
+ *
*/
-public class GenBankLocus {
- private String name;
- private int sequenceLength;
- private String strand;
- private String moleculeType;
- private boolean linearSequence;
- private String division;
- private String modificationDate;
-
- public GenBankLocus() {
- }
-
- public GenBankLocus(String name, int sequenceLength) {
- this.name = name;
- this.sequenceLength = sequenceLength;
- }
-
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the sequenceLength
- */
- public int getSequenceLength() {
- return sequenceLength;
- }
-
- /**
- * @param sequenceLength the sequenceLength to set
- */
- public void setSequenceLength(int sequenceLength) {
- this.sequenceLength = sequenceLength;
- }
-
- /**
- * @return the strand
- */
- public String getStrand() {
- return strand;
- }
-
- /**
- * @param strand the strand to set
- */
- public void setStrand(String strand) {
- this.strand = strand;
- }
-
- /**
- * @return the moleculeType
- */
- public String getMoleculeType() {
- return moleculeType;
- }
-
- /**
- * @param moleculeType the moleculeType to set
- */
- public void setMoleculeType(String moleculeType) {
- this.moleculeType = moleculeType;
- }
-
- /**
- * @return the linearSequence
- */
- public boolean isLinearSequence() {
- return linearSequence;
- }
-
- /**
- * @param linearSequence the linearSequence to set
- */
- public void setLinearSequence(boolean linearSequence) {
- this.linearSequence = linearSequence;
- }
-
- /**
- * @return the division
- */
- public String getDivision() {
- return division;
- }
-
- /**
- * @param division the division to set
- */
- public void setDivision(String division) {
- this.division = division;
- }
-
- /**
- * @return the modificationDate
- */
- public String getModificationDate() {
- return modificationDate;
- }
-
- /**
- * @param modificationDate the modificationDate to set
- */
- public void setModificationDate(String modificationDate) {
- this.modificationDate = modificationDate;
- }
-
- @Override
- public String toString() {
-
- return String.format("LOCUS %-16s %11d bp %3s %6s %-8s %3s %s",
- this.name, this.sequenceLength, this.strand,
- this.moleculeType, linearSequence?"linear ":"circular",
- this.division, ((modificationDate == null) || (modificationDate.equals("")) ? "" : modificationDate.toUpperCase())
- );
- }
+public class GenBankLocus
+{
+ private String name;
+
+ private int sequenceLength;
+
+ private String strand;
+
+ private String moleculeType;
+
+ private boolean linearSequence;
+
+ private String division;
+
+ private String modificationDate;
+
+ public GenBankLocus()
+ {
+ }
+
+ public GenBankLocus(String name, int sequenceLength)
+ {
+ this.name = name;
+ this.sequenceLength = sequenceLength;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the sequenceLength
+ */
+ public int getSequenceLength()
+ {
+ return sequenceLength;
+ }
+
+ /**
+ * @param sequenceLength
+ * the sequenceLength to set
+ */
+ public void setSequenceLength(int sequenceLength)
+ {
+ this.sequenceLength = sequenceLength;
+ }
+
+ /**
+ * @return the strand
+ */
+ public String getStrand()
+ {
+ return strand;
+ }
+
+ /**
+ * @param strand
+ * the strand to set
+ */
+ public void setStrand(String strand)
+ {
+ this.strand = strand;
+ }
+
+ /**
+ * @return the moleculeType
+ */
+ public String getMoleculeType()
+ {
+ return moleculeType;
+ }
+
+ /**
+ * @param moleculeType
+ * the moleculeType to set
+ */
+ public void setMoleculeType(String moleculeType)
+ {
+ this.moleculeType = moleculeType;
+ }
+
+ /**
+ * @return the linearSequence
+ */
+ public boolean isLinearSequence()
+ {
+ return linearSequence;
+ }
+
+ /**
+ * @param linearSequence
+ * the linearSequence to set
+ */
+ public void setLinearSequence(boolean linearSequence)
+ {
+ this.linearSequence = linearSequence;
+ }
+
+ /**
+ * @return the division
+ */
+ public String getDivision()
+ {
+ return division;
+ }
+
+ /**
+ * @param division
+ * the division to set
+ */
+ public void setDivision(String division)
+ {
+ this.division = division;
+ }
+
+ /**
+ * @return the modificationDate
+ */
+ public String getModificationDate()
+ {
+ return modificationDate;
+ }
+
+ /**
+ * @param modificationDate
+ * the modificationDate to set
+ */
+ public void setModificationDate(String modificationDate)
+ {
+ this.modificationDate = modificationDate;
+ }
+
+ @Override
+ public String toString()
+ {
+
+ return String
+ .format("LOCUS %-16s %11d bp %3s %6s %-8s %3s %s",
+ this.name,
+ this.sequenceLength,
+ this.strand,
+ this.moleculeType,
+ linearSequence ? "linear " : "circular",
+ this.division,
+ ((modificationDate == null)
+ || (modificationDate.equals("")) ? ""
+ : modificationDate.toUpperCase()));
+ }
}