コード例 #1
0
  /** used for cut and paste. */
  public void addObjectFromClipboard(String a_value) throws CircularIncludeException {
    Reader reader = new StringReader(a_value);
    Document document = null;
    try {
      document = UJAXP.getDocument(reader);
    } catch (Exception e) {
      e.printStackTrace();
      return;
    } // try-catch

    Element root = document.getDocumentElement();
    if (!root.getNodeName().equals("clipboard")) {
      return;
    } // if

    Node child;
    for (child = root.getFirstChild(); child != null; child = child.getNextSibling()) {
      if (!(child instanceof Element)) {
        continue;
      } // if
      Element element = (Element) child;

      IGlyphFactory factory = GlyphFactory.getFactory();

      if (XModule.isMatch(element)) {
        EModuleInvoke module = (EModuleInvoke) factory.createXModule(element);
        addModule(module);
        continue;
      } // if

      if (XContour.isMatch(element)) {
        EContour contour = (EContour) factory.createXContour(element);
        addContour(contour);
        continue;
      } // if

      if (XInclude.isMatch(element)) {
        EIncludeInvoke include = (EIncludeInvoke) factory.createXInclude(element);
        addInclude(include);
        continue;
      } // if
    } // while
  }
コード例 #2
0
 /**
  * Creates a DOM document representation of the object.
  *
  * @exception ParserConfigurationException
  * @return Document
  */
 public Document makeDocument() throws ParserConfigurationException {
   Document doc = UJAXP.makeDocument();
   makeElement(doc);
   return (doc);
 }
コード例 #3
0
 /**
  * Initializes the <code>TextTransition</code> by the Reader <code>reader</code>.
  *
  * @param reader
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(Reader reader) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getDocument(reader, UJAXP.FLAG_NAMESPACE_AWARE));
 }
コード例 #4
0
 /**
  * Initializes the <code>TextTransition</code> by the InputSource <code>is</code>.
  *
  * @param is
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(InputSource is) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getDocument(is, UJAXP.FLAG_NAMESPACE_AWARE));
 }
コード例 #5
0
 /**
  * Initializes the <code>TextTransition</code> by the URL <code>url</code>.
  *
  * @param url
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(URL url) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getDocument(url, UJAXP.FLAG_NAMESPACE_AWARE));
 }
コード例 #6
0
ファイル: FtLegal.java プロジェクト: asami/xmlsmartdoc
 /**
  * Initializes the <code>FtLegal</code> by the InputStream <code>in</code>.
  *
  * @param in
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(InputStream in) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getDocument(in, UJAXP.FLAG_NONE));
 }
コード例 #7
0
ファイル: FtLegal.java プロジェクト: asami/xmlsmartdoc
 /**
  * Initializes the <code>FtLegal</code> by the String representation of URI <code>uri</code>.
  *
  * @param uri
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(String uri) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getDocument(uri, UJAXP.FLAG_NONE));
 }
コード例 #8
0
 /**
  * Initializes the <code>Direction</code> by the Reader <code>reader</code>.
  *
  * @param reader
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(Reader reader) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getValidDocument(reader));
 }
コード例 #9
0
 /**
  * Initializes the <code>Direction</code> by the InputSource <code>is</code>.
  *
  * @param is
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(InputSource is) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getValidDocument(is));
 }
コード例 #10
0
 /**
  * Initializes the <code>Direction</code> by the URL <code>url</code>.
  *
  * @param url
  * @exception IOException
  * @exception SAXException
  * @exception ParserConfigurationException
  */
 public void setup(URL url) throws IOException, SAXException, ParserConfigurationException {
   setup(UJAXP.getValidDocument(url));
 }