Package entagged.listing.xml

Examples of entagged.listing.xml.TransformTarget


                    HashMap lang2object = (HashMap) type2lang.get(type);
                    if (lang2object == null) {
                        lang2object = new HashMap();
                        type2lang.put(type, lang2object);
                    }
                    TransformTarget target = (TransformTarget) lang2object
                            .get(lang);
                    if (target == null) {
                        target = new TransformTarget(lang, type);
                        lang2object.put(lang, target);
                    }
                    if (keyStruct.length == 3) {
                        target.setDescription(value);
                    } else {
                        target.setXslFilename(value);
                    }
                }
                // Reordering to Array
                Iterator iterator = type2lang.values().iterator();
                while (iterator.hasNext()) {
View Full Code Here


                String lang = (String) instructions.get(1);
                String source = (String) instructions.get(2);
                String target = (String) instructions.get(3);

                // Search the TransformTarget
                TransformTarget transformTarget = null;
                Iterator it = getTransformTargets().iterator();
                while (it.hasNext() && transformTarget == null) {
                    TransformTarget candidate = (TransformTarget) it.next();
                    if (candidate.getType().equals(type)
                            && candidate.getLanguage().equals(lang)) {
                        transformTarget = candidate;
                    }
                }

                // If no transformationTarget found, print the error and exit.
View Full Code Here

                    && !xslName.equals("none")) {
                Collection transformTargets = XslTransformer
                        .getTransformTargets();
                Iterator it = transformTargets.iterator();
                while (it.hasNext() && this.transformTarget == null) {
                    TransformTarget current = (TransformTarget) it.next();
                    if (current.getXslFilename().equals(xslName))
                        this.transformTarget = current;
                }
            }
            if (sourceDirectory == null) {
                sourceDirectory = "";
View Full Code Here

     * (overridden)
     *
     * @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent)
     */
    public void valueChanged(TreeSelectionEvent e) {
        TransformTarget selected = null;
        if (e.getPath().getLastPathComponent() instanceof DefaultMutableTreeNode) {
            DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.getPath()
                    .getLastPathComponent();
            if (node.getUserObject() instanceof TransformTarget) {
                selected = (TransformTarget) node.getUserObject();
                try {
                    description.getDocument().remove(0,
                            description.getDocument().getLength());
                    description.getDocument().insertString(0,
                            selected.getDescription(),
                            description.getInputAttributes());
                    System.out.println(selected.getDescription());
                } catch (BadLocationException e1) {
                    e1.printStackTrace();
                }
            }
        }
View Full Code Here

         * (overridden)
         *
         * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
         */
        public int compare(Object o1, Object o2) {
            TransformTarget t1 = (TransformTarget) o1;
            TransformTarget t2 = (TransformTarget) o2;
            int result = t1.getLanguage().compareTo(t2.getLanguage());
            if (result == 0) {
                result = t1.getType().compareTo(t2.getType());
            }
            return result;
        }
View Full Code Here

        Collection coll = XslTransformer.getTransformTargets();
        Iterator it = coll.iterator();
        ArrayList clis = new ArrayList();
        ArrayList directs = new ArrayList();
        while (it.hasNext()) {
            TransformTarget current = (TransformTarget) it.next();
            clis.add(new XslCliTest(current, report));
            directs.add(new XslDirectTest(current,report));
        }
        for (int i = 0; i < clis.size(); i++) {
            this.addTest((TestCase) clis.get(i));
View Full Code Here

TOP

Related Classes of entagged.listing.xml.TransformTarget

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.