Subversion Repositories XServices

Rev

Rev 92 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 92 Rev 116
Line -... Line 1...
-
 
1
/*
-
 
2
 *   Copyright 2013 Brian Rosenberger (Brutex Network)
-
 
3
 *
-
 
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
-
 
5
 *   you may not use this file except in compliance with the License.
-
 
6
 *   You may obtain a copy of the License at
-
 
7
 *
-
 
8
 *       http://www.apache.org/licenses/LICENSE-2.0
-
 
9
 *
-
 
10
 *   Unless required by applicable law or agreed to in writing, software
-
 
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
-
 
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
 
13
 *   See the License for the specific language governing permissions and
-
 
14
 *   limitations under the License.
-
 
15
 */
-
 
16
 
1
package net.brutex.xservices.types;
17
package net.brutex.xservices.types;
Line 2... Line 18...
2
 
18
 
3
import java.io.File;
-
 
4
 
19
import java.io.File;
5
import javax.xml.bind.annotation.XmlElement;
20
import javax.xml.bind.annotation.XmlElement;
-
 
21
import javax.xml.bind.annotation.XmlRootElement;
6
import javax.xml.bind.annotation.XmlRootElement;
22
/**
-
 
23
 * @author Brian Rosenberger, bru(at)brutex.de
-
 
24
 *
-
 
25
 */
Line 7... Line -...
7
import javax.xml.bind.annotation.XmlType;
-
 
8
 
-
 
Line -... Line 26...
-
 
26
 
-
 
27
 
-
 
28
 
9
@XmlRootElement
29
@XmlRootElement
10
public class FileInfoType {
30
public class FileInfoType
11
 
31
{
12
	private String name;
32
  private String name;
13
	private String path;
33
  private String path;
Line 14... Line 34...
14
	private long filesize;
34
  private long filesize;
-
 
35
  private boolean canWrite;
15
	private boolean canWrite;
36
  private boolean isDirectory;
Line 16... Line 37...
16
	private boolean isDirectory;
37
 
-
 
38
  public FileInfoType()
17
	
39
  {
18
	public FileInfoType() {
40
  }
19
	}
41
 
20
	
42
  public FileInfoType(File file)
21
	public FileInfoType(File file) {
43
  {
-
 
44
    this.name = file.getName();
Line 22... Line -...
22
		this.name = file.getName();
-
 
23
		this.path = file.getAbsolutePath().replace('\\', '/');
-
 
24
		this.canWrite = file.canWrite();
-
 
25
		this.filesize = file.length();
45
    this.path = file.getAbsolutePath().replace('\\', '/');
26
		this.isDirectory = file.isDirectory();	}
46
    this.canWrite = file.canWrite();
-
 
47
    this.filesize = file.length();
27
 
48
    this.isDirectory = file.isDirectory();
28
	/**
49
  }
Line 29... Line -...
29
	 * @return the name
-
 
30
	 */
50
 
31
	@XmlElement(name="name")
51
  @XmlElement(name="name")
32
	public String getName() {
-
 
33
		return name;
52
  public String getName()
34
	}
53
  {
Line 35... Line -...
35
 
-
 
36
	/**
-
 
37
	 * @param name the name to set
-
 
38
	 */
54
    return this.name;
39
	public void setName(String name) {
55
  }
-
 
56
 
40
		this.name = name;
57
  public void setName(String name)
41
	}
58
  {
Line 42... Line -...
42
 
-
 
43
	/**
59
    this.name = name;
44
	 * @return the path
60
  }
45
	 */
-
 
46
	@XmlElement(name="path")
61
 
47
	public String getPath() {
62
  @XmlElement(name="path")
Line 48... Line -...
48
		return path;
-
 
49
	}
-
 
50
 
-
 
51
	/**
63
  public String getPath()
52
	 * @param path the path to set
64
  {
-
 
65
    return this.path;
53
	 */
66
  }
54
	public void setPath(String path) {
67
 
Line 55... Line -...
55
		this.path = path;
-
 
56
	}
68
  public void setPath(String path)
57
 
69
  {
58
	/**
-
 
59
	 * @return the filesize
70
    this.path = path;
60
	 */
71
  }
Line 61... Line -...
61
	@XmlElement(name="size")
-
 
62
	public long getFilesize() {
-
 
63
		return filesize;
-
 
64
	}
72
 
65
 
73
  @XmlElement(name="size")
-
 
74
  public long getFilesize()
66
	/**
75
  {
67
	 * @param filesize the filesize to set
76
    return this.filesize;
Line 68... Line -...
68
	 */
-
 
69
	public void setFilesize(long filesize) {
-
 
70
		this.filesize = filesize;
-
 
71
	}
77
  }
72
 
78
 
-
 
79
  public void setFilesize(long filesize)
73
	/**
80
  {
74
	 * @return the canWrite
81
    this.filesize = filesize;
75
	 */
-
 
76
	@XmlElement(name="isWritable")
-
 
77
	public boolean isCanWrite() {
-
 
78
		return canWrite;
82
  }