|
|
@ -68,22 +68,22 @@ public class Vocabulary_p {
|
|
|
|
boolean discoverFromTitle = post.get("discovermethod", "").equals("title");
|
|
|
|
boolean discoverFromTitle = post.get("discovermethod", "").equals("title");
|
|
|
|
boolean discoverFromTitleSplitted = post.get("discovermethod", "").equals("titlesplitted");
|
|
|
|
boolean discoverFromTitleSplitted = post.get("discovermethod", "").equals("titlesplitted");
|
|
|
|
boolean discoverFromAuthor = post.get("discovermethod", "").equals("author");
|
|
|
|
boolean discoverFromAuthor = post.get("discovermethod", "").equals("author");
|
|
|
|
if (discoveruri != null) {
|
|
|
|
|
|
|
|
Segment segment = sb.index;
|
|
|
|
Segment segment = sb.index;
|
|
|
|
Iterator<DigestURI> ui = segment.urlSelector(discoveruri);
|
|
|
|
Iterator<DigestURI> ui = segment.urlSelector(discoveruri, 600000L, 100000);
|
|
|
|
String t;
|
|
|
|
String t;
|
|
|
|
while (ui.hasNext()) {
|
|
|
|
while (ui.hasNext()) {
|
|
|
|
DigestURI u = ui.next();
|
|
|
|
DigestURI u = ui.next();
|
|
|
|
String u0 = u.toNormalform(true);
|
|
|
|
String u0 = u.toNormalform(true);
|
|
|
|
t = "";
|
|
|
|
t = "";
|
|
|
|
if (discoverFromPath) {
|
|
|
|
if (discoverFromPath) {
|
|
|
|
t = u0.substring(discoverobjectspace.length());
|
|
|
|
int exp = u0.lastIndexOf('.');
|
|
|
|
if (t.indexOf('/') >= 0) continue;
|
|
|
|
if (exp < 0) continue;
|
|
|
|
int p = t.indexOf('.');
|
|
|
|
int slp = u0.lastIndexOf('/', exp);
|
|
|
|
if (p >= 0) t = t.substring(0, p);
|
|
|
|
if (slp < 0) continue;
|
|
|
|
|
|
|
|
t = u0.substring(slp, exp);
|
|
|
|
|
|
|
|
int p;
|
|
|
|
while ((p = t.indexOf(':')) >= 0) t = t.substring(p + 1);
|
|
|
|
while ((p = t.indexOf(':')) >= 0) t = t.substring(p + 1);
|
|
|
|
while ((p = t.indexOf('=')) >= 0) t = t.substring(p + 1);
|
|
|
|
while ((p = t.indexOf('=')) >= 0) t = t.substring(p + 1);
|
|
|
|
if (p >= 0) t = t.substring(p + 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (discoverFromTitle || discoverFromTitleSplitted) {
|
|
|
|
if (discoverFromTitle || discoverFromTitleSplitted) {
|
|
|
|
URIMetadataNode m = segment.fulltext().getMetadata(u.hash());
|
|
|
|
URIMetadataNode m = segment.fulltext().getMetadata(u.hash());
|
|
|
@ -115,7 +115,6 @@ public class Vocabulary_p {
|
|
|
|
table.put(t, new Tagging.SOTuple(Tagging.normalizeTerm(t), u0));
|
|
|
|
table.put(t, new Tagging.SOTuple(Tagging.normalizeTerm(t), u0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Tagging newvoc = new Tagging(discovername, propFile, discoverobjectspace, table);
|
|
|
|
Tagging newvoc = new Tagging(discovername, propFile, discoverobjectspace, table);
|
|
|
|
LibraryProvider.autotagging.addVocabulary(newvoc);
|
|
|
|
LibraryProvider.autotagging.addVocabulary(newvoc);
|
|
|
|
vocabularyName = discovername;
|
|
|
|
vocabularyName = discovername;
|
|
|
|