Package org.apache.abdera

Examples of org.apache.abdera.Abdera.newEntry()


        BidiHelper.getDirection(entry),
        entry.getTitle()));
   

    // there are also direction guessing algorithms available
    entry = abdera.newEntry();
    entry.setTitle(text);
    entry.setLanguage("ar");
   
    System.out.println(BidiHelper.guessDirectionFromJavaBidi(entry.getTitleElement()));
    System.out.println(BidiHelper.guessDirectionFromTextProperties(entry.getTitleElement()));
View Full Code Here


public class Geo {

  public static void main(String... args) throws Exception {
   
    Abdera abdera = new Abdera();
    Entry entry = abdera.newEntry();
    entry.setTitle("Middle of the Ocean");
   
    Point point = new Point(new Coordinate(37.0625,-95.677068));
    GeoHelper.addPosition(entry, point);
   
View Full Code Here

public class Json {

  public static void main(String... args) throws Exception {
   
    Abdera abdera = new Abdera();
    Entry entry = abdera.newEntry();
    entry.newId();
    entry.setTitle("test");
    entry.setContentAsHtml("<b>foo</b>");
    entry.addAuthor("James");
    entry.addCategory("term");
View Full Code Here

public class Thread {

  public static void main(String... args) throws Exception {

    Abdera abdera = new Abdera();
    Entry e1 = abdera.newEntry();
    Entry e2 = abdera.newEntry();
   
    e1.newId();
    e2.newId();
   
View Full Code Here

  public static void main(String... args) throws Exception {

    Abdera abdera = new Abdera();
    Entry e1 = abdera.newEntry();
    Entry e2 = abdera.newEntry();
   
    e1.newId();
    e2.newId();
   
    // Entry e2 is a reply to Entry e1
View Full Code Here

        assertNotNull(LicenseHelper.addUnspecifiedLicense(entry));

        assertFalse(LicenseHelper.hasLicense(entry, license, true));

        entry = abdera.newEntry();
        entry.setSource(feed.getAsSource());

        assertFalse(LicenseHelper.hasLicense(entry, license, false));
        assertTrue(LicenseHelper.hasLicense(entry, license, true));
View Full Code Here

        assertFalse(LicenseHelper.hasLicense(entry, license, false));
        assertTrue(LicenseHelper.hasLicense(entry, license, true));

        boolean died = false;
        entry = abdera.newEntry();
        LicenseHelper.addLicense(entry, license);
        try {
            // will die because the license already exists
            LicenseHelper.addLicense(entry, license);
        } catch (IllegalStateException e) {
View Full Code Here

            died = true;
        }
        assertTrue(died);

        died = false;
        entry = abdera.newEntry();
        LicenseHelper.addUnspecifiedLicense(entry);
        try {
            // will die because the unspecified license already exists
            LicenseHelper.addLicense(entry, license);
        } catch (IllegalStateException e) {
View Full Code Here

            died = true;
        }
        assertTrue(died);

        died = false;
        entry = abdera.newEntry();
        LicenseHelper.addUnspecifiedLicense(entry);
        try {
            // will die because the unspecified license already exists
            LicenseHelper.addUnspecifiedLicense(entry);
        } catch (IllegalStateException e) {
View Full Code Here

public class JSONStreamTest {

    @Test
    public void testJSONStreamContent() throws Exception {
        Abdera abdera = new Abdera();
        Entry entry = abdera.newEntry();

        entry.setContent(new IRI("http://example.org/xml"), "text/xml");

        Writer json = abdera.getWriterFactory().getWriter("json");
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
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.