Package org.apache.abdera.model

Examples of org.apache.abdera.model.ExtensibleElement


        pos.setAttributeValue("radius", position.getRadius().toString());
    }
  }
 
  private static void addGmlPosition(ExtensibleElement element, Position position) {
    ExtensibleElement pos = element.addExtension(QNAME_WHERE);
    if (position instanceof Point) {
      Point point = (Point) position;
      ExtensibleElement p = pos.addExtension(QNAME_GML_POINT);
      p.addSimpleExtension(QNAME_GML_POS, point.getCoordinate().toString());
    } else if (position instanceof Line) {
      Multiple m = (Multiple) position;
      ExtensibleElement p = pos.addExtension(QNAME_GML_LINESTRING);
      p.addSimpleExtension(QNAME_GML_POSLIST, m.getCoordinates().toString());
    } else if (position instanceof Polygon) {
      Multiple m = (Multiple) position;
      ExtensibleElement p = pos.addExtension(QNAME_GML_POLYGON);
      p = p.addExtension(QNAME_GML_EXTERIOR);
      p = p.addExtension(QNAME_GML_LINEARRING);
      p.addSimpleExtension(QNAME_GML_POSLIST, m.getCoordinates().toString());
    } else if (position instanceof Box) {
      Box m = (Box) position;
      ExtensibleElement p = pos.addExtension(QNAME_GML_ENVELOPE);
      if (m.getLowerCorner() != null)
        p.addSimpleExtension(QNAME_GML_LOWERCORNER,m.getLowerCorner().toString());
      if (m.getUpperCorner() != null)
        p.addSimpleExtension(QNAME_GML_UPPERCORNER, m.getUpperCorner().toString());
    }
    setPositionAttributes(pos,position);
  }
View Full Code Here


    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

        return (org.apache.cxf.management.web.logging.LogRecord)
            context.createUnmarshaller().unmarshal(new StringReader(value));
    }
   
    private LogRecords readLogRecordsExtension(Entry e) throws Exception {
        ExtensibleElement el = e.getExtension(new QName("http://cxf.apache.org/log", "logRecords", "log"));
        LogRecords records = new LogRecords();
        List<org.apache.cxf.management.web.logging.LogRecord> list =
            new ArrayList<org.apache.cxf.management.web.logging.LogRecord>();
        for (Element element : el.getElements()) {
            org.apache.cxf.management.web.logging.LogRecord record =
                new org.apache.cxf.management.web.logging.LogRecord();
            Element loggerName = element.getFirstChild(
                                     new QName("http://cxf.apache.org/log", "loggerName", "log"));
            if (loggerName != null) {
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.ExtensibleElement

Copyright © 2018 www.massapicom. 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.