public void setTags(String[] tags) { getDocumentModel().put(Crawler.Attributes.TAGS, tags); } }
public String getStatus() { if (getDocumentModel().containsKey(Crawler.Attributes.STATUS)) { return getDocumentModel().get(Crawler.Attributes.STATUS).toString(); } return ""; }
public String getType() { if (getDocumentModel().containsKey(Crawler.Attributes.TYPE)) { return getDocumentModel().get(Crawler.Attributes.TYPE).toString(); } return ""; }
public Object getDate() { return getDocumentModel().get(Crawler.Attributes.DATE); }
public void setDate(Date date) { getDocumentModel().put(Crawler.Attributes.DATE, date); }
public Object getTags() { return getDocumentModel().get(Crawler.Attributes.TAGS); }
@Override public void processHeader(final ParserContext context) { Map<String, Object> contents = context.getDocumentModel(); contents.put(Attributes.TYPE, "post"); contents.put(Attributes.STATUS, "published"); contents.put(Attributes.TITLE, "Rendering engine missing"); contents.put(Attributes.DATE, new Date()); contents.put(Attributes.TAGS, new String[0]); contents.put(Attributes.ID, context.getFile().getName()); }
public void setDefaultStatus() { getDocumentModel().put(Crawler.Attributes.STATUS, getConfig().getDefaultStatus()); }
public void setDefaultType() { getDocumentModel().put(Crawler.Attributes.TYPE, getConfig().getDefaultType()); }
/** * Process the header of the file. * * @param context the parser context */ private void processDefaultHeader(ParserContext context) { for (String line : context.getFileLines()) { if (hasHeaderSeparator(line)) { break; } processHeaderLine(line, context.getDocumentModel()); } }
return context.getDocumentModel();
final Asciidoctor asciidoctor = getEngine(options); DocumentHeader header = asciidoctor.readDocumentHeader(context.getFile()); Map<String, Object> documentModel = context.getDocumentModel(); if (header.getDocumentTitle() != null) { documentModel.put("title", header.getDocumentTitle().getCombined());
public void setTags(String[] tags) { getDocumentModel().put(Crawler.Attributes.TAGS, tags); } }
public Object getTags() { return getDocumentModel().get(Crawler.Attributes.TAGS); }
public Object getDate() { return getDocumentModel().get(Crawler.Attributes.DATE); }
public String getStatus() { if (getDocumentModel().containsKey(Crawler.Attributes.STATUS)) { return getDocumentModel().get(Crawler.Attributes.STATUS).toString(); } return ""; }
public String getType() { if (getDocumentModel().containsKey(Crawler.Attributes.TYPE)) { return getDocumentModel().get(Crawler.Attributes.TYPE).toString(); } return ""; }
@Override public void processHeader(final ParserContext context) { Map<String, Object> contents = context.getDocumentModel(); contents.put(Attributes.TYPE, "post"); contents.put(Attributes.STATUS, "published"); contents.put(Attributes.TITLE, "Rendering engine missing"); contents.put(Attributes.DATE, new Date()); contents.put(Attributes.TAGS, new String[0]); contents.put(Attributes.ID, context.getFile().getName()); }
public void setDefaultType() { getDocumentModel().put(Crawler.Attributes.TYPE, getConfig().getDefaultType()); }
/** * Process the header of the file. * * @param context the parser context */ private void processDefaultHeader(ParserContext context) { for (String line : context.getFileLines()) { if (hasHeaderSeparator(line)) { break; } processHeaderLine(line, context.getDocumentModel()); } }