/** * create a record for technical reports * * @param authors the authors * @param title the title * @param date the date * @param series the series * @param number the number * * @param direct direct? * @param publisher the publisher * @param uri the uri * @param doi the doi * @param issn the issn */ BibTechReport( final boolean direct, final BibAuthors authors, final String title, final BibDate date, final String series, final String number, final String issn, final BibOrganization publisher, final URI uri, final String doi) { super(direct, authors, title, date, publisher, uri, doi); this.m_series = (direct ? series : TextUtils.normalize(series)); this.m_number = (direct ? number : TextUtils.normalize(number)); this.m_issn = (direct ? issn : TextUtils.normalize(issn)); }
/** {@inheritDoc} */ @Override protected void postProcess( final Set<IStyle> usedStyles, final ArrayListView<ImmutableAssociation<Path, IFileType>> paths) { Path path; String s; char ch; int i; try { for (final String name : new String[] {_XHTML10Document.CSS_DEFAULT, _XHTML10Document.CSS_PRINT}) { path = PathUtils.normalize(this.getDocumentFolder().resolve(name)); try (final OutputStream os = PathUtils.openOutputStream(path)) { try (final OutputStreamWriter osw = new OutputStreamWriter(os)) { try (final BufferedWriter bw = new BufferedWriter(osw)) { this.__createStyles(bw, usedStyles); try (final InputStream is = _XHTML10Document.class.getResourceAsStream(name)) { try (final InputStreamReader isr = new InputStreamReader(is)) { try (final BufferedReader br = new BufferedReader(isr)) { while ((s = br.readLine()) != null) { s = TextUtils.prepare(s); if (s != null) { i = s.indexOf(':'); if (i > 0) { ch = ':'; } else { i = s.indexOf('{'); if (i > 0) { ch = '{'; } else { i = s.indexOf('}'); if (i > 0) { ch = '}'; } else { ch = 0; } } } if (i > 0) { bw.write(s.substring(0, i).trim()); bw.write(ch); bw.write(s.substring(i + 1).trim()); } else { bw.write(s); } } } } } } } } } catch (final Throwable t) { ErrorUtils.logError( this.getLogger(), // "Error while building Cascading Style Sheet (CSS) for XHTML 1.0 Document. This will make the document look odd.", //$NON-NLS-1$ t, true, RethrowMode.AS_RUNTIME_EXCEPTION); } this.getFileCollector().addFile(path, EWebFileTypes.CSS); } } finally { super.postProcess(usedStyles, paths); } }