merging r10046 to the trunk
This commit is contained in:
parent
4bb5d83e17
commit
c3ebf8eb49
2 changed files with 106 additions and 105 deletions
|
@ -244,21 +244,21 @@ public class FormUtils {
|
||||||
&& (selectedVClassURI.equals(vclass.getURI())) ) {
|
&& (selectedVClassURI.equals(vclass.getURI())) ) {
|
||||||
option.setSelected(true);
|
option.setSelected(true);
|
||||||
}
|
}
|
||||||
String ontologyName = null;
|
String ontologyPrefix = null;
|
||||||
if (vclass.getNamespace() != null) {
|
if (vclass.getNamespace() != null) {
|
||||||
Ontology ont = wadf.getOntologyDao().getOntologyByURI(
|
Ontology ont = wadf.getOntologyDao().getOntologyByURI(
|
||||||
vclass.getNamespace());
|
vclass.getNamespace());
|
||||||
if ( (ont != null) && (ont.getName() != null) ) {
|
if ( (ont != null) && (ont.getPrefix() != null) ) {
|
||||||
ontologyName = ont.getName();
|
ontologyPrefix = ont.getPrefix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StringBuffer classNameBuffer = new StringBuffer();
|
StringBuffer classNameBuffer = new StringBuffer();
|
||||||
|
if (ontologyPrefix != null) {
|
||||||
|
classNameBuffer.append(ontologyPrefix).append(":");
|
||||||
|
}
|
||||||
if (vclass.getName() != null) {
|
if (vclass.getName() != null) {
|
||||||
classNameBuffer.append(vclass.getName());
|
classNameBuffer.append(vclass.getName());
|
||||||
}
|
}
|
||||||
if (ontologyName != null) {
|
|
||||||
classNameBuffer.append(" (").append(ontologyName).append(")");
|
|
||||||
}
|
|
||||||
option.setBody(classNameBuffer.toString());
|
option.setBody(classNameBuffer.toString());
|
||||||
vclassOptionList.add(option);
|
vclassOptionList.add(option);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -71,6 +72,7 @@ public class IndividualTypeRetryController extends BaseEditController {
|
||||||
classNameMap.put(vc.getURI(),vc.getLocalNameWithPrefix());
|
classNameMap.put(vc.getURI(),vc.getLocalNameWithPrefix());
|
||||||
allClassURISet.add(vc.getURI());
|
allClassURISet.add(vc.getURI());
|
||||||
}
|
}
|
||||||
|
|
||||||
allVClasses = null;
|
allVClasses = null;
|
||||||
|
|
||||||
for (Iterator<VClass> indClassIt = ind.getVClasses(false).iterator(); indClassIt.hasNext(); ) {
|
for (Iterator<VClass> indClassIt = ind.getVClasses(false).iterator(); indClassIt.hasNext(); ) {
|
||||||
|
@ -91,7 +93,6 @@ public class IndividualTypeRetryController extends BaseEditController {
|
||||||
foo.setOptionLists(optionMap);
|
foo.setOptionLists(optionMap);
|
||||||
|
|
||||||
List<Option> typeOptionList = new ArrayList<Option>();
|
List<Option> typeOptionList = new ArrayList<Option>();
|
||||||
|
|
||||||
for (Iterator<String> classURIIt = classURIList.iterator(); classURIIt.hasNext();) {
|
for (Iterator<String> classURIIt = classURIList.iterator(); classURIIt.hasNext();) {
|
||||||
String classURI = classURIIt.next();
|
String classURI = classURIIt.next();
|
||||||
Option opt = new Option(classURI,classNameMap.get(classURI));
|
Option opt = new Option(classURI,classNameMap.get(classURI));
|
||||||
|
@ -127,7 +128,7 @@ public class IndividualTypeRetryController extends BaseEditController {
|
||||||
private class OptionCollator implements Comparator {
|
private class OptionCollator implements Comparator {
|
||||||
public int compare (Object o1, Object o2) {
|
public int compare (Object o1, Object o2) {
|
||||||
Collator collator = Collator.getInstance();
|
Collator collator = Collator.getInstance();
|
||||||
return collator.compare( ((Option)o1).getBody() , ((Option)o2).getBody() );
|
return collator.compare( ((Option)o1).getBody().toString().substring(((Option)o1).getBody().toString().indexOf(":")) , ((Option)o2).getBody().toString().substring(((Option)o2).getBody().toString().indexOf(":")) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue