String tags=this.getPublish().getTags();
if (tags.contains(" ")) {
resembleList=new ArrayList();
String tag[]=tags.split(" ");
int repeat = 0;
for (int i = 0; i < tag.length; i++) {
List publishs=this.getPublishService().findResemble(tag[i]);
for (int j = 0; j < publishs.size(); j++) {
for (int j2 = 0; j2 < resembleList.size(); j2++) {
if (resembleList.get(j2).getName().equals(publishs.get(j).getName())) {
repeat++;
}
}
if(repeat == 0){
resembleList.add(publishs.get(j));
}
repeat = 0;
}
}//end for
}else {
resembleList=this.getPublishService().findResemble(tags);
}
|