- added size of vocabulary to vocabulary view

- fixed bad terms in vocabulary-from-titles autogeneration
pull/1/head
Michael Peter Christen 13 years ago
parent be928815fc
commit 743b0ec89f

@ -107,6 +107,7 @@ function updatepage(str) {
<dl>
<dt>Vocabulary Name</dt><dd>#[name]#</dd>
<dt>File</dt><dd>#(editable)#[automatically generated, not stored, cannot be edited]::#[file]##(/editable)#</dd>
<dt>Size</dt><dd>#[size]#</dd>
<dt>Namespace</dt><dd>#[namespace]#</dd>
<dt>Predicate</dt><dd>#[predicate]#</dd>
<dt>Prefix</dt><dd>#[prefix]#</dd>

@ -90,6 +90,7 @@ public class Vocabulary_p {
if (discoverFromTitle || discoverFromTitleSplitted) {
URIMetadataRow m = segment.urlMetadata().load(u.hash());
if (m != null) t = m.dc_title();
if (t.endsWith(".jpg") || t.endsWith(".gif")) continue;
}
if (discoverFromAuthor) {
URIMetadataRow m = segment.urlMetadata().load(u.hash());
@ -101,6 +102,7 @@ public class Vocabulary_p {
String[] ts = t.split(" ");
for (String s: ts) {
if (s.length() == 0) continue;
if (s.endsWith(".jpg") || s.endsWith(".gif")) continue;
table.put(s, new Tagging.SOTuple("", u0));
}
} else if (discoverFromAuthor) {
@ -189,6 +191,7 @@ public class Vocabulary_p {
prop.putHTML("edit_editable_file", editable ? vocabulary.getFile().getAbsolutePath() : "");
prop.putHTML("edit_name", vocabulary.getName());
prop.putHTML("edit_namespace", vocabulary.getNamespace());
prop.put("edit_size", vocabulary.size());
prop.putHTML("edit_predicate", vocabulary.getPredicate());
prop.putHTML("edit_prefix", Tagging.DEFAULT_PREFIX);
prop.putHTML("edit_editable_objectspace", vocabulary.getObjectspace() == null ? "" : vocabulary.getObjectspace());

@ -169,9 +169,8 @@ public class Tagging {
}
public void updateTerm(String term, String[] synonyms) {
public int size() {
return this.term2objectlink.size();
}
private File tmpFile() {

Loading…
Cancel
Save