Skip to content

Commit a14f03a

Browse files
committed
LL-833
1 parent 28ebf40 commit a14f03a

File tree

8 files changed

+1494
-1490
lines changed

8 files changed

+1494
-1490
lines changed

serv/jobs/ss-dataimport/ss-dataimport-impl/src/main/java/at/kc/tugraz/ss/serv/dataimport/impl/evernote/SSDataImportEvernoteNoteContentHandler.java

Lines changed: 87 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -139,91 +139,93 @@ public void handleNoteContent() throws Exception{
139139

140140
public static String parseXHTML(final String path) throws Exception{
141141

142-
BufferedReader br = null;
143-
String result = SSStrU.empty;
142+
return "";
144143

145-
try{
146-
147-
String line, text, tag, tmpTag, href, title;
148-
int tagIndex, tagEndIndex, hrefIndex, hrefEndIndex, titleIndex, titleEndIndex;
149-
150-
br = new BufferedReader(new FileReader(new File(path)));
151-
152-
while((line = br.readLine()) != null){
153-
154-
line = line.trim();
155-
156-
while(line.contains("<")){
157-
158-
if(!line.contains(">")){
159-
throw new Exception("xhtml invalid");
160-
}
161-
162-
tagIndex = line.indexOf("<");
163-
tagEndIndex = line.indexOf(">");
164-
tag = line.substring(tagIndex, tagEndIndex + 1);
165-
tmpTag = line.substring(tagIndex, tagEndIndex + 1);
166-
167-
if(tagIndex != 0){
168-
169-
text = line.substring(0, tagIndex).replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty).trim();
170-
171-
if(!text.isEmpty()){
172-
result += text + SSStrU.backslashRBackslashN;
173-
}
174-
}
175-
176-
while(tmpTag.contains("href=\"")){
177-
178-
hrefIndex = tmpTag.indexOf("href=\"");
179-
hrefEndIndex = tmpTag.indexOf("\"", hrefIndex + 6);
180-
href = tmpTag.substring(hrefIndex + 6, hrefEndIndex);
181-
182-
if(tmpTag.contains("title=\"")){
183-
184-
titleIndex = tmpTag.indexOf("title=\"");
185-
titleEndIndex = tmpTag.indexOf("\"", titleIndex + 7);
186-
title = tmpTag.substring(titleIndex + 7, titleEndIndex);
187-
188-
result += title.replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty) + ": " + SSStrU.backslashRBackslashN;
189-
190-
tmpTag = tmpTag.substring(0, titleIndex) + tmpTag.substring(titleEndIndex + 1, tmpTag.length() - 1);
191-
192-
hrefIndex = tmpTag.indexOf("href=\"");
193-
hrefEndIndex = tmpTag.indexOf("\"", hrefIndex + 6);
194-
href = tmpTag.substring(hrefIndex + 6, hrefEndIndex);
195-
196-
tmpTag = tmpTag.substring(0, hrefIndex) + tmpTag.substring(hrefEndIndex + 1, tmpTag.length() - 1);
197-
198-
result += href + SSStrU.backslashRBackslashN;
199-
200-
}else{
201-
result += "link" + ": " + href + SSStrU.backslashRBackslashN;
202-
203-
tmpTag = tmpTag.substring(0, hrefIndex) + tmpTag.substring(hrefEndIndex + 1, tmpTag.length() - 1);
204-
}
205-
}
206-
207-
line = line.replace(tag, SSStrU.empty).replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty).trim();
208-
}
209-
210-
line = line.replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty).trim();
211-
212-
if(!line.isEmpty()){
213-
result += line + SSStrU.backslashRBackslashN;
214-
}
215-
}
216-
217-
return result;
218-
219-
}catch(Exception error){
220-
SSServErrReg.regErrThrow(error);
221-
return null;
222-
}finally{
223-
224-
if(br != null){
225-
br.close();
226-
}
227-
}
144+
// BufferedReader br = null;
145+
// String result = SSStrU.empty;
146+
//
147+
// try{
148+
//
149+
// String line, text, tag, tmpTag, href, title;
150+
// int tagIndex, tagEndIndex, hrefIndex, hrefEndIndex, titleIndex, titleEndIndex;
151+
//
152+
// br = new BufferedReader(new FileReader(new File(path)));
153+
//
154+
// while((line = br.readLine()) != null){
155+
//
156+
// line = line.trim();
157+
//
158+
// while(line.contains("<")){
159+
//
160+
// if(!line.contains(">")){
161+
// throw new Exception("xhtml invalid");
162+
// }
163+
//
164+
// tagIndex = line.indexOf("<");
165+
// tagEndIndex = line.indexOf(">");
166+
// tag = line.substring(tagIndex, tagEndIndex + 1);
167+
// tmpTag = line.substring(tagIndex, tagEndIndex + 1);
168+
//
169+
// if(tagIndex != 0){
170+
//
171+
// text = line.substring(0, tagIndex).replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty).trim();
172+
//
173+
// if(!text.isEmpty()){
174+
// result += text + SSStrU.backslashRBackslashN;
175+
// }
176+
// }
177+
//
178+
// while(tmpTag.contains("href=\"")){
179+
//
180+
// hrefIndex = tmpTag.indexOf("href=\"");
181+
// hrefEndIndex = tmpTag.indexOf("\"", hrefIndex + 6);
182+
// href = tmpTag.substring(hrefIndex + 6, hrefEndIndex);
183+
//
184+
// if(tmpTag.contains("title=\"")){
185+
//
186+
// titleIndex = tmpTag.indexOf("title=\"");
187+
// titleEndIndex = tmpTag.indexOf("\"", titleIndex + 7);
188+
// title = tmpTag.substring(titleIndex + 7, titleEndIndex);
189+
//
190+
// result += title.replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty) + ": " + SSStrU.backslashRBackslashN;
191+
//
192+
// tmpTag = tmpTag.substring(0, titleIndex) + tmpTag.substring(titleEndIndex + 1, tmpTag.length() - 1);
193+
//
194+
// hrefIndex = tmpTag.indexOf("href=\"");
195+
// hrefEndIndex = tmpTag.indexOf("\"", hrefIndex + 6);
196+
// href = tmpTag.substring(hrefIndex + 6, hrefEndIndex);
197+
//
198+
// tmpTag = tmpTag.substring(0, hrefIndex) + tmpTag.substring(hrefEndIndex + 1, tmpTag.length() - 1);
199+
//
200+
// result += href + SSStrU.backslashRBackslashN;
201+
//
202+
// }else{
203+
// result += "link" + ": " + href + SSStrU.backslashRBackslashN;
204+
//
205+
// tmpTag = tmpTag.substring(0, hrefIndex) + tmpTag.substring(hrefEndIndex + 1, tmpTag.length() - 1);
206+
// }
207+
// }
208+
//
209+
// line = line.replace(tag, SSStrU.empty).replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty).trim();
210+
// }
211+
//
212+
// line = line.replace("&amp;nbsp;", SSStrU.empty).replace("Â", SSStrU.empty).trim();
213+
//
214+
// if(!line.isEmpty()){
215+
// result += line + SSStrU.backslashRBackslashN;
216+
// }
217+
// }
218+
//
219+
// return result;
220+
//
221+
// }catch(Exception error){
222+
// SSServErrReg.regErrThrow(error);
223+
// return null;
224+
// }finally{
225+
//
226+
// if(br != null){
227+
// br.close();
228+
// }
229+
// }
228230
}
229231
}

serv/ss-datatypes/ss-entity/ss-entity-datatypes/src/main/java/at/kc/tugraz/ss/serv/datatypes/entity/datatypes/par/SSEntityUserAddPar.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public void setDescription(final String description) throws Exception{
8383
value = "creation time to be set when adding the entity")
8484
public Long creationTime = null;
8585

86+
public SSEntityUserAddPar() throws Exception{}
87+
8688
public SSEntityUserAddPar(SSServPar par) throws Exception{
8789

8890
super(par);

ss-adapter/ss-adapter-rest-v1/src/main/java/at/kc/tugraz/ss/adapter/rest/v1/SSRestMainV1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public SSRestMainV1() throws Exception{
6666
resourceConfig.register(MultiPartFeature.class);
6767

6868
// SSLogU.info("rest enter");
69-
SSAdapterRestConf.instSet (SSFileU.dirCatalinaBase() + SSVocConf.dirNameConf + "ss-adapter-rest-conf-bp-3.yaml");
69+
SSAdapterRestConf.instSet (SSFileU.dirCatalinaBase() + SSVocConf.dirNameConf + "ss-adapter-rest-conf.yaml");
7070

7171
/* util */
7272
SSMimeTypeU.init();

ss-adapter/ss-adapter-rest-v1/src/main/webapp/api-docs/SSAdapterRESTFile.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,73 @@
44
"basePath" : "http://test-ll.know-center.tugraz.at/bp-3/SSAdapterRest",
55
"resourcePath" : "/SSAdapterRESTFile",
66
"apis" : [ {
7-
"path" : "/fileUserFileWrites",
7+
"path" : "/fileCanWrite",
88
"operations" : [ {
99
"method" : "POST",
10-
"summary" : "retrieve files user currently could replace when uploading respective file again as he is writer",
10+
"summary" : "query whether given file can be downloaded with write access",
1111
"notes" : "",
12-
"type" : "SSFileGetEditingFilesRet",
13-
"nickname" : "fileUserFileWrites",
12+
"type" : "SSFileCanWriteRet",
13+
"nickname" : "fileCanWrite",
1414
"produces" : [ "application/json" ],
1515
"consumes" : [ "application/json" ],
1616
"parameters" : [ {
1717
"name" : "body",
1818
"required" : false,
19-
"type" : "SSFileUserFileWritesPar",
19+
"type" : "SSFileCanWritePar",
2020
"paramType" : "body",
2121
"allowMultiple" : false
2222
} ]
2323
} ]
2424
}, {
25-
"path" : "/fileSetReaderOrWriter",
25+
"path" : "/fileExtGet",
2626
"operations" : [ {
2727
"method" : "POST",
28-
"summary" : "set user being writer or reaader for given file",
28+
"summary" : "retrieve a file's extension",
2929
"notes" : "",
30-
"type" : "SSFileSetReaderOrWriterRet",
31-
"nickname" : "fileSetReaderOrWriter",
30+
"type" : "SSFileExtGetRet",
31+
"nickname" : "fileExtGet",
3232
"produces" : [ "application/json" ],
3333
"consumes" : [ "application/json" ],
3434
"parameters" : [ {
3535
"name" : "body",
3636
"required" : false,
37-
"type" : "SSFileSetReaderOrWriterPar",
37+
"type" : "SSFileExtGetPar",
3838
"paramType" : "body",
3939
"allowMultiple" : false
4040
} ]
4141
} ]
4242
}, {
43-
"path" : "/fileCanWrite",
43+
"path" : "/fileSetReaderOrWriter",
4444
"operations" : [ {
4545
"method" : "POST",
46-
"summary" : "query whether given file can be downloaded with write access",
46+
"summary" : "set user being writer or reaader for given file",
4747
"notes" : "",
48-
"type" : "SSFileCanWriteRet",
49-
"nickname" : "fileCanWrite",
48+
"type" : "SSFileSetReaderOrWriterRet",
49+
"nickname" : "fileSetReaderOrWriter",
5050
"produces" : [ "application/json" ],
5151
"consumes" : [ "application/json" ],
5252
"parameters" : [ {
5353
"name" : "body",
5454
"required" : false,
55-
"type" : "SSFileCanWritePar",
55+
"type" : "SSFileSetReaderOrWriterPar",
5656
"paramType" : "body",
5757
"allowMultiple" : false
5858
} ]
5959
} ]
6060
}, {
61-
"path" : "/fileExtGet",
61+
"path" : "/fileUserFileWrites",
6262
"operations" : [ {
6363
"method" : "POST",
64-
"summary" : "retrieve a file's extension",
64+
"summary" : "retrieve files user currently could replace when uploading respective file again as he is writer",
6565
"notes" : "",
66-
"type" : "SSFileExtGetRet",
67-
"nickname" : "fileExtGet",
66+
"type" : "SSFileGetEditingFilesRet",
67+
"nickname" : "fileUserFileWrites",
6868
"produces" : [ "application/json" ],
6969
"consumes" : [ "application/json" ],
7070
"parameters" : [ {
7171
"name" : "body",
7272
"required" : false,
73-
"type" : "SSFileExtGetPar",
73+
"type" : "SSFileUserFileWritesPar",
7474
"paramType" : "body",
7575
"allowMultiple" : false
7676
} ]

0 commit comments

Comments
 (0)