Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.AttributeListImpl.addAttribute()


    pp.endElement("schema");

    String dbclass = config.getDatabase(false).getClass().getName();
    AttributeListImpl atts = new AttributeListImpl();
    atts.addAttribute("class", "CDATA", dbclass);
    pp.startElement("database", atts);
    pp.endElement("database");

    if (config.isDeduplicationMode())
      for (DataSource src : config.getDataSources())
View Full Code Here


  private static void writeParam(XMLPrettyPrinter pp, String name, String value) {
    if (value == null)
      return;

    AttributeListImpl atts = new AttributeListImpl();
    atts.addAttribute("name", "CDATA", name);
    atts.addAttribute("value", "CDATA", value);
    pp.startElement("param", atts);
    pp.endElement("param");
  }
View Full Code Here

    if (value == null)
      return;

    AttributeListImpl atts = new AttributeListImpl();
    atts.addAttribute("name", "CDATA", name);
    atts.addAttribute("value", "CDATA", value);
    pp.startElement("param", atts);
    pp.endElement("param");
  }

  private static void writeParam(XMLPrettyPrinter pp, String name, int value) {
View Full Code Here

  }

  private static void writeProperty(XMLPrettyPrinter pp, Property prop) {
    AttributeListImpl atts = new AttributeListImpl();
    if (prop.isIdProperty())
      atts.addAttribute("type", "CDATA", "id");
    else if (prop.isIgnoreProperty())
      atts.addAttribute("type", "CDATA", "ignore");

    if (!prop.isIdProperty() &&
        prop.getLookupBehaviour() != Property.Lookup.DEFAULT) {
View Full Code Here

  private static void writeProperty(XMLPrettyPrinter pp, Property prop) {
    AttributeListImpl atts = new AttributeListImpl();
    if (prop.isIdProperty())
      atts.addAttribute("type", "CDATA", "id");
    else if (prop.isIgnoreProperty())
      atts.addAttribute("type", "CDATA", "ignore");

    if (!prop.isIdProperty() &&
        prop.getLookupBehaviour() != Property.Lookup.DEFAULT) {
      String value = prop.getLookupBehaviour().toString().toLowerCase();
      atts.addAttribute("lookup", "CDATA", value);
View Full Code Here

      atts.addAttribute("type", "CDATA", "ignore");

    if (!prop.isIdProperty() &&
        prop.getLookupBehaviour() != Property.Lookup.DEFAULT) {
      String value = prop.getLookupBehaviour().toString().toLowerCase();
      atts.addAttribute("lookup", "CDATA", value);
    }

    pp.startElement("property", atts);
    writeElement(pp, "name", prop.getName());
    if (prop.getComparator() != null)
View Full Code Here

    } else if (src instanceof MongoDBDataSource) {
      name = "data-source";
      MongoDBDataSource mongodb = (MongoDBDataSource) src;
      String klass = mongodb.getClass().getName();
      AttributeListImpl attribs = new AttributeListImpl();
      attribs.addAttribute("class", "CDATA", klass);
      pp.startElement(name, attribs);

      writeParam(pp, "server-address", mongodb.getServerAddress());
      writeParam(pp, "port-number", mongodb.getPortNumber());
      writeParam(pp, "user-name", mongodb.getUserName());
View Full Code Here

    if (src instanceof ColumnarDataSource) {
      // FIXME: this breaks the order...
      for (Column col : ((ColumnarDataSource) src).getColumns()) {
        AttributeListImpl atts = new AttributeListImpl();
        atts.addAttribute("name", "CDATA", col.getName());
        atts.addAttribute("property", "CDATA", col.getProperty());
        if (col.getPrefix() != null)
          atts.addAttribute("prefix", "CDATA", col.getPrefix());
        // FIXME: cleaner really requires object support ... :-(
        if (col.getCleaner() != null)
View Full Code Here

    if (src instanceof ColumnarDataSource) {
      // FIXME: this breaks the order...
      for (Column col : ((ColumnarDataSource) src).getColumns()) {
        AttributeListImpl atts = new AttributeListImpl();
        atts.addAttribute("name", "CDATA", col.getName());
        atts.addAttribute("property", "CDATA", col.getProperty());
        if (col.getPrefix() != null)
          atts.addAttribute("prefix", "CDATA", col.getPrefix());
        // FIXME: cleaner really requires object support ... :-(
        if (col.getCleaner() != null)
          atts.addAttribute("cleaner", "CDATA", col.getCleaner().getClass().getName());
View Full Code Here

      for (Column col : ((ColumnarDataSource) src).getColumns()) {
        AttributeListImpl atts = new AttributeListImpl();
        atts.addAttribute("name", "CDATA", col.getName());
        atts.addAttribute("property", "CDATA", col.getProperty());
        if (col.getPrefix() != null)
          atts.addAttribute("prefix", "CDATA", col.getPrefix());
        // FIXME: cleaner really requires object support ... :-(
        if (col.getCleaner() != null)
          atts.addAttribute("cleaner", "CDATA", col.getCleaner().getClass().getName());
        if (col.isSplit())
          atts.addAttribute("split-on", "CDATA", col.getSplitOn());
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.