@Override
    public XBELHeader convert(Header source) {
        if (source == null) return null;

        XBELHeader xh = new XBELHeader();

        List<String> authors = source.getAuthors();
        if (hasItems(authors)) {
            XBELAuthorGroup xag = new XBELAuthorGroup();
            List<String> xauthors = xag.getAuthor();
            for (final String author : authors) {
                xauthors.add(author);
            }
            xh.setAuthorGroup(xag);
        }

        List<String> licenses = source.getLicenses();
        if (hasItems(licenses)) {
            XBELLicenseGroup xlg = new XBELLicenseGroup();
            List<String> xlicenses = xlg.getLicense();
            for (final String license : licenses) {
                xlicenses.add(license);
            }
            xh.setLicenseGroup(xlg);
        }

        String contactInfo = source.getContactInfo();
        String copyright = source.getCopyright();
        String description = source.getDescription();
        String disclaimer = source.getDisclaimer();
        String name = source.getName();
        String version = source.getVersion();

        xh.setContactInfo(contactInfo);
        xh.setCopyright(copyright);
        xh.setDescription(description);
        xh.setDisclaimer(disclaimer);
        xh.setName(name);
        xh.setVersion(version);

        return xh;
    }
@ Override public XBELHeader convert ( Header source ) { if ( source == null ) return null ; XBELHeader xh = new XBELHeader ( ) ; List < String > authors = source . getAuthors ( ) ; if ( hasItems ( authors ) ) { XBELAuthorGroup xag = new XBELAuthorGroup ( ) ; List < String > xauthors = xag . getAuthor ( ) ; for ( final String author : authors ) { xauthors . add ( author ) ; } xh . setAuthorGroup ( xag ) ; } List < String > licenses = source . getLicenses ( ) ; if ( hasItems ( licenses ) ) { XBELLicenseGroup xlg = new XBELLicenseGroup ( ) ; List < String > xlicenses = xlg . getLicense ( ) ; for ( final String license : licenses ) { xlicenses . add ( license ) ; } xh . setLicenseGroup ( xlg ) ; } String contactInfo = source . getContactInfo ( ) ; String copyright = source . getCopyright ( ) ; String description = source . getDescription ( ) ; String disclaimer = source . getDisclaimer ( ) ; String name = source . getName ( ) ; String version = source . getVersion ( ) ; xh . setContactInfo ( contactInfo ) ; xh . setCopyright ( copyright ) ; xh . setDescription ( description ) ; xh . setDisclaimer ( disclaimer ) ; xh . setName ( name ) ; xh . setVersion ( version ) ; return xh ; }
{@inheritDoc}