예제 #1
0
 private void addPending(StringBuilder pending) {
   if (pending.length() == 0) {
     return;
   }
   atoms.add(AtomText.create(pending.toString(), fontConfiguration));
   pending.setLength(0);
 }
 @Override
 public String toString() {
   StringBuffer buffer = new StringBuffer();
   buffer.append("[AtomFeed ");
   if (id != null) {
     buffer.append("id:" + id + "\n");
   }
   if (updated != null) {
     buffer.append("updated:" + updated + "\n");
   }
   if (title != null) {
     buffer.append("title:" + title.toString());
   }
   if (rights != null) {
     buffer.append("rights:" + rights.toString());
   }
   if (subtitle != null) {
     buffer.append("subtitle:" + subtitle.toString());
   }
   if (generator != null) {
     buffer.append("generator:" + generator + "\n");
   }
   if (icon != null) {
     buffer.append("icon:" + icon + "\n");
   }
   if (logo != null) {
     buffer.append("logo:" + logo + "\n");
   }
   for (AtomPerson author : authors) {
     buffer.append(author.toString());
   }
   for (AtomPerson contributor : contributors) {
     buffer.append(contributor.toString());
   }
   for (AtomCategory category : categories) {
     buffer.append(category.toString());
   }
   for (AtomLink link : links) {
     buffer.append(link.toString());
   }
   for (AtomEntry entry : entries) {
     buffer.append(entry.toString());
   }
   buffer.append("]\n");
   return buffer.toString();
 }
예제 #3
0
 public void analyzeAndAdd(String line) {
   if (line == null) {
     throw new IllegalArgumentException();
   }
   line = CharHidder.hide(line);
   if (style.getType() == StripeStyleType.HEADING) {
     atoms.add(AtomText.createHeading(line, fontConfiguration, style.getOrder()));
   } else if (style.getType() == StripeStyleType.HORIZONTAL_LINE) {
     atoms.add(CreoleHorizontalLine.create(fontConfiguration, line, style.getStyle(), skinParam));
   } else {
     modifyStripe(line);
   }
 }
예제 #4
0
 public void addUrl(Url url) {
   atoms.add(AtomText.createUrl(url, fontConfiguration));
 }
예제 #5
0
 public List<Atom> getAtoms() {
   if (atoms.size() == 0) {
     atoms.add(AtomText.create(" ", fontConfiguration));
   }
   return Collections.unmodifiableList(atoms);
 }