Subversion Repositories general

Rev

Rev 240 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

PK
Ù{ç. META-INF/þÊPK
Ù{ç.
×Z6META-INF/MANIFEST.MFManifest-Version: 1.0
Comment: you can view images with this plugin
Transform-To-File: src/plugins/imagePlugin/ImagePluginTransform.xsl
Created-By: 1.4.0 (Sun Microsystems Inc.)
Description: ...(todo)
XMLEditor-Plugin-Name: ImageViewer
Class-Path: 
Transform-Fro-File: src/plugins/imagePlugin/ImagePluginTransformBack.x
 sl
Main-Class: src.plugins.imagePlugin.ImagePlugin

Name: src/plugins/imagePlugin
Specification-Version: 0.4 (05/07/03)
Specification-Title: plugin for XMLEditor
Implementation-Version: 0.2 (05/07/03)
Implementation-Title: src.plugins.imagePlugin
Implementation-Vendor: group5, software practice SS_2003, University B
 ielefeld, Germany
Specification-Vendor: group5, software practice SS_2003, University Bi
 elefeld, Germany

PK
´cç.ó\Äã‹‹)src/plugins/imagePlugin/ImagePlugin.classÊþº¾-3#src/plugins/imagePlugin/ImagePluginjavax/swing/JPanelsrc/gui/PluginInterfaceimageLjava/awt/Image;<init>()VCode      

LineNumberTableLocalVariableTablethis%Lsrc/plugins/imagePlugin/ImagePlugin;main([Ljava/lang/String;)Vjava/lang/SystemoutLjava/io/PrintStream;     main method of image pluginjava/io/PrintStreamprintln(Ljava/lang/String;)V
 args[Ljava/lang/String;init(Lsrc/gui/GuiInterface;)VguiLsrc/gui/GuiInterface;start'(Lorg/w3c/dom/Element;Ljava/util/Map;)VelementLorg/w3c/dom/Element;optionsLjava/util/Map;stopexecuteOptions(Ljava/util/Map;)V
SourceFileImagePlugin.java!  
3*·
±
   7     ²¶!±
"#   "#$%5±'&'()?±+ *+,-.
+±//05±3,-12PK
‘]ç.UÓ«(src/plugins/imagePlugin/ImagePlugin.java/*
* software practice
* ss_2003
* group project: XML-Editor
* $Id: ImagePlugin.java,v 1.1 2003/07/07 09:44:34 swalkenh Exp $
*/

package src.plugins.imagePlugin;

import java.awt.*;
import javax.swing.*;
import java.util.Map;
import org.w3c.dom.Element;

import src.gui.*;

/**
* image plugin shows any images
*
* @author Yulia Klassen
* @author Viktoria Zudova
*/
public class ImagePlugin extends JPanel
                                                 implements PluginInterface
{
        
        private Image image;
        
        public ImagePlugin()
        {
        }
        
        public static void main(String[] args) {
                System.out.println("main method of image plugin");
        }
        
        public void init(GuiInterface gui)
        {
        }
        
        public void start(Element element, Map options)
        {
        }
        
        public void stop()
        {
        }
        
        public void executeOptions(Map options)
        {
        }
        
                
} 
PK
‘]ç.V@ƒÃÃ0src/plugins/imagePlugin/ImagePluginTransform.xsl<!-- status: first working for pictureviewer -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<!-- these parameters can be given from outside -->
<xsl:param name="input">/</xsl:param><!-- eg. /XMLEDITORCONFIGURATION/DEFAULTPLUGIN -->
<xsl:param name="elementnamenew">standardplugin</xsl:param>

<xsl:template match="/">
        <xsl:variable name="levelremaining" select="substring-after($input, '/')" />

        <xsl:message><xsl:value-of select="concat('outside-parameter input: ', $input)"/></xsl:message>
        <xsl:message><xsl:value-of select="concat('outside-parameter elementnamenew: ', $elementnamenew)"/></xsl:message>

        <xsl:for-each select="node()">
                <xsl:call-template name="selecter">
                        <xsl:with-param name="levelremaining" select="$levelremaining" />
                </xsl:call-template>
        </xsl:for-each>
</xsl:template>

<xsl:template name="selecter">
        <xsl:param name="levelremaining" />
        <xsl:variable name="level" select="substring-before( concat($levelremaining, '/'), '/')" />
        <xsl:variable name="nextlevels" select="substring-after($levelremaining, '/')" />
        
        <!-- if this node belongs to the right path
             then work on childs with the selecter -->
        <xsl:if test = "(name() = $level)">
                <xsl:message>selecter-case: belongs to right path</xsl:message>
                <xsl:element name="name()">
                
                        <!-- if this is the last level this is the node which must be converted
                             then convert the node -->
                        <xsl:if test = "( ('' = $nextlevels) 
                                      and not('' = name()) )"><!-- avoid too many tags from matcher -->
                                <xsl:message>selecter-case: last level</xsl:message>
                                <xsl:apply-templates select="self::node()">
                                </xsl:apply-templates>
                        </xsl:if>
                        <!-- else (if there are levels left) work on childs -->
                        <xsl:if test = "not('' = $nextlevels)">
                                <xsl:message>selecter-case: levels left</xsl:message>
                                <xsl:copy>
                                        <xsl:for-each select="attribute::*">
                                                <xsl:attribute name="{name(.)}">
                                                        <xsl:value-of select="self::node()" />
                                                </xsl:attribute>
                                        </xsl:for-each>
                                        <xsl:for-each select="node()">
                                                <xsl:call-template name="selecter">
                                                        <xsl:with-param name="levelremaining" select="$nextlevels" />
                                                </xsl:call-template>
                                        </xsl:for-each>
                                </xsl:copy>
                        </xsl:if>
                </xsl:element>
        </xsl:if>
        <!-- else simply copy the node with childs -->
        <xsl:if test = "not(name() = $level)">
                <xsl:message>selecter-case: must only be copied and never touched in future</xsl:message>
                <xsl:copy-of select="self::node()" />
        </xsl:if>
</xsl:template>

<xsl:template match="PHOTO"><!-- element-plugin association -->
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="name">
                        <xsl:value-of select="@label" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('label'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="Bild"><!-- element-plugin association -->
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="name">
                        <xsl:value-of select="@Name" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@Pfad" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('Name'))">
                        <xsl:if test = "not(name(.) = ('Pfad'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="Picture"><!-- element-plugin association -->
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="name">
                        <xsl:value-of select="@Name" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@Path" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('Name'))">
                        <xsl:if test = "not(name(.) = ('Path'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="IMAGE"><!-- element-plugin association -->
        <xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>PK
‘]ç.WjQμ¼4src/plugins/imagePlugin/ImagePluginTransformBack.xsl<!-- status: first try for pictureviewer -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<!-- these parameters can be given from outside -->
<xsl:param name="input">/</xsl:param><!-- eg. /XMLEDITORCONFIGURATION/DEFAULTPLUGIN -->
<xsl:param name="elementnamenew">standardplugin</xsl:param>

<xsl:template match="/">
        <xsl:variable name="levelremaining" select="substring-after($input, '/')" />

        <xsl:message><xsl:value-of select="concat('outside-parameter input: ', $input)"/></xsl:message>
        <xsl:message><xsl:value-of select="concat('outside-parameter elementnamenew: ', $elementnamenew)"/></xsl:message>

        <xsl:for-each select="node()">
                <xsl:call-template name="selecter">
                        <xsl:with-param name="levelremaining" select="$levelremaining" />
                </xsl:call-template>
        </xsl:for-each>
</xsl:template>

<xsl:template name="selecter">
        <xsl:param name="levelremaining" />
        <xsl:variable name="level" select="substring-before( concat($levelremaining, '/'), '/')" />
        <xsl:variable name="nextlevels" select="substring-after($levelremaining, '/')" />
        
        <!-- if this node belongs to the right path
             then work on childs with the selecter -->
        <xsl:if test = "(name() = $level)">
                <xsl:message>selecter-case: belongs to right path</xsl:message>
                <xsl:element name="name()">
                
                        <!-- if this is the last level this is the node which must be converted
                             then convert the node -->
                        <xsl:if test = "( ('' = $nextlevels) 
                                      and not('' = name()) )"><!-- avoid too many tags from matcher -->
                                <xsl:message>selecter-case: last level</xsl:message>
                                <xsl:apply-templates select="self::node()">
                                </xsl:apply-templates>
                        </xsl:if>
                        <!-- else (if there are levels left) work on childs -->
                        <xsl:if test = "not('' = $nextlevels)">
                                <xsl:message>selecter-case: levels left</xsl:message>
                                <xsl:copy>
                                        <xsl:for-each select="attribute::*">
                                                <xsl:attribute name="{name(.)}">
                                                        <xsl:value-of select="self::node()" />
                                                </xsl:attribute>
                                        </xsl:for-each>
                                        <xsl:for-each select="node()">
                                                <xsl:call-template name="selecter">
                                                        <xsl:with-param name="levelremaining" select="$nextlevels" />
                                                </xsl:call-template>
                                        </xsl:for-each>
                                </xsl:copy>
                        </xsl:if>
                </xsl:element>
        </xsl:if>
        <!-- else simply copy the node with childs -->
        <xsl:if test = "not(name() = $level)">
                <xsl:message>selecter-case: must only be copied and never touched in future</xsl:message>
                <xsl:copy-of select="self::node()" />
        </xsl:if>
</xsl:template>

<xsl:template match="IMAGE"><!-- element-plugin association -->
        <xsl:element name="PHOTO">
                <!-- work on attributes and childs -->
                <xsl:attribute name="label">
                        <xsl:value-of select="@name" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('name'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="IMAGE"><!-- element-plugin association -->
        <xsl:element name="Bild">
                <!-- work on attributes and childs -->
                <xsl:attribute name="Name">
                        <xsl:value-of select="@name" />
                </xsl:attribute>
                <xsl:attribute name="Pfad">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('name'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="IMAGE"><!-- element-plugin association -->
        <xsl:element name="Picture">
                <!-- work on attributes and childs -->
                <xsl:attribute name="Name">
                        <xsl:value-of select="@name" />
                </xsl:attribute>
                <xsl:attribute name="Path">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('name'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="IMAGE"><!-- element-plugin association -->
        <xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>PK

Ù{ç. META-INF/þÊPK

Ù{ç.
×Z6+META-INF/MANIFEST.MFPK

´cç.ó\Äã‹‹)^src/plugins/imagePlugin/ImagePlugin.classPK

‘]ç.UÓ«(0src/plugins/imagePlugin/ImagePlugin.javaPK

‘]ç.V@ƒÃÃ0„src/plugins/imagePlugin/ImagePluginTransform.xslPK

‘]ç.WjQμ¼4•src/plugins/imagePlugin/ImagePluginTransformBack.xslPKê£1