package ca.corefacility.bioinformatics.irida.web.assembler.resource.sequencefile;

import java.nio.file.Path;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import ca.corefacility.bioinformatics.irida.model.SequenceFile;
import ca.corefacility.bioinformatics.irida.web.assembler.resource.IdentifiableResource;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Resource wrapper for {@link SequenceFile}.
 *
 * @author Franklin Bristow <franklin.bristow@phac-aspc.gc.ca>
 */
@XmlRootElement(name = "sequenceFile")
public class SequenceFileResource extends IdentifiableResource<SequenceFile> {

    public SequenceFileResource() {
        super(new SequenceFile());
    }

    public SequenceFileResource(SequenceFile sequenceFile) {
        super(sequenceFile);
    }

    @XmlElement
    public String getFile() {
        return resource.getFile().toString();
    }

    @XmlElement
    public String getFileName() {
        return resource.getFile().getFileName().toString();
    }

    @JsonIgnore
    public Path getPath() {
        return resource.getFile();
    }
}

@@ -458,16 +458,17 @@
 ile%7D.%0A *
+ 
 %0A * @aut
@@ -646,20 +646,17 @@
 ile%3E %7B%0A%0A
-    
+%09
 public S
@@ -675,32 +675,26 @@
 esource() %7B%0A
-        
+%09%09
 super(new Se
@@ -708,27 +708,21 @@
 ile());%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public S
@@ -770,24 +770,18 @@
 File) %7B%0A
-        
+%09%09
 super(se
@@ -793,27 +793,21 @@
 eFile);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 @XmlElem
@@ -802,36 +802,33 @@
 %7D%0A%0A%09@XmlElement%0A
-    
+%09
 public String ge
@@ -833,32 +833,26 @@
 getFile() %7B%0A
-        
+%09%09
 return resou
@@ -877,27 +877,21 @@
 ring();%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 @XmlElem
@@ -894,20 +894,17 @@
 Element%0A
-    
+%09
 public S
@@ -921,32 +921,26 @@
 ileName() %7B%0A
-        
+%09%09
 return resou
@@ -983,67 +983,658 @@
 ();%0A
-    %7D%0A%0A    @JsonIgnore%0A    public Path getPath() %7B%0A        
+%09%7D%0A%0A%09@XmlElement%0A%09public String getFileType() %7B%0A%09%09return resource.getFileType();%0A%09%7D%0A%0A%09@XmlElement%0A%09public String getEncoding() %7B%0A%09%09return resource.getEncoding();%0A%09%7D%0A%0A%09@XmlElement%0A%09public Integer getTotalSequences() %7B%0A%09%09return resource.getTotalSequences();%0A%09%7D%0A%0A%09@XmlElement%0A%09public Integer getFilteredSequences() %7B%0A%09%09return resource.getFilteredSequences();%0A%09%7D%0A%0A%09@XmlElement%0A%09public Integer getMinLength() %7B%0A%09%09return resource.getMinLength();%0A%09%7D%0A%0A%09@XmlElement%0A%09public Integer getMaxLength() %7B%0A%09%09return resource.getMaxLength();%0A%09%7D%0A%0A%09@XmlElement%0A%09public Short getGcContent() %7B%0A%09%09return resource.getGcContent();%0A%09%7D%0A%0A%09@JsonIgnore%0A%09public Path getPath() %7B%0A%09%09
 retu
@@ -1660,12 +1660,9 @@
 ();%0A
-    
+%09
 %7D%0A%7D%0A

Add new resource fields for sequence files.