-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'uniparc_light_vd_v2' into TRM-30823-REDUNDANT-FASTA_TST
- Loading branch information
Showing
40 changed files
with
379 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
core-domain/src/main/java/org/uniprot/core/uniparc/SequenceFeatureLocation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.uniprot.core.uniparc; | ||
|
||
import java.io.Serializable; | ||
|
||
public interface SequenceFeatureLocation extends Serializable { | ||
int getStart(); | ||
|
||
int getEnd(); | ||
|
||
String getAlignment(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
core-domain/src/main/java/org/uniprot/core/uniparc/impl/SequenceFeatureLocationBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.uniprot.core.uniparc.impl; | ||
|
||
import org.uniprot.core.Builder; | ||
import org.uniprot.core.uniparc.SequenceFeatureLocation; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class SequenceFeatureLocationBuilder implements Builder<SequenceFeatureLocation> { | ||
|
||
private int start; | ||
private int end; | ||
private String alignment; | ||
|
||
@Nonnull | ||
@Override | ||
public SequenceFeatureLocation build() { | ||
return new SequenceFeatureLocationImpl(start,end,alignment); | ||
} | ||
|
||
public @Nonnull SequenceFeatureLocationBuilder range(int start, int end) { | ||
this.start = start; | ||
this.end = end; | ||
return this; | ||
} | ||
|
||
public @Nonnull SequenceFeatureLocationBuilder start(int start) { | ||
this.start = start; | ||
return this; | ||
} | ||
|
||
public @Nonnull SequenceFeatureLocationBuilder end(int end) { | ||
this.end = end; | ||
return this; | ||
} | ||
|
||
public @Nonnull SequenceFeatureLocationBuilder alignment(String alignment) { | ||
this.alignment = alignment; | ||
return this; | ||
} | ||
|
||
public static @Nonnull SequenceFeatureLocationBuilder from(@Nonnull SequenceFeatureLocation instance) { | ||
return new SequenceFeatureLocationBuilder() | ||
.start(instance.getStart()) | ||
.end(instance.getEnd()) | ||
.alignment(instance.getAlignment()); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
core-domain/src/main/java/org/uniprot/core/uniparc/impl/SequenceFeatureLocationImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.uniprot.core.uniparc.impl; | ||
|
||
import org.uniprot.core.Location; | ||
import org.uniprot.core.uniparc.SequenceFeatureLocation; | ||
|
||
import java.util.Objects; | ||
|
||
public class SequenceFeatureLocationImpl extends Location implements SequenceFeatureLocation{ | ||
|
||
private static final long serialVersionUID = -4804406936471873484L; | ||
private String alignment; | ||
|
||
SequenceFeatureLocationImpl(){ | ||
super(0, 0); | ||
} | ||
|
||
SequenceFeatureLocationImpl(int start, int end, String alignment) { | ||
super(start, end); | ||
this.alignment = alignment; | ||
} | ||
|
||
@Override | ||
public String getAlignment() { | ||
return alignment; | ||
} | ||
|
||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
if (!super.equals(o)) return false; | ||
SequenceFeatureLocationImpl that = (SequenceFeatureLocationImpl) o; | ||
return Objects.equals(alignment, that.alignment); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(super.hashCode(), alignment); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.