public static void populateNames(Names names, AnnotatedObject<?, ?> annotatedObject) { String shortLabel = getShortLabelFromNames(names); if (names == null && (annotatedObject instanceof Experiment) ) { shortLabel = createExperimentTempShortLabel(); } if ( ! ( annotatedObject instanceof Institution ) ) { if ( shortLabel != null ) { shortLabel = shortLabel.toLowerCase(); } } annotatedObject.setShortLabel(shortLabel); if (names != null) { annotatedObject.setFullName(names.getFullName()); Class<?> aliasClass = AnnotatedObjectUtils.getAliasClassType(annotatedObject.getClass()); AliasConverter aliasConverter = new AliasConverter(getInstitution(annotatedObject), aliasClass); populateAliases(names.getAliases(), annotatedObject, aliasConverter); } }
public static void populateNames(Names names, AnnotatedObject<?, ?> annotatedObject, AliasConverter aliasConverter) { String shortLabel = getShortLabelFromNames(names); if (names == null && (annotatedObject instanceof Experiment) ) { shortLabel = createExperimentTempShortLabel(); } if ( ! ( annotatedObject instanceof Institution ) ) { if ( shortLabel != null ) { shortLabel = shortLabel.toLowerCase(); } } annotatedObject.setShortLabel(shortLabel); if (names != null) { annotatedObject.setFullName(names.getFullName()); if (aliasConverter == null){ Class<?> aliasClass = AnnotatedObjectUtils.getAliasClassType(annotatedObject.getClass()); aliasConverter = new AliasConverter(getInstitution(annotatedObject), aliasClass); } populateAliases(names.getAliases(), annotatedObject, aliasConverter); } }
clone.setShortLabel(ao.getShortLabel()); clone.setFullName(ao.getFullName());
clone.setShortLabel(ao.getShortLabel()); clone.setFullName(ao.getFullName());