FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java/xstream-java-xml/src/main/java/com/hmkcode/vo/Article.java at master · cbhe/Java · GitHub
cbhe
Java
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Java
/
xstream-java-xml
/
src
/
main
/
java
/
com
/
hmkcode
/
vo
/
Article.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
84 lines (68 loc) · 1.89 KB
Breadcrumbs
Java
/
xstream-java-xml
/
src
/
main
/
java
/
com
/
hmkcode
/
vo
/
Article.java
Copy path
File metadata and controls
84 lines (68 loc) · 1.89 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package
com
.
hmkcode
.
vo
;
import
java
.
util
.
LinkedList
;
import
java
.
util
.
List
;
import
com
.
thoughtworks
.
xstream
.
annotations
.
XStreamAlias
;
import
com
.
thoughtworks
.
xstream
.
annotations
.
XStreamAsAttribute
;
import
com
.
thoughtworks
.
xstream
.
annotations
.
XStreamConverter
;
import
com
.
thoughtworks
.
xstream
.
annotations
.
XStreamImplicit
;
import
com
.
thoughtworks
.
xstream
.
annotations
.
XStreamOmitField
;
import
com
.
thoughtworks
.
xstream
.
converters
.
basic
.
BooleanConverter
;
@
XStreamAlias
(
"article"
)
public
class
Article
{
@
XStreamAsAttribute
private
String
title
;
@
XStreamAlias
(
"address"
)
private
String
url
;
@
XStreamConverter
(
value
=
BooleanConverter
.
class
,
booleans
={
false
},
strings
={
"yes"
,
"no"
})
private
boolean
published
;
@
XStreamOmitField
private
List
<
String
>
categories
;
@
XStreamImplicit
(
itemFieldName
=
"tag"
)
private
List
<
String
>
tags
;
public
String
getTitle
() {
return
title
;
}
public
void
setTitle
(
String
title
) {
this
.
title
=
title
;
}
public
String
getUrl
() {
return
url
;
}
public
void
setUrl
(
String
url
) {
this
.
url
=
url
;
}
public
boolean
isPublished
() {
return
published
;
}
public
void
setPublished
(
boolean
published
) {
this
.
published
=
published
;
}
public
List
<
String
>
getCategories
() {
return
categories
;
}
public
void
setCategories
(
List
<
String
>
categories
) {
this
.
categories
=
categories
;
}
public
List
<
String
>
getTags
() {
return
tags
;
}
public
void
setTags
(
List
<
String
>
tags
) {
this
.
tags
=
tags
;
}
public
void
addCategory
(
String
category
){
if
(
this
.
categories
==
null
)
this
.
categories
=
new
LinkedList
<
String
>();
this
.
categories
.
add
(
category
);
}
public
void
addTag
(
String
tag
){
if
(
this
.
tags
==
null
)
this
.
tags
=
new
LinkedList
<
String
>();
this
.
tags
.
add
(
tag
);
}
@
Override
public
String
toString
() {
return
"Article [title="
+
title
+
",
\n
url="
+
url
+
",
\n
published="
+
published
+
",
\n
categories="
+
categories
+
",
\n
tags="
+
tags
+
"]"
;
}
}
Back
|
FazBrowse Home
|
New Git URL