Subversion Repositories XServices

Rev

Rev 92 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 92 Rev 116
-
 
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;
2
 
18
 
3
import java.io.File;
19
import java.io.File;
4
 
-
 
5
import javax.xml.bind.annotation.XmlElement;
20
import javax.xml.bind.annotation.XmlElement;
6
import javax.xml.bind.annotation.XmlRootElement;
21
import javax.xml.bind.annotation.XmlRootElement;
-
 
22
/**
7
import javax.xml.bind.annotation.XmlType;
23
 * @author Brian Rosenberger, bru(at)brutex.de
-
 
24
 *
-
 
25
 */
8
 
-
 
9
@XmlRootElement
-
 
-
 
26
 
-
 
27
 
-
 
28
 
-
 
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;
14
	private long filesize;
34
  private long filesize;
15
	private boolean canWrite;
35
  private boolean canWrite;
16
	private boolean isDirectory;
36
  private boolean isDirectory;
-
 
37
 
17
	
38
  public FileInfoType()
18
	public FileInfoType() {
39
  {
19
	}
40
  }
-
 
41
 
20
	
42
  public FileInfoType(File file)
21
	public FileInfoType(File file) {
43
  {
22
		this.name = file.getName();
44
    this.name = file.getName();
23
		this.path = file.getAbsolutePath().replace('\\', '/');
45
    this.path = file.getAbsolutePath().replace('\\', '/');
24
		this.canWrite = file.canWrite();
46
    this.canWrite = file.canWrite();
-
 
47
    this.filesize = file.length();
25
		this.filesize = file.length();
48
    this.isDirectory = file.isDirectory();
26
		this.isDirectory = file.isDirectory();	}
-
 
27
 
-
 
28
	/**
-
 
29
	 * @return the name
49
  }
30
	 */
50
 
-
 
51
  @XmlElement(name="name")
31
	@XmlElement(name="name")
52
  public String getName()
32
	public String getName() {
53
  {
33
		return name;
54
    return this.name;
34
	}
-
 
35
 
55
  }
36
	/**
56
 
37
	 * @param name the name to set
-
 
38
	 */
57
  public void setName(String name)
39
	public void setName(String name) {
58
  {
40
		this.name = name;
59
    this.name = name;
41
	}
-
 
42
 
-
 
43
	/**
-
 
44
	 * @return the path
60
  }
45
	 */
61
 
-
 
62
  @XmlElement(name="path")
46
	@XmlElement(name="path")
63
  public String getPath()
47
	public String getPath() {
64
  {
48
		return path;
65
    return this.path;
49
	}
-
 
50
 
66
  }
51
	/**
67
 
52
	 * @param path the path to set
-
 
53
	 */
68
  public void setPath(String path)
54
	public void setPath(String path) {
69
  {
55
		this.path = path;
70
    this.path = path;
56
	}
-
 
57
 
-
 
58
	/**
-
 
59
	 * @return the filesize
71
  }
60
	 */
72
 
-
 
73
  @XmlElement(name="size")
61
	@XmlElement(name="size")
74
  public long getFilesize()
62
	public long getFilesize() {
75
  {
63
		return filesize;
76
    return this.filesize;
64
	}
-
 
65
 
77
  }
66
	/**
78
 
67
	 * @param filesize the filesize to set
-
 
68
	 */
79
  public void setFilesize(long filesize)
69
	public void setFilesize(long filesize) {
80
  {
70
		this.filesize = filesize;
81
    this.filesize = filesize;
71
	}
-
 
72
 
-
 
73
	/**
-
 
74
	 * @return the canWrite
82
  }
75
	 */
83
 
-
 
84
  @XmlElement(name="isWritable")
76
	@XmlElement(name="isWritable")
85
  public boolean isCanWrite()
77
	public boolean isCanWrite() {
86
  {
78
		return canWrite;
87
    return this.canWrite;
79
	}
-
 
80
 
-
 
81
	/**
-
 
82
	 * @return the isDirectory
88
  }
83
	 */
89
 
-
 
90
  @XmlElement(name="isDirectory")
84
	@XmlElement(name="isDirectory")
91
  public boolean isDirectory()
85
	public boolean isDirectory() {
92
  {
86
		return isDirectory;
-
 
87
	}
-
 
88
	
-
 
89
	
93
    return this.isDirectory;
90
	
94
  }
91
}
95
}
-
 
96
 
-
 
97
Generated by GNU Enscript 1.6.5.90.
-
 
98
 
-
 
99