Package org.apache.abdera.model

Examples of org.apache.abdera.model.Entry.addCategory()


                // let RSS feeds participate in our hashtag conversations
                Matcher matcher = hashtagsExp.matcher(entry.getTitle());
                while (matcher.find()) {
                    // add tag; remove the hash.
                    converted.addCategory(Common.TAG_URN, matcher.group()
                            .substring(1), "Tag");
                }

                // find "link"
                String linkSrc = null;
View Full Code Here


            replacement.addSimpleExtension(new QName(
                    "http://activitystrea.ms/spec/1.0/", "verb", "activity"),
                    "deleted");

            // add reference to deleting id
            replacement.addCategory(Common.MENTION_URN,
                    Common.toEntryUrn(feedId, deletingId), "Mention");

            // write the entry
            storage.updateEntry(feedId, deletedId, replacement.getUpdated(),
                    replacement.toString());
View Full Code Here

            e.setId("toptenvalidators");
            e.setTitle("top ten validators");
            e.addLink("http://b216:8080/reporting/reports/toptenvalidators?alt=application/json",
                      "alternate");
            e.addAuthor("admin");
            e.addCategory("urn:com:systinet:reporting:kind",
                          "urn:com:systinet:reporting:kind:definition",
                          "report definition");
            return e;
        }
View Full Code Here

            e.setId("toptenvalidators");
            e.setTitle("top ten validators");
            e.addLink("http://b216:8080/reporting/reports/toptenvalidators?alt=application/json",
                      "alternate");
            e.addAuthor("admin");
            e.addCategory("urn:com:systinet:reporting:kind",
                          "urn:com:systinet:reporting:kind:definition",
                          "report definition");
            return feed;
        }
View Full Code Here

     * environment in which these instances are embedded.</p>
     */
    public Entry asEntry() {
        Entry entry = abdera.newEntry();
        for (String term : getCategories()) {
            entry.addCategory(CATEGORIES_SCHEME_URI, term, null);
        }
        entry.setContent(getContent());
        for (EmailAddress emailAddress : getEmailAddresses()) {
            entry.addExtension(emailAddress.asElement());
        }
View Full Code Here

    Entry entry = abdera.newEntry();
    entry.newId();
    entry.setTitle("test");
    entry.setContentAsHtml("<b>foo</b>");
    entry.addAuthor("James");
    entry.addCategory("term");
    entry.writeTo("json", System.out);
   
    /**
     * Produces:
     *
 
View Full Code Here

                        + dsv.DatastreamID);

                String altIds =
                        DOTranslationUtility.oneString(dsv.DatastreamAltIDs);
                if (altIds != null && !altIds.equals("")) {
                    dsvEntry.addCategory(MODEL.ALT_IDS.uri, altIds, null);
                }
                if (dsv.DSFormatURI != null && !dsv.DSFormatURI.equals("")) {
                    dsvEntry.addCategory(MODEL.FORMAT_URI.uri,
                                         dsv.DSFormatURI,
                                         null);
View Full Code Here

                        DOTranslationUtility.oneString(dsv.DatastreamAltIDs);
                if (altIds != null && !altIds.equals("")) {
                    dsvEntry.addCategory(MODEL.ALT_IDS.uri, altIds, null);
                }
                if (dsv.DSFormatURI != null && !dsv.DSFormatURI.equals("")) {
                    dsvEntry.addCategory(MODEL.FORMAT_URI.uri,
                                         dsv.DSFormatURI,
                                         null);
                }

                dsvEntry.addCategory(MODEL.LABEL.uri, dsv.DSLabel == null ? ""
View Full Code Here

                    dsvEntry.addCategory(MODEL.FORMAT_URI.uri,
                                         dsv.DSFormatURI,
                                         null);
                }

                dsvEntry.addCategory(MODEL.LABEL.uri, dsv.DSLabel == null ? ""
                        : dsv.DSLabel, null);

                // include checksum if it has a value
                String csType = dsv.getChecksumType();
                if (csType != null && csType.length() > 0
View Full Code Here

                // include checksum if it has a value
                String csType = dsv.getChecksumType();
                if (csType != null && csType.length() > 0
                        && !csType.equals(Datastream.CHECKSUMTYPE_DISABLED)) {
                    dsvEntry.addCategory(MODEL.DIGEST_TYPE.uri, csType, null);
                    dsvEntry.addCategory(MODEL.DIGEST.uri,
                                         dsv.getChecksum(),
                                         null);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.