private XMLGregorianCalendar toXMLGregorianCalendar(Date date) { return DateUtils.convertToXMLGregorianCalendar(date); }
public void setValue(String value) { this.value = OrcidStringUtils.filterInvalidXMLCharacters(value); }
public static boolean noneNull(Object... objects) { return !anyNull(objects); }
public static <T extends Comparable<T>> int compareObjectsNullSafe(T thisObject, T otherObject) { if (anyNull(thisObject, otherObject)) { return compareNulls(thisObject, otherObject); } return thisObject.compareTo(otherObject); }
private void validateArgs(CmdLineParser parser) throws CmdLineException { if (NullUtils.allNull(fileToLoad, orcid)) { throw new CmdLineException(parser, "At least one of -f | -o must be specificed"); } }
private int compareTypes(String affiliationType, String otherAffiliationType) { if (NullUtils.anyNull(affiliationType, otherAffiliationType)) { return NullUtils.compareNulls(affiliationType, otherAffiliationType); } return affiliationType.compareTo(otherAffiliationType); }
public static XMLGregorianCalendar convertToXMLGregorianCalendar(String dateString) { return convertToXMLGregorianCalendar(dateString, true); }
private void validateArgs(CmdLineParser parser) throws CmdLineException { if (NullUtils.allNull(orcid, orcidsToDelete)) { throw new CmdLineException(parser, "At least one of -f | -o must be specificed"); } }
private int compareNames(String name, String otherName) { if (NullUtils.anyNull(name, otherName)) { return NullUtils.compareNulls(name, otherName); } return name.compareTo(otherName); }
public static XMLGregorianCalendar convertToXMLGregorianCalendarNoTimeZoneNoMillis(Date date) { XMLGregorianCalendar basicCalender = convertToXMLGregorianCalendar(date); basicCalender.setTimezone(DatatypeConstants.FIELD_UNDEFINED); basicCalender.setMillisecond(DatatypeConstants.FIELD_UNDEFINED); return basicCalender; }
private void validateArgs(CmdLineParser parser) throws CmdLineException { if (NullUtils.allNull(workId, worksToDelete)) { throw new CmdLineException(parser, "At least one of -f | -o must be specificed"); } }
private int compareDepartments(String department, String otherDepartment) { if (NullUtils.anyNull(department, otherDepartment)) { return NullUtils.compareNulls(department, otherDepartment); } return department.compareTo(otherDepartment); }
private void validateArgs(CmdLineParser parser) throws CmdLineException { if (NullUtils.allNull(clientDetailsId, doAll, clientIdsFile)) { throw new CmdLineException(parser, "At least one of -c | -a | -f must be specificed"); } }
private int compareTypes(String type, String otherType) { if (NullUtils.anyNull(type, otherType)) { return -NullUtils.compareNulls(type, otherType); } return -type.compareTo(otherType); }
private void validateArgs(CmdLineParser parser) throws CmdLineException { if (NullUtils.allNull(fileToLoad, orcid)) { throw new CmdLineException(parser, "At least one of -f | -o must be specificed"); } }
private int compareLongs(Long l1, Long l2 ) { if (NullUtils.anyNull(l1, l2)) { return NullUtils.compareNulls(l1, l2); } return l1.compareTo(l2); }
private void validateArgs(CmdLineParser parser) throws CmdLineException { if (NullUtils.allNull(fileToLoad, orcid)) { throw new CmdLineException(parser, "At least one of -f | -o must be specificed"); } }
private int compareTitles(String title, String otherTitle) { if (NullUtils.anyNull(title, otherTitle)) { return NullUtils.compareNulls(title, otherTitle); } return title.compareTo(otherTitle); }
private void validateArgs(CmdLineParser parser) throws CmdLineException { if (NullUtils.allNull(fileToLoad, singleOrcidToProcess)) { throw new CmdLineException(parser, "At least one of -f | -o must be specificed"); } }
private int compareStarts(FuzzyDateEntity startDate, FuzzyDateEntity otherStartDate) { if (NullUtils.anyNull(startDate, otherStartDate)) { return NullUtils.compareNulls(startDate, otherStartDate); } return -startDate.compareTo(otherStartDate); }