Package org.apache.abdera.model

Examples of org.apache.abdera.model.Element.discard()


      } else {
        addSimpleExtension(CODE,Integer.toString(code));
      }
    } else {
      Element element = getExtension(CODE);
      if (element != null) element.discard();
    }
    return this;
  }
  /**
 
View Full Code Here


      } else {
        addSimpleExtension(MESSAGE,message);
      }
    } else {
      Element element = getExtension(MESSAGE);
      if (element != null) element.discard();
    }
    return this;
  }
 
  /**
 
View Full Code Here

        }

        // remove all opensearch elements before signing
        for (Element e : feed
                .getExtensions("http://a9.com/-/spec/opensearch/1.1/")) {
            e.discard();
        }

        // set logo and/or icon
        if (contentIds.length > 0) {
            String url = Common.toEntryIdString(entry.getId()) + '/'
View Full Code Here

    if (complete) {
      if (!isComplete(feed)) feed.addExtension(COMPLETE);
    } else {
      if (isComplete(feed)) {
        Element ext = feed.getExtension(COMPLETE);
        ext.discard();
      }
    }
  }
 
  /**
 
View Full Code Here

    if (archive) {
      if (!isArchive(feed)) feed.addExtension(ARCHIVE);
    } else {
      if (isArchive(feed)) {
        Element ext = feed.getExtension(ARCHIVE);
        ext.discard();
      }
    }
  }

  /**
 
View Full Code Here

 
  private static void addW3CPosition(ExtensibleElement element, Position position) {
    if (!(position instanceof Point))
      throw new IllegalArgumentException("The W3C Encoding only supports Points");
    Element el = element.getExtension(QNAME_W3C_LAT);
    if (el != null) el.discard();
    el = element.getExtension(QNAME_W3C_LONG);
    if (el != null) el.discard();   
    Point point = (Point) position;
   
    ExtensibleElement p = element.addExtension(QNAME_W3C_POINT);
View Full Code Here

    if (!(position instanceof Point))
      throw new IllegalArgumentException("The W3C Encoding only supports Points");
    Element el = element.getExtension(QNAME_W3C_LAT);
    if (el != null) el.discard();
    el = element.getExtension(QNAME_W3C_LONG);
    if (el != null) el.discard();   
    Point point = (Point) position;
   
    ExtensibleElement p = element.addExtension(QNAME_W3C_POINT);
    p.addSimpleExtension(QNAME_W3C_LAT, Double.toString(point.getCoordinate().getLatitude()));
    p.addSimpleExtension(QNAME_W3C_LONG, Double.toString(point.getCoordinate().getLongitude()));
View Full Code Here

    if (complete) {
      if (!isComplete(feed)) feed.addExtension(COMPLETE);
    } else {
      if (isComplete(feed)) {
        Element ext = feed.getExtension(COMPLETE);
        ext.discard();
      }
    }
  }
 
  /**
 
View Full Code Here

    if (archive) {
      if (!isArchive(feed)) feed.addExtension(ARCHIVE);
    } else {
      if (isArchive(feed)) {
        Element ext = feed.getExtension(ARCHIVE);
        ext.discard();
      }
    }
  }

  /**
 
View Full Code Here

 
  private static void addW3CPosition(Entry entry, Position position) {
    if (!(position instanceof Point))
      throw new IllegalArgumentException("The W3C Encoding only supports Points");
    Element el = entry.getExtension(QNAME_W3C_LAT);
    if (el != null) el.discard();
    el = entry.getExtension(QNAME_W3C_LONG);
    if (el != null) el.discard();   
    Point point = (Point) position;
   
    ExtensibleElement p = entry.addExtension(QNAME_W3C_POINT);
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.