Package org.dbwiki.exception

Examples of org.dbwiki.exception.WikiFatalException


    try {
      this.write("<" + node.label() + ">");
      this.write(org.dbwiki.lib.XML.maskText(value.getValue()));
      this.writeln("</" + node.label() + ">");
    } catch (java.io.IOException ioException) {
      throw new WikiFatalException(ioException);
    }
  }
View Full Code Here


  public void writeTextNode(DatabaseTextNode node) throws org.dbwiki.exception.WikiException {
    try {
      this.write(org.dbwiki.lib.XML.maskText(node.getValue()));
    } catch (java.io.IOException ioException) {
      throw new WikiFatalException(ioException);
    }
  }
View Full Code Here

    if (!isValidName(schema.label())) {
      throw new WikiSchemaException(WikiSchemaException.SyntaxError, "Invalid entry name " + _root.label());
    }
    String key = schema.path();
    if (_pathMap.containsKey(key)) {
      throw new WikiFatalException("Schema node with duplicate path(" + key + ") added to database schema.");
    }
   
    _pathMap.put(key, schema);   
    _idMap.put(schema.id(), schema);
  }
View Full Code Here

    _root = null;
  }
 
  public void endDocument() throws org.dbwiki.exception.WikiException {
    if (!_readStack.isEmpty()) {
      throw new WikiFatalException("Invalid document format");
    }
  }
View Full Code Here

      throw new WikiFatalException("Invalid document format");
    }
  }

  public void startElement(String label) throws org.dbwiki.exception.WikiException {
    throw new WikiFatalException("Invalid method call: " + this.getClass().getName() + ".startElement(" + label + ")");
  }
View Full Code Here

        } else {
          ((PasteAttributeNode)_readStack.peek()).setValue(node);
        }
        _readStack.push(node);
      } else {
        throw new WikiFatalException("Invalid node type in copy & paste data stream");
      }
    } else if ((label.equals(CopyPasteConstants.ElementLabelNode)) && (attrs.length == 3) && (_databaseInfo != null)) {
      int type = Integer.parseInt(this.getAttribute(attrs, CopyPasteConstants.AttributeLabelType).value());
      String schemaName = this.getAttribute(attrs, CopyPasteConstants.AttributeLabelSchemaNodeName).value();
      PasteNode node = null;
      if (type == CopyPasteConstants.NodeTypeAttribute) {
        node = new PasteAttributeNode(_databaseInfo, schemaName);
      } else if (type == CopyPasteConstants.NodeTypeGroup) {
        node = new PasteGroupNode(_databaseInfo, schemaName);
      } else {
        throw new WikiFatalException("Invalid node type in copy & paste data stream");
      }
      if (_root == null) {
        _root = node;
      } else {
        ((PasteGroupNode)_readStack.peek()).children().add(node);
      }
      _readStack.push(node);
    } else {
      throw new WikiFatalException("Invalid element in copy & paste data stream");
    }
  }
View Full Code Here

    for (int iAttr = 0; iAttr < attrs.length; iAttr++) {
      if (attrs[iAttr].name().equals(name)) {
        return attrs[iAttr];
      }
    }
    throw new WikiFatalException("Missing attribute " + name);
  }
View Full Code Here

    _out = out;
   
    try {
      writeInit();
    } catch (java.io.IOException ioException) {
      throw new WikiFatalException(ioException);
    }
  }
View Full Code Here

        _inputStream = new GZIPInputStream(sourceURL.openStream());
      } else {
        _inputStream = sourceURL.openStream();
      }
    } catch (java.io.IOException ioe) {
      throw new WikiFatalException(ioe);
    }
  }
View Full Code Here

   
    try {
      callbackHandler.parse(_inputStream, _validating, _xmlSchema);
      _inputStream.close();
    } catch (java.io.IOException ioException) {
      throw new WikiFatalException(ioException);
    } catch (org.xml.sax.SAXException saxException) {
      throw new WikiFatalException(saxException);
    }
   
    if (documentHandler.hasException()) {
      throw new WikiFatalException(documentHandler.getException());
    }

    _importHandler.endImport();
  }
View Full Code Here

TOP

Related Classes of org.dbwiki.exception.WikiFatalException

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.