Package org.xml.sax

Examples of org.xml.sax.SAXParseException


                  className = "java.lang.Object";
                }
                ((ObjectDataType) dataType).setClassName(className);
            }
        } catch (ClassNotFoundException e) {
            throw new SAXParseException(
                "Could not find datatype " + name, parser.getLocator());
        } catch (InstantiationException e) {
            throw new SAXParseException(
                "Could not instantiate datatype " + name, parser.getLocator());
        } catch (IllegalAccessException e) {
            throw new SAXParseException(
                "Could not access datatype " + name, parser.getLocator());
        }
       
        typeable.setType(dataType);
        return dataType;
View Full Code Here


    NodeContainer nodeContainer = (NodeContainer) parser.getParent();
    Node fromNode = nodeContainer.getNode( new Long(fromId) );
    Node toNode = nodeContainer.getNode( new Long(toId) );

    if ( fromNode == null ) {
      throw new SAXParseException( "Node '" + fromId + "'cannot be found",
                                 parser.getLocator() );
    }
    if ( toNode == null ) {
      throw new SAXParseException( "Node '" + toId + "' cannot be found",
                             parser.getLocator() );
    }

    ConnectionImpl connection = new ConnectionImpl(fromNode, fromType,toNode, toType);
    connection.setMetaData("bendpoints", bendpoints);
View Full Code Here

    private Object restoreValue(String text, DataType dataType, ExtensibleXmlParser parser) throws SAXException {
        if (text == null || "".equals(text)) {
            return null;
        }
        if (dataType == null) {
            throw new SAXParseException(
                "Null datatype", parser.getLocator());
        }
        return dataType.readValue(text);
    }
View Full Code Here

          Element actionXml = (Element) xmlNode;
          DroolsAction action = ActionNodeHandler.extractAction(actionXml);
          ((ActionExceptionHandler) exceptionHandler).setAction(action);
          }
    } else {
      throw new SAXParseException("Unknown exception handler type " + type, parser.getLocator());
    }
   
    if (faultVariable != null && faultVariable.length() > 0) {
      exceptionHandler.setFaultVariable(faultVariable);
    }
View Full Code Here

        final String x = element.getAttribute("x");
        if (x != null && x.length() != 0) {
            try {
                node.setMetaData("x", new Integer(x));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'x' attribute", parser.getLocator());
            }
        }
        final String y = element.getAttribute("y");
        if (y != null && y.length() != 0) {
            try {
                node.setMetaData("y", new Integer(y));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'y' attribute", parser.getLocator());
            }
        }
        final String width = element.getAttribute("width");
        if (width != null && width.length() != 0) {
            try {
                node.setMetaData("width", new Integer(width));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'width' attribute", parser.getLocator());
            }
        }
        final String height = element.getAttribute("height");
        if (height != null && height.length() != 0) {
            try {
                node.setMetaData("height", new Integer(height));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'height' attribute", parser.getLocator());
            }
        }
        final String color = element.getAttribute("color");
        if (color != null && color.length() != 0) {
            try {
                node.setMetaData("color", new Integer(color));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'color' attribute", parser.getLocator());
            }
        }
    }
View Full Code Here

        if ("in".equals(type)) {
            mappable.addInMapping(toName, fromName);
        } else if ("out".equals(type)) {
            mappable.addOutMapping(fromName, toName);
        } else {
            throw new SAXParseException(
                "Unknown mapping type " + type, parser.getLocator());
        }
        return null;
    }   
View Full Code Here

        if (swimlaneContext != null) {
            Swimlane swimlane = new Swimlane();
            swimlane.setName(name);
            swimlaneContext.addSwimlane(swimlane);
        } else {
            throw new SAXParseException(
                "Could not find default swimlane context.", parser.getLocator());
        }
       
        return null;
    }   
View Full Code Here

                variables = new ArrayList<Variable>();
                variableScope.setVariables(variables);
            }
            variables.add(variable);
        } else {
            throw new SAXParseException(
                "Could not find default variable scope.", parser.getLocator());
        }
       
        return variable;
    }   
View Full Code Here

        final String x = element.getAttribute("x");
        if (x != null && x.length() != 0) {
            try {
                node.setMetaData("x", new Integer(x));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'x' attribute", parser.getLocator());
            }
        }
        final String y = element.getAttribute("y");
        if (y != null && y.length() != 0) {
            try {
                node.setMetaData("y", new Integer(y));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'y' attribute", parser.getLocator());
            }
        }
        final String width = element.getAttribute("width");
        if (width != null && width.length() != 0) {
            try {
                node.setMetaData("width", new Integer(width));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'width' attribute", parser.getLocator());
            }
        }
        final String height = element.getAttribute("height");
        if (height != null && height.length() != 0) {
            try {
                node.setMetaData("height", new Integer(height));
            } catch (NumberFormatException exc) {
                throw new SAXParseException("<" + localName + "> requires an Integer 'height' attribute", parser.getLocator());
            }
        }
    }
View Full Code Here

          final Resource bundleData = resourceManager.create(key.getParent(), null, DocumentBundle.class);
          report.setBundle((DocumentBundle) bundleData.getResource());
        }
        catch (ResourceException e)
        {
          getRootHandler().warning(new SAXParseException
              ("Unable to load the bundle. Bundle data may be unavailable.", getLocator()));
        }
      }
    }
    else
View Full Code Here

TOP

Related Classes of org.xml.sax.SAXParseException

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.