private static String toSupersString(Set<String> supers) { String supersStr = StringUtil.join(supers, " "); if (supersStr != null && "".equals(supersStr)) { supersStr = null; } return supersStr; }
private static String toSupersString(Set<String> supers) { String supersStr = StringUtil.join(supers, " "); if (supersStr != null && "".equals(supersStr)) { supersStr = null; } return supersStr; }
/** * Get the item ids from a ReferenceList and make a String for the fulldata ReferenceList. */ private static String makeFulldataRefIds(ReferenceList refs) { return StringUtil.join(refs.getRefIds(), " "); }
/** * Get the item ids from a ReferenceList and make a String for the fulldata ReferenceList. */ private static String makeFulldataRefIds(ReferenceList refs) { return StringUtil.join(refs.getRefIds(), " "); }
private void writeEmptyMapToProperties(Properties properties, String keySuffix, Map<String, Set<String>> emptyMap) { for (Map.Entry<String, Set<String>> entry: emptyMap.entrySet()) { String key = entry.getKey(); List<String> value = new ArrayList<String>(entry.getValue()); Collections.sort(value, new Comparator<Object>() { @Override public int compare(Object arg0, Object arg1) { if (arg0 == null) { return arg1 == null ? 0 : 1; } if (arg1 == null) { return arg0 == null ? 0 : -1; } return arg0.toString().compareTo(arg1.toString()); } }); if (value.size() > 0) { String fields = StringUtil.join(value, FIELD_DELIM); properties.put(key + keySuffix, fields); } } }
private void writeEmptyMapToProperties(Properties properties, String keySuffix, Map<String, Set<String>> emptyMap) { for (Map.Entry<String, Set<String>> entry: emptyMap.entrySet()) { String key = entry.getKey(); List<String> value = new ArrayList<String>(entry.getValue()); Collections.sort(value, new Comparator<Object>() { @Override public int compare(Object arg0, Object arg1) { if (arg0 == null) { return arg1 == null ? 0 : 1; } if (arg1 == null) { return arg0 == null ? 0 : -1; } return arg0.toString().compareTo(arg1.toString()); } }); if (value.size() > 0) { String fields = StringUtil.join(value, FIELD_DELIM); properties.put(key + keySuffix, fields); } } }
listValue = StringUtil.join(encodedList, ","); sb.append(entry.getKey() + "=" + listValue);
this.path = StringUtil.join(newPathBits, "."); this.outers = newPathOuters; initialise();
this.path = StringUtil.join(newPathBits, "."); this.outers = newPathOuters; initialise();
public void testJoin() throws Exception { List<String> list = new ArrayList<String>(); list.add("one"); list.add("two"); list.add("three"); assertEquals("one, two, three", StringUtil.join(list, ", ")); }
/** * using the relationship maps, build each SO term * * @param childIdentifier identifier for child SO term * @return space-delimited list of parents for the given term, or NULL if none */ private String processParents(String childIdentifier) { Set<String> parents = getParentIdentifiers(childIdentifier); Set<String> parentsInModel = new HashSet<String>(); if (parents != null && !parents.isEmpty()) { for (String parentIdentifier : parents) { if (classInModel(parentIdentifier)) { String parentName = getName(parentIdentifier); parentName = TypeUtil.generateClassName(NAMESPACE, parentName); parentsInModel.add(parentName); } } } String parentList = StringUtil.join(parentsInModel, " "); if (StringUtils.isBlank(parentList)) { parentList = null; } return parentList; }
writer.writeAttribute("name", queryName); writer.writeAttribute("model", modelName); writer.writeAttribute("view", StringUtil.join(query.getView(), " ")); if (query.getDescription() != null) { writer.writeAttribute("longDescription", query.getDescription());
writer.writeAttribute("name", queryName); writer.writeAttribute("model", modelName); writer.writeAttribute("view", StringUtil.join(query.getView(), " ")); if (query.getDescription() != null) { writer.writeAttribute("longDescription", query.getDescription());
StringUtil.join(fieldNames, ", ") + (simpleClass ? "" : ", id"), nextCld, tableMaster); doneFieldNames.add(fieldNames.get(0));
/** * Construct a ClassDescriptor that takes on all the properties of <code>cld</code> * without attaching to a particular Model. * * @param cld the ClassDescriptor to clone * @return cloned ClassDescriptor */ protected static ClassDescriptor cloneClassDescriptor(ClassDescriptor cld) { // supers can't be an empty string String supers = StringUtil.join(cld.getSuperclassNames(), " "); if (supers != null && "".equals(supers)) { supers = null; } return new ClassDescriptor(cld.getName(), supers, cld.isInterface(), cloneAttributeDescriptors(cld.getAttributeDescriptors()), cloneReferenceDescriptors(cld.getReferenceDescriptors()), cloneCollectionDescriptors(cld.getCollectionDescriptors())); }
/** * Construct a ClassDescriptor that takes on all the properties of <code>cld</code> * without attaching to a particular Model. * * @param cld the ClassDescriptor to clone * @return cloned ClassDescriptor */ protected static ClassDescriptor cloneClassDescriptor(ClassDescriptor cld) { // supers can't be an empty string String supers = StringUtil.join(cld.getSuperclassNames(), " "); if (supers != null && "".equals(supers)) { supers = null; } return new ClassDescriptor(cld.getName(), supers, cld.isInterface(), cloneAttributeDescriptors(cld.getAttributeDescriptors()), cloneReferenceDescriptors(cld.getReferenceDescriptors()), cloneCollectionDescriptors(cld.getCollectionDescriptors())); }
String supersStr = StringUtil.join(supers, " "); if (supersStr != null && "".equals(supersStr)) { supersStr = null;
String supersStr = StringUtil.join(supers, " "); if (supersStr != null && "".equals(supersStr)) { supersStr = null;