Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.AttributesImpl


        }
    }

    public void testInvalidValueDescriptor() {
        methodSetUp();
        AttributesImpl attrs = new AttributesImpl();
        attrs.addAttribute("", "desc", "desc", "", "desc");
        attrs.addAttribute("", "cst", "cst", "", "");
        try {
            h.startElement("", "LDC", "", attrs);
            h.endElement("", "LDC", "");
            fail();
        } catch (SAXException e) {
View Full Code Here


        }
    }

    public void testInvalidValue() {
        methodSetUp();
        AttributesImpl attrs = new AttributesImpl();
        attrs.addAttribute("", "desc", "desc", "", "Ljava/lang/String;");
        attrs.addAttribute("", "cst", "cst", "", "\\");
        try {
            h.startElement("", "LDC", "", attrs);
            h.endElement("", "LDC", "");
            fail();
        } catch (SAXException e) {
View Full Code Here

  }

  private void fireEvents() throws SAXException
  {
    contentHandler.startPrefixMapping("", NS_OUTPUT);
    contentHandler.startElement(NS_OUTPUT, OUTPUT, OUTPUT, new AttributesImpl());

    stackNode.toXML(contentHandler);

    contentHandler.endElement(NS_OUTPUT, OUTPUT, OUTPUT);
    contentHandler.endPrefixMapping("");
View Full Code Here

import net.sourceforge.ganttproject.GanttTreeTable;

class GanttChartViewSaver extends SaverBase {

    void save(GanttTreeTable treeTable, TransformerHandler handler) throws SAXException {
        AttributesImpl attrs = new AttributesImpl();
        startElement("taskdisplaycolumns", handler);
        final List displayedColumns = treeTable.getDisplayColumns();
        if (displayedColumns != null) {
            for (int i=0; i<displayedColumns.size(); i++) {
                GanttTreeTable.DisplayedColumn dc = (GanttTreeTable.DisplayedColumn)displayedColumns.get(i);
View Full Code Here

import net.sourceforge.ganttproject.resource.ProjectResource;

class VacationSaver extends SaverBase {

    void save(IGanttProject project, TransformerHandler handler) throws SAXException {
        AttributesImpl attrs = new AttributesImpl();
        startElement("vacations", handler);
        ProjectResource[] resources = project.getHumanResourceManager().getResourcesArray();
        for (int i = 0; i < resources.length; i++) {
            HumanResource p = (HumanResource) resources[i];
            if (p.getDaysOff() != null)
View Full Code Here

* @author bard
*/
class ViewSaver extends SaverBase {
    public void save(UIFacade facade, TransformerHandler handler)
            throws SAXException {
        AttributesImpl attrs = new AttributesImpl();
        addAttribute("zooming-state", facade.getZoomManager().getZoomState()
                .getPersistentName(), attrs);
        addAttribute("id", "gantt-chart", attrs);
        emptyElement("view", attrs, handler);
       
View Full Code Here

      endElement("view", handler);
       
    }

    protected void writeColumns(TableHeaderUIFacade visibleFields, TransformerHandler handler) throws SAXException {
      AttributesImpl attrs = new AttributesImpl();
      int totalWidth = 0;
      for (int i=0; i<visibleFields.getSize(); i++) {
        if (visibleFields.getField(i).isVisible()) {
          totalWidth += visibleFields.getField(i).getWidth();
        }
View Full Code Here

import net.sourceforge.ganttproject.resource.ResourceColumn;

class ResourceSaver extends SaverBase {

    void save(IGanttProject project, TransformerHandler handler) throws SAXException {
        final AttributesImpl attrs = new AttributesImpl();
        startElement("resources", handler);
        saveCustomColumnDefinitions(project, handler);
        ProjectResource[] resources = project.getHumanResourceManager().getResourcesArray();
        for (int i = 0; i < resources.length; i++) {
            HumanResource p = (HumanResource) resources[i];
View Full Code Here

        endElement("resources", handler);
    }

  private void saveCustomProperties(IGanttProject project, HumanResource resource, TransformerHandler handler) throws SAXException {
    //CustomPropertyManager customPropsManager = project.getHumanResourceManager().getCustomPropertyManager();
    AttributesImpl attrs = new AttributesImpl();
    List properties = resource.getCustomProperties();
    for (int i=0; i<properties.size(); i++) {
      CustomProperty nextProperty = (CustomProperty) properties.get(i);
      CustomPropertyDefinition nextDefinition = nextProperty.getDefinition();
            if (nextProperty.getValue()!=null && !nextProperty.getValue().equals(nextDefinition.getDefaultValue())) {
View Full Code Here

//    HumanResourceManager hrManager = (HumanResourceManager) project.getHumanResourceManager();
//    Map customFields = hrManager.getCustomFields();
//    if (customFields.size()==0) {
//      return;
//    }
        final AttributesImpl attrs = new AttributesImpl();
        //startElement("custom-properties-definition", handler);
    for (int i=0; i<definitions.size(); i++) {
      //ResourceColumn nextField = (ResourceColumn) fields.next();
      CustomPropertyDefinition nextDefinition = (CustomPropertyDefinition) definitions.get(i);
      addAttribute("id", nextDefinition.getID(), attrs);
View Full Code Here

TOP

Related Classes of org.xml.sax.helpers.AttributesImpl

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.