summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhanna <nowakh3d@wp.pl>2013-09-10 11:12:05 (GMT)
committer hanna <nowakh3d@wp.pl>2013-09-10 11:12:05 (GMT)
commitb4067e4cca0172e4c5d769a4db7e72b41cc3235d (patch)
treedb94fbcd003d579b929b1f0a0afbfa95e07b410f
parentfb3feceb283cd97e2f2a86fe2a6620177ca5fb3c (diff)
downloadQCG-Data-b4067e4cca0172e4c5d769a4db7e72b41cc3235d.zip
QCG-Data-b4067e4cca0172e4c5d769a4db7e72b41cc3235d.tar.gz
QCG-Data-b4067e4cca0172e4c5d769a4db7e72b41cc3235d.tar.bz2
metasearch
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form105
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java157
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form97
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java126
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form82
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java431
6 files changed, 0 insertions, 998 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form
deleted file mode 100644
index 173ab2c..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
- <AuxValues>
- <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
- <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
- </AuxValues>
-
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="jScrollPane1" alignment="0" pref="470" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="jScrollPane1" alignment="0" pref="171" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Container class="javax.swing.JScrollPane" name="jScrollPane1">
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
- <SubComponents>
- <Container class="javax.swing.JPanel" name="panel">
- <Properties>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[426, 158]"/>
- </Property>
- </Properties>
-
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" pref="75" max="-2" attributes="0"/>
- <Component id="jComboBox1" min="-2" pref="235" max="-2" attributes="0"/>
- <EmptySpace pref="109" max="32767" attributes="0"/>
- <Component id="btnDel" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- </Group>
- <Group type="102" alignment="0" attributes="0">
- <Component id="btnAdd" min="-2" max="-2" attributes="0"/>
- <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="btnDel" min="-2" max="-2" attributes="0"/>
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace max="-2" attributes="0"/>
- <Component id="jComboBox1" min="-2" max="-2" attributes="0"/>
- </Group>
- </Group>
- <EmptySpace max="-2" attributes="0"/>
- <Component id="btnAdd" min="-2" max="-2" attributes="0"/>
- <EmptySpace pref="109" max="32767" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Component class="javax.swing.JButton" name="btnAdd">
- <Properties>
- <Property name="text" type="java.lang.String" value="+"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddActionPerformed"/>
- </Events>
- </Component>
- <Component class="javax.swing.JButton" name="btnDel">
- <Properties>
- <Property name="text" type="java.lang.String" value="x"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnDelActionPerformed"/>
- </Events>
- </Component>
- <Component class="javax.swing.JComboBox" name="jComboBox1">
- <Properties>
- <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
- <StringArray count="2">
- <StringItem index="0" value="Every condition fullfiled"/>
- <StringItem index="1" value="At least one condition fullfiled"/>
- </StringArray>
- </Property>
- </Properties>
- </Component>
- </SubComponents>
- </Container>
- </SubComponents>
- </Container>
- </SubComponents>
-</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java
deleted file mode 100644
index d12bc1f..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.irods.jargon.idrop.desktop.systraygui;
-
-import java.awt.Dimension;
-import java.awt.event.ItemListener;
-import java.util.LinkedList;
-import javax.swing.JComponent;
-
-/**
- *
- * @author Hanka
- */
-public class MetaPanel extends JComponent {
-
- private int counter = 0;
- MetaSearch metasearch;
- LinkedList <MetaPanelOne> panels = new LinkedList();
-
- public MetaPanel(MetaSearch m) {
- metasearch=m;
- initComponents();
- }
-
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
-
- jScrollPane1 = new javax.swing.JScrollPane();
- panel = new javax.swing.JPanel();
- btnAdd = new javax.swing.JButton();
- btnDel = new javax.swing.JButton();
- jComboBox1 = new javax.swing.JComboBox();
-
- panel.setPreferredSize(new java.awt.Dimension(426, 158));
-
- btnAdd.setText("+");
- btnAdd.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnAddActionPerformed(evt);
- }
- });
-
- btnDel.setText("x");
- btnDel.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnDelActionPerformed(evt);
- }
- });
-
- jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Every condition fullfiled", "At least one condition fullfiled" }));
-
- javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);
- panel.setLayout(panelLayout);
- panelLayout.setHorizontalGroup(
- panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(panelLayout.createSequentialGroup()
- .addGap(75, 75, 75)
- .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE)
- .addComponent(btnDel)
- .addContainerGap())
- .addGroup(panelLayout.createSequentialGroup()
- .addComponent(btnAdd)
- .addGap(0, 0, Short.MAX_VALUE))
- );
- panelLayout.setVerticalGroup(
- panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(panelLayout.createSequentialGroup()
- .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(btnDel)
- .addGroup(panelLayout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(btnAdd)
- .addContainerGap(109, Short.MAX_VALUE))
- );
-
- jScrollPane1.setViewportView(panel);
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
- this.setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)
- );
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed
- MetaPanelOne dp = new MetaPanelOne(this);
- dp.setBounds(50,50+23*getCounter(),390,23);
- panel.add(dp);
- dp.setVisible(true);
- panel.setPreferredSize(new Dimension(panel.getWidth(), dp.getY()+dp.getHeight()-panel.getY()+2));
- metasearch.pack();
- setCounter(getCounter() + 1);
- panels.add(dp);
- }//GEN-LAST:event_btnAddActionPerformed
-
- private void btnDelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDelActionPerformed
-
- if (metasearch.panels.size()>1){
- setCounter(0);
- this.setVisible(false);
- //this=null;
- metasearch.combos.getLast().setVisible(false);
- metasearch.combos.removeLast();
- metasearch.panels.remove(this);
- for (MetaPanel one: metasearch.panels){
- one.setLocation(0,193*getCounter());
- setCounter(getCounter() + 1);
- }
- metasearch.setCounter(getCounter());
- metasearch.setBtnNew(0, metasearch.panels.getLast().getY()+metasearch.panels.getLast().getHeight());
- }
- }//GEN-LAST:event_btnDelActionPerformed
-
- int combo(){
- return jComboBox1.getSelectedIndex();
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnAdd;
- private javax.swing.JButton btnDel;
- private javax.swing.JComboBox jComboBox1;
- private javax.swing.JScrollPane jScrollPane1;
- private javax.swing.JPanel panel;
- // End of variables declaration//GEN-END:variables
-
- /**
- * @return the counter
- */
- public int getCounter() {
- return counter;
- }
-
- /**
- * @param counter the counter to set
- */
- public void setCounter(int counter) {
- this.counter = counter;
- }
-
-
-}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form
deleted file mode 100644
index 2ecd51b..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
- <AuxValues>
- <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
- <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
- </AuxValues>
-
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="panel" alignment="0" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="panel" min="-2" max="-2" attributes="0"/>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Container class="javax.swing.JPanel" name="panel">
- <Properties>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[383, 23]"/>
- </Property>
- </Properties>
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
- <Property name="useNullLayout" type="boolean" value="true"/>
- </Layout>
- <SubComponents>
- <Component class="javax.swing.JTextField" name="txtAtr">
- <Properties>
- <Property name="text" type="java.lang.String" value="Attribute"/>
- </Properties>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
- <AbsoluteConstraints x="0" y="1" width="100" height="-1"/>
- </Constraint>
- </Constraints>
- </Component>
- <Component class="javax.swing.JComboBox" name="cmbOp">
- <Properties>
- <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
- <StringArray count="8">
- <StringItem index="0" value="&gt;"/>
- <StringItem index="1" value="&gt;="/>
- <StringItem index="2" value="&lt;"/>
- <StringItem index="3" value="&lt;="/>
- <StringItem index="4" value="="/>
- <StringItem index="5" value="&lt;&gt;"/>
- <StringItem index="6" value="like"/>
- <StringItem index="7" value="not like"/>
- </StringArray>
- </Property>
- </Properties>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
- <AbsoluteConstraints x="130" y="1" width="-1" height="-1"/>
- </Constraint>
- </Constraints>
- </Component>
- <Component class="javax.swing.JTextField" name="txtVal">
- <Properties>
- <Property name="text" type="java.lang.String" value="Value"/>
- </Properties>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
- <AbsoluteConstraints x="217" y="1" width="100" height="-1"/>
- </Constraint>
- </Constraints>
- </Component>
- <Component class="javax.swing.JButton" name="btnDel">
- <Properties>
- <Property name="text" type="java.lang.String" value="-"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnDelActionPerformed"/>
- </Events>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
- <AbsoluteConstraints x="336" y="0" width="50" height="-1"/>
- </Constraint>
- </Constraints>
- </Component>
- </SubComponents>
- </Container>
- </SubComponents>
-</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java
deleted file mode 100644
index b20c718..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.irods.jargon.idrop.desktop.systraygui;
-
-/**
- *
- * @author Hanka
- */
-public class MetaPanelOne extends javax.swing.JPanel {
-
- private int counter;
- MetaPanel metapanel;
-
- public MetaPanelOne(MetaPanel m) {
- initComponents();
- metapanel=m;
- }
-
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
-
- panel = new javax.swing.JPanel();
- txtAtr = new javax.swing.JTextField();
- cmbOp = new javax.swing.JComboBox();
- txtVal = new javax.swing.JTextField();
- btnDel = new javax.swing.JButton();
-
- panel.setPreferredSize(new java.awt.Dimension(383, 23));
- panel.setLayout(null);
-
- txtAtr.setText("Attribute");
- panel.add(txtAtr);
- txtAtr.setBounds(0, 1, 100, 20);
-
- cmbOp.setModel(new javax.swing.DefaultComboBoxModel(new String[] { ">", ">=", "<", "<=", "=", "<>", "like", "not like" }));
- panel.add(cmbOp);
- cmbOp.setBounds(130, 1, 59, 20);
-
- txtVal.setText("Value");
- panel.add(txtVal);
- txtVal.setBounds(217, 1, 100, 20);
-
- btnDel.setText("-");
- btnDel.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnDelActionPerformed(evt);
- }
- });
- panel.add(btnDel);
- btnDel.setBounds(336, 0, 50, 23);
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
- this.setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- );
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnDelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDelActionPerformed
-
- if (metapanel.panels.size()>1){
- setCounter(0);
- this.setVisible(false);
- //this=null;
- metapanel.panels.remove(this);
- for (MetaPanelOne one: metapanel.panels){
- one.setBounds(50,50+23*getCounter(),390,23);
- setCounter(getCounter() + 1);
- }
- metapanel.setCounter(getCounter());
- }
- }//GEN-LAST:event_btnDelActionPerformed
-
- boolean checktxt (){
- if (txtAtr.getText().equals("") || txtVal.getText().equals("")) return false;
- else return true;
- }
-
- String atr (){
- return txtAtr.getText();
- }
-
- String val (){
- return txtVal.getText();
- }
-
- int combo (){
- return cmbOp.getSelectedIndex();
- }
-
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnDel;
- private javax.swing.JComboBox cmbOp;
- private javax.swing.JPanel panel;
- private javax.swing.JTextField txtAtr;
- private javax.swing.JTextField txtVal;
- // End of variables declaration//GEN-END:variables
-
- /**
- * @return the counter
- */
- public int getCounter() {
- return counter;
- }
-
- /**
- * @param counter the counter to set
- */
- public void setCounter(int counter) {
- this.counter = counter;
- }
-}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form
deleted file mode 100644
index 8f9985b..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
- <Properties>
- <Property name="defaultCloseOperation" type="int" value="2"/>
- </Properties>
- <SyntheticProperties>
- <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
- </SyntheticProperties>
- <AuxValues>
- <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
- <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
- </AuxValues>
-
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="jScrollPane2" alignment="0" pref="617" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <Component id="jScrollPane2" min="-2" pref="464" max="-2" attributes="0"/>
- <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Container class="javax.swing.JScrollPane" name="jScrollPane2">
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
- <SubComponents>
- <Container class="javax.swing.JPanel" name="panel">
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
- <Property name="useNullLayout" type="boolean" value="true"/>
- </Layout>
- <SubComponents>
- <Component class="javax.swing.JButton" name="btnNew">
- <Properties>
- <Property name="text" type="java.lang.String" value="New condition node"/>
- <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[165453, 6486483]"/>
- </Property>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnNewActionPerformed"/>
- </Events>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
- <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/>
- </Constraint>
- </Constraints>
- </Component>
- <Component class="javax.swing.JButton" name="btnSearch">
- <Properties>
- <Property name="text" type="java.lang.String" value="Search"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSearchActionPerformed"/>
- </Events>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
- <AbsoluteConstraints x="485" y="0" width="100" height="60"/>
- </Constraint>
- </Constraints>
- </Component>
- </SubComponents>
- </Container>
- </SubComponents>
- </Container>
- </SubComponents>
-</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java
deleted file mode 100644
index 69af6c1..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.irods.jargon.idrop.desktop.systraygui;
-
-import java.awt.Dimension;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import javax.swing.JComboBox;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextField;
-import org.irods.jargon.core.exception.JargonException;
-import org.irods.jargon.core.pub.DataObjectAO;
-//import org.irods.jargon.core.query.MetaDataSet;
-import org.irods.jargon.core.query.AVUQueryElement;
-import org.irods.jargon.core.query.AVUQueryElement.AVUQueryPart;
-import org.irods.jargon.core.query.AVUQueryOperatorEnum;
-import org.irods.jargon.core.query.JargonQueryException;
-import org.irods.jargon.core.query.MetaDataAndDomainData;
-import org.openide.util.Exceptions;
-
-/**
- *
- * @author Hanka
- */
-public class MetaSearch extends javax.swing.JDialog {
-
- private int counter=0;
- LinkedList <MetaPanel> panels = new LinkedList();
- LinkedList <JComboBox> combos = new LinkedList();
-
- IDROPCore idrop;
- /*
- public MetaSearch(java.awt.Frame parent, boolean modal) {
- super(parent, modal);
- initComponents();
- this.setTitle("MetaSearch");
- }
- */
-
- public MetaSearch(java.awt.Frame parent, boolean modal,IDROPCore a) {
- super(parent, modal);
- initComponents();
- this.setTitle("MetaSearch");
- idrop=a;
- }
-
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
-
- jScrollPane2 = new javax.swing.JScrollPane();
- panel = new javax.swing.JPanel();
- btnNew = new javax.swing.JButton();
- btnSearch = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- panel.setLayout(null);
-
- btnNew.setText("New condition node");
- btnNew.setMaximumSize(new java.awt.Dimension(165453, 6486483));
- btnNew.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnNewActionPerformed(evt);
- }
- });
- panel.add(btnNew);
- btnNew.setBounds(0, 0, 127, 23);
-
- btnSearch.setText("Search");
- btnSearch.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnSearchActionPerformed(evt);
- }
- });
- panel.add(btnSearch);
- btnSearch.setBounds(485, 0, 100, 60);
-
- jScrollPane2.setViewportView(panel);
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 464, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(0, 0, Short.MAX_VALUE))
- );
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- //funkcja zwracająca warunek do dodania
- AVUQueryElement condition(int atr, int op, String val) throws JargonQueryException{
- //atr: atr - 0; val - 1;
- //op: > - 0; >= - 1; < - 2; <= - 3; = - 4; <> - 5; like - 6; not like - 7;
- if(atr == 0){
- switch(op){
- case 0:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.GREATER_THAN,val);
- case 1:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.GREATER_OR_EQUAL,val);
- case 2:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.LESS_THAN,val);
- case 3:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.LESS_OR_EQUAL,val);
- case 4:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.EQUAL,val);
- case 5:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.NOT_EQUAL,val);
- case 6:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.LIKE,val);
- case 7:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.NOT_LIKE,val);
- }
- } else {
- switch(op){
- case 0:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.GREATER_THAN,val);
- case 1:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.GREATER_OR_EQUAL,val);
- case 2:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.LESS_THAN,val);
- case 3:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.LESS_OR_EQUAL,val);
- case 4:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.EQUAL,val);
- case 5:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.NOT_EQUAL,val);
- case 6:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.LIKE,val);
- case 7:
- return AVUQueryElement.instanceForValueQuery
- (AVUQueryPart.VALUE, AVUQueryOperatorEnum.NOT_LIKE,val);
- }
- }
- return null;
- }
-
-
- //szukanie wewnątrz węzła dla przynjamniej jednego warunku spełnionego
- //zwraca częściową listę wynikową
- List<MetaDataAndDomainData> node_or(int big, MetaPanel panel) {
-
- List<AVUQueryElement> avuQueryElements = new ArrayList<AVUQueryElement>(); // lista warunków
- List<MetaDataAndDomainData> metadataElementspom; //pomocnicza lista wynikow
- List<MetaDataAndDomainData> metadataElements=new LinkedList<MetaDataAndDomainData>(); //lista wynikow
- int ktory=0;
- int small=0;
- try{
- DataObjectAO dataObjectAO = idrop.getIrodsFileSystem()
- .getIRODSAccessObjectFactory().getDataObjectAO(idrop.getIrodsAccount());
- //dla każdego z warunków
- for (MetaPanelOne one: panel.panels){
- //atr: atr - 0; val - 1;
- //op: > - 0; >= - 1; < - 2; <= - 3; = - 4; <> - 5; like - 6; not like - 7;
- //atrybut taki sam i sprawdza wartość
- avuQueryElements.clear();
- avuQueryElements.add(condition(0, 4, panels.get(big).panels.get(small).atr())); //atrybut równy wpisanemu
- avuQueryElements.add(condition(1, one.combo(),panels.get(big).panels.get(small).val())); //wartość porównywana zgodnie z wybranym operatorem
- if (ktory==0) {
- //jeśli pierwszy warunek sprawdzany to wszytskie wyniki zapisz do listy wynikowej
- metadataElements= dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);// = null; //lista wyników
- ktory=1;
- } else {
- //jeśli kolejny warunek sprawdź, czy ten plik nie jest już na liście i jeśli nie to dodaj do listy
- metadataElementspom = dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);
- for(MetaDataAndDomainData to:metadataElementspom) {
- int czy=0;
- for (MetaDataAndDomainData aaa: metadataElements) {
- if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
- czy=1;
- break;
- }
- }
- if(czy==0) metadataElements.add(to);
- }
- }
- small++;
- }
- } catch (JargonQueryException ex) {
- Exceptions.printStackTrace(ex);
- } catch (JargonException ex) {
- Exceptions.printStackTrace(ex);
- }
- return metadataElements;
- }
-
-
- //szukanie wewnątrz węzła dla każdego warunku spełnionego
- //zwraca częściową listę wynikową
- List<MetaDataAndDomainData> node_and(int big, MetaPanel panel) {
- List<AVUQueryElement> avuQueryElements = new ArrayList<AVUQueryElement>(); // lista warunków
- List<MetaDataAndDomainData> metadataElementspom1=null; //pomocnicza lista wynikow 1
- List<MetaDataAndDomainData> metadataElementspom2; //pomocnicza lista wynikow 2
- List<MetaDataAndDomainData> metadataElements=null; //lista wynikow
- int ktory=0;
- int small=0;
- try{
- DataObjectAO dataObjectAO = idrop.getIrodsFileSystem()
- .getIRODSAccessObjectFactory().getDataObjectAO(idrop.getIrodsAccount());
- //dla każdego z warunków
- for (MetaPanelOne one: panel.panels){
- avuQueryElements.clear();
- avuQueryElements.add(condition(0, 4, panels.get(big).panels.get(small).atr())); //atrybut równy wpisanemu
- avuQueryElements.add(condition(1, one.combo(),panels.get(big).panels.get(small).val())); //wartość porównywana zgodnie z wybranym operatorem
- if (ktory==0) {
- //jeśli pierwszy warunek sprawdzany to wszytskie wyniki zapisz do listy wynikowej
- metadataElementspom1= dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);//lista wyników
- metadataElements= dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);
- if (metadataElementspom1.isEmpty()) return metadataElementspom1;
- ktory=1;
- } else {
- //jeśli kolejny warunek sprawdź, czy ten plik jest już na liście i jeśli nie to usun z listy
- metadataElements.clear();
- metadataElementspom2 = dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);
- int czy=0;
- for(MetaDataAndDomainData to:metadataElementspom2) {
- for (MetaDataAndDomainData aaa: metadataElementspom1) {
- czy=0;
- if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
- czy=1;
- break;
- }
- }
- if(czy==1) {
- metadataElements.add(to);
- }
- }
- metadataElementspom1.clear();
- for (MetaDataAndDomainData to: metadataElements) {
- metadataElementspom1.add(to);
- }
- }
- small++;
- }
- } catch (JargonQueryException ex) {
- Exceptions.printStackTrace(ex);
- } catch (JargonException ex) {
- Exceptions.printStackTrace(ex);
- }
- return metadataElementspom1;
- }
-
-
- //łączenie dwóch częściowych list wynikowych z paneli
- //zwraca wynik połączenia zgodnie z wybranym operatorem
- List<MetaDataAndDomainData> join(List<MetaDataAndDomainData> metadataElementshlp1,
- List<MetaDataAndDomainData> metadataElementshlp2,int cmb){
-
- LinkedList<MetaDataAndDomainData> metadataElements = new LinkedList<MetaDataAndDomainData>();
- metadataElements.clear();
- //and
- if (cmb==0){
- int czy=0;
- for(MetaDataAndDomainData to:metadataElementshlp2) {
- for (MetaDataAndDomainData aaa: metadataElementshlp1) {
- czy=0;
- if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
- czy=1;
- break;
- }
- }
- if(czy==1) {
- metadataElements.add(to);
- }
- }
- } /*or*/else{
- for (MetaDataAndDomainData to:metadataElementshlp2){
- metadataElements.add(to);
- }
-
- for(MetaDataAndDomainData to:metadataElementshlp1) {
- int czy=0;
- for (MetaDataAndDomainData aaa: metadataElementshlp2) {
- if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
- czy=1;
- break;
- }
- }
- if(czy==0) metadataElements.add(to);
- }
- }
- return metadataElements;
- }
-
-
-
-
- private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchActionPerformed
- int chk=1;
- //sprawdzanie, czy każde pole wypełnione
- if(panels.isEmpty()) {
- MessageManager.showMessage(this, "Add at least one condition node", MessageManager.TITLE_MESSAGE);
- chk=0;
- } else {
- for (MetaPanel panel: panels){
- if (panel.panels.isEmpty() ) {
- MessageManager.showMessage(this, "Add at least one condition on each condition node", MessageManager.TITLE_MESSAGE);
- chk=0;
- break;
- }
- for (MetaPanelOne pnl: panel.panels){
- if (!pnl.checktxt()) {
- MessageManager.showMessage(this, "Add text to each condition", MessageManager.TITLE_MESSAGE);
- chk=0;
- break;
- }
- }
- if (chk==0) break;
- }
- }
- //jeśli wsyztskie pola wypełnione to szuka
- if (chk==1){
- List<MetaDataAndDomainData> metadataElements=new LinkedList<MetaDataAndDomainData>(); //lista wynikow
- List<MetaDataAndDomainData> metadataElementshlp1=new LinkedList<MetaDataAndDomainData>();
- List<MetaDataAndDomainData> metadataElementshlp2=new LinkedList<MetaDataAndDomainData>();
- int big=0; //ktory wezel
- //będą tworzone częściowe listy dla każdego panelu i potem zgodnie z wyborem (OR, AND) łączone
- for (MetaPanel panel : panels){
- //wybór - przynajmniej jeden spelniony
- if (panel.combo()==1) {
- metadataElementshlp2 = node_or(big,panel);
- }
- //wybor - wszystkie spełnione
- else {
- metadataElementshlp2 = node_and(big,panel);
- }
- if(big!=0) {
- metadataElements=join(metadataElementshlp1,metadataElementshlp2,combos.get(big-1).getSelectedIndex());
- metadataElementshlp1.clear();
- for (MetaDataAndDomainData to: metadataElements) {
- metadataElementshlp1.add(to);
- }
- } else{
- metadataElements.clear();
- metadataElementshlp1.clear();
-
- for (MetaDataAndDomainData to: metadataElementshlp2) {
- metadataElementshlp1.add(to);
- metadataElements.add(to);
- }
- }
- big++;
- }
- String results="Results:\n";
- for (MetaDataAndDomainData one: metadataElements) {
- results+=one.getDomainObjectUniqueName().toString()+"\n";
- }
- MessageManager.showMessage(this, results, "MetaSearch resulrs");//MessageManager.TITLE_MESSAGE);
- }
- }//GEN-LAST:event_btnSearchActionPerformed
-
-
- private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewActionPerformed
- MetaPanel metapanel = new MetaPanel(this);
- metapanel.setBounds(0,(170+btnNew.getHeight())*getCounter(),470,170);
- panel.add(metapanel);
- metapanel.setVisible(true);
- panels.add(metapanel);
- if (getCounter()==0) btnNew.setLocation(btnNew.getX(), 170);
- else{
- JComboBox and_or = new JComboBox();
- and_or.setBounds(btnNew.getX(),btnNew.getY(), btnNew.getWidth()+10, btnNew.getHeight());
- and_or.addItem("and");
- and_or.addItem("or");
- panel.add(and_or);
- combos.add(and_or);
- and_or.setVisible(true);
- btnNew.setLocation(btnNew.getX(), metapanel.getY()+metapanel.getHeight());
- panel.setPreferredSize(new Dimension(panel.getWidth(), btnNew.getY()+btnNew.getHeight()-panel.getY()+2));
- }
- this.pack();
- setCounter(getCounter() + 1);
- }//GEN-LAST:event_btnNewActionPerformed
-
- void setBtnNew(int x,int y){
- btnNew.setLocation(x,y);
- }
-
-
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnNew;
- private javax.swing.JButton btnSearch;
- private javax.swing.JScrollPane jScrollPane2;
- private javax.swing.JPanel panel;
- // End of variables declaration//GEN-END:variables
-
- /**
- * @return the counter
- */
- public int getCounter() {
- return counter;
- }
-
- /**
- * @param counter the counter to set
- */
- public void setCounter(int counter) {
- this.counter = counter;
- }
-}