Examples of GOMLink


Examples of org.apache.lucene.gdata.gom.GOMLink

     * combination of type and hreflang attribute values.
     */

    {
      // two identical alternate links missing
      GOMLink link = new GOMLinkImpl();
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      this.impl.addLink(link);
      // one is allowed
      this.impl.processEndElement();
      // add a second link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("next");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      // one is alternate the other is next
      this.impl.processEndElement();

      // a second "identical" alternate link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      try {
        this.impl.processEndElement();
        fail("missing elements");
      } catch (GDataParseException e) {
        //
View Full Code Here

Examples of org.apache.lucene.gdata.gom.GOMLink

     * combination of type and hreflang attribute values.
     */

    {
      // two identical alternate links missing
      GOMLink link = new GOMLinkImpl();
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      this.impl.addLink(link);
      // one is allowed
      this.impl.processEndElement();
      // add a second link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("next");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      // one is alternate the other is next
      this.impl.processEndElement();

      // a second "identical" alternate link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      try {
        this.impl.processEndElement();
        fail("missing elements");
      } catch (GDataParseException e) {
        //
View Full Code Here

Examples of org.apache.lucene.gdata.gom.GOMLink

    /*
     * atom:entry elements that contain no child atom:content element MUST
     * contain at least one atom:link element with a rel attribute value of
     * "alternate".
     */
    GOMLink link = new GOMLinkImpl();
    link.setRel("alternate");
    this.impl.addLink(link);
    /*
     * atom:entry elements MUST contain exactly one atom:title element.
     */
    this.impl.setTitle(new GOMTitleImpl());
    /*
     * atom:entry elements MUST contain exactly one atom:updated element.
     */
    this.impl.setUpdated(new GOMUpdatedImpl());

    {
      this.impl.setId(null);
      try {
        this.impl.processEndElement();
        fail("id is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setId(new GOMIdImpl());
    }

    {
      this.impl.getLinks().clear();
      try {
        this.impl.processEndElement();
        fail("link alternate is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setContent(new GOMContentImpl());
      this.impl.processEndElement();
      this.impl.setContent(null);
      this.impl.addLink(link);
    }

    {
      this.impl.setTitle(null);
      try {
        this.impl.processEndElement();
        fail("title is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setTitle(new GOMTitleImpl());
    }
    {
      this.impl.setUpdated(null);
      try {
        this.impl.processEndElement();
        fail("Updated is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setUpdated(new GOMUpdatedImpl());
    }

    /*
     * atom:entry elements MUST NOT contain more than one atom:link element
     * with a rel attribute value of "alternate" that has the same
     * combination of type and hreflang attribute values.
     */
    link.setType("test");
    link.setHrefLang("http://www.apache.org");
    this.impl.addLink(link);
    try {
      this.impl.processEndElement();
      fail("doulbe alternate link with same type and hreflang");

View Full Code Here

Examples of org.apache.lucene.gdata.gom.GOMLink

      FactoryConfigurationError {
    // write a whole feed and check if all elements are written
    this.impl.addAuthor(new GOMAuthorImpl());
    this.impl.addCategory(new GOMCategoryImpl());
    this.impl.addContributor(new GOMContributorImpl());
    GOMLink link = new GOMLinkImpl();
    link.setRel("enclosure");
    link.setHref("test");
    link.setType("testType");
    this.impl.addLink(link);
    this.impl.setContent(new GOMContentImpl());
    this.impl.setId(new GOMIdImpl());
    this.impl.setRights(new GOMRightsImpl());
    GOMSummaryImpl summ = new GOMSummaryImpl();
View Full Code Here

Examples of org.apache.lucene.gdata.gom.GOMLink

     * combination of type and hreflang attribute values.
     */

    {
      // two identical alternate links missing
      GOMLink link = new GOMLinkImpl();
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      this.impl.addLink(link);
      // one is allowed
      this.impl.processEndElement();
      // add a second link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("next");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      // one is alternate the other is next
      this.impl.processEndElement();

      // a second "identical" alternate link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      try {
        this.impl.processEndElement();
        fail("missing elements");
      } catch (GDataParseException e) {
        //
View Full Code Here

Examples of org.apache.lucene.gdata.gom.GOMLink

     * combination of type and hreflang attribute values.
     */

    {
      // two identical alternate links missing
      GOMLink link = new GOMLinkImpl();
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      this.impl.addLink(link);
      // one is allowed
      this.impl.processEndElement();
      // add a second link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("next");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      // one is alternate the other is next
      this.impl.processEndElement();

      // a second "identical" alternate link
      link = new GOMLinkImpl();
      this.impl.addLink(link);
      link.setRel("alternate");
      link.setHrefLang("http://www.apache.org");
      link.setType("text/html");
      try {
        this.impl.processEndElement();
        fail("missing elements");
      } catch (GDataParseException e) {
        //
View Full Code Here

Examples of org.apache.lucene.gdata.gom.GOMLink

    /*
     * atom:entry elements that contain no child atom:content element MUST
     * contain at least one atom:link element with a rel attribute value of
     * "alternate".
     */
    GOMLink link = new GOMLinkImpl();
    link.setRel("alternate");
    this.impl.addLink(link);
    /*
     * atom:entry elements MUST contain exactly one atom:title element.
     */
    this.impl.setTitle(new GOMTitleImpl());
    /*
     * atom:entry elements MUST contain exactly one atom:updated element.
     */
    this.impl.setUpdated(new GOMUpdatedImpl());

    {
      this.impl.setId(null);
      try {
        this.impl.processEndElement();
        fail("id is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setId(new GOMIdImpl());
    }

    {
      this.impl.getLinks().clear();
      try {
        this.impl.processEndElement();
        fail("link alternate is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setContent(new GOMContentImpl());
      this.impl.processEndElement();
      this.impl.setContent(null);
      this.impl.addLink(link);
    }

    {
      this.impl.setTitle(null);
      try {
        this.impl.processEndElement();
        fail("title is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setTitle(new GOMTitleImpl());
    }
    {
      this.impl.setUpdated(null);
      try {
        this.impl.processEndElement();
        fail("Updated is missing");
      } catch (GDataParseException e) {
        //
      }
      this.impl.setUpdated(new GOMUpdatedImpl());
    }

    /*
     * atom:entry elements MUST NOT contain more than one atom:link element
     * with a rel attribute value of "alternate" that has the same
     * combination of type and hreflang attribute values.
     */
    link.setType("test");
    link.setHrefLang("http://www.apache.org");
    this.impl.addLink(link);
    try {
      this.impl.processEndElement();
      fail("doulbe alternate link with same type and hreflang");

View Full Code Here

Examples of org.apache.lucene.gdata.gom.GOMLink

      FactoryConfigurationError {
    // write a whole feed and check if all elements are written
    this.impl.addAuthor(new GOMAuthorImpl());
    this.impl.addCategory(new GOMCategoryImpl());
    this.impl.addContributor(new GOMContributorImpl());
    GOMLink link = new GOMLinkImpl();
    link.setRel("enclosure");
    link.setHref("test");
    link.setType("testType");
    this.impl.addLink(link);
    this.impl.setContent(new GOMContentImpl());
    this.impl.setId(new GOMIdImpl());
    this.impl.setRights(new GOMRightsImpl());
    GOMSummaryImpl summ = new GOMSummaryImpl();
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.