You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rya.apache.org by dl...@apache.org on 2017/09/08 19:06:20 UTC

[1/3] incubator-rya git commit: RYA-361 Removed dialogs and jcalendar. closes #224

Repository: incubator-rya
Updated Branches:
  refs/heads/master 63f87b868 -> 28b0a52d0


RYA-361 Removed dialogs and jcalendar. closes #224


Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/3aae3258
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/3aae3258
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/3aae3258

Branch: refs/heads/master
Commit: 3aae3258db901706e9aa25739d53b5c2825cfd9b
Parents: 63f87b8
Author: David Lotts <da...@parsons.com>
Authored: Thu Sep 7 17:23:52 2017 -0400
Committer: David Lotts <da...@parsons.com>
Committed: Fri Sep 8 14:46:14 2017 -0400

----------------------------------------------------------------------
 extras/rya.export/export.client/pom.xml         |   6 -
 .../client/conf/DateTimePickerDialog.java       | 172 -------------------
 .../client/conf/MergeConfigurationCLI.java      |  15 +-
 extras/rya.merger/pom.xml                       |   5 -
 .../apache/rya/accumulo/mr/merge/CopyTool.java  |  20 +--
 .../apache/rya/accumulo/mr/merge/MergeTool.java |  41 +----
 .../mr/merge/gui/DateTimePickerDialog.java      | 172 -------------------
 .../rya/accumulo/mr/merge/CopyToolTest.java     |   3 +-
 .../rya/accumulo/mr/merge/MergeToolTest.java    |   3 +-
 .../accumulo/mr/merge/demo/CopyToolDemo.java    |   3 +-
 .../accumulo/mr/merge/demo/MergeToolDemo.java   |   3 +-
 11 files changed, 21 insertions(+), 422 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.export/export.client/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.client/pom.xml b/extras/rya.export/export.client/pom.xml
index 2ea0a30..eb9c554 100644
--- a/extras/rya.export/export.client/pom.xml
+++ b/extras/rya.export/export.client/pom.xml
@@ -59,12 +59,6 @@ under the License.
         </dependency>
 
         <dependency>
-            <groupId>com.toedter</groupId>
-            <artifactId>jcalendar</artifactId>
-            <version>1.1.4</version>
-        </dependency>
-
-        <dependency>
             <groupId>org.openrdf.sesame</groupId>
             <artifactId>sesame-queryrender</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/DateTimePickerDialog.java
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/DateTimePickerDialog.java b/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/DateTimePickerDialog.java
deleted file mode 100644
index eaa8822..0000000
--- a/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/DateTimePickerDialog.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.export.client.conf;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.swing.BorderFactory;
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JSpinner;
-import javax.swing.JSpinner.DateEditor;
-import javax.swing.SpinnerDateModel;
-import javax.swing.SpinnerModel;
-import javax.swing.WindowConstants;
-
-import com.toedter.calendar.JCalendar;
-
-/**
- * Dialog for picking date and time.
- */
-public class DateTimePickerDialog extends JDialog {
-    private static final long serialVersionUID = 1L;
-
-    private JCalendar dateChooser;
-    private JSpinner timeSpinner;
-
-    private Date selectedDateTime;
-    private final JLabel label;
-
-
-    /**
-     * Creates a new instance of {@link DateTimePickerDialog}.
-     * @param title the title to display up top.
-     * @param message the message to display.
-     */
-    public DateTimePickerDialog(final String title, final String message) {
-        this(null, title, message);
-    }
-
-    /**
-     * Creates a new instance of {@link DateTimePickerDialog}.
-     * @param date the initial date to have the dialog show.
-     * @param title the title to display up top.
-     * @param message the message to display.
-     */
-    public DateTimePickerDialog(final Date date, final String title, final String message) {
-        // Create a modal dialog
-        super((JDialog) null);
-        setTitle(title);
-        setModalityType(ModalityType.APPLICATION_MODAL);
-        setType(Type.NORMAL);
-
-        setLayout(new GridBagLayout());
-        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
-
-        final JButton okButton = new JButton("OK");
-        okButton.addActionListener (new ActionListener() {
-            @Override
-            public void actionPerformed(final ActionEvent event) {
-                selectedDateTime = findSelectedDateTime();
-
-                // Hide dialog
-                setVisible(false);
-            }
-        });
-
-        getRootPane().setDefaultButton(okButton);
-
-        final JPanel dateTimePanel = buildDateTimePanel(date);
-        label = new JLabel (message);
-        label.setBorder(BorderFactory.createEtchedBorder());
-
-        final GridBagConstraints c = new GridBagConstraints();
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.insets = new Insets(5, 5, 5, 5);
-        c.gridx = 0;
-        c.gridy = 0;
-
-        add(dateTimePanel, c);
-        c.gridy++;
-        add(label, c);
-        c.anchor = GridBagConstraints.EAST;
-        c.fill = GridBagConstraints.NONE;
-        c.gridy++;
-        add(okButton, c);
-
-        pack();
-    }
-
-    private JPanel buildDateTimePanel(final Date date) {
-        final JPanel datePanel = new JPanel();
-
-        dateChooser = new JCalendar();
-        if (date != null) {
-            final Calendar calendar = Calendar.getInstance();
-            calendar.setTime(date);
-            dateChooser.setCalendar(calendar);
-        }
-
-        datePanel.add(dateChooser);
-
-        final SpinnerModel model = new SpinnerDateModel();
-        timeSpinner = new JSpinner(model);
-        final DateEditor editor = new DateEditor(timeSpinner, "HH:mm:ss");
-        timeSpinner.setEditor(editor);
-        if (date != null) {
-            timeSpinner.setValue(date);
-        }
-
-        datePanel.add(timeSpinner);
-
-        return datePanel;
-    }
-
-    private Date findSelectedDateTime() {
-        // Get the values from the date chooser
-        final int day = dateChooser.getDayChooser().getDay();
-        final int month = dateChooser.getMonthChooser().getMonth();
-        final int year = dateChooser.getYearChooser().getYear();
-
-        // Get the values from the time chooser
-        final Calendar timeCalendar = Calendar.getInstance();
-        timeCalendar.setTime((Date) timeSpinner.getValue());
-        final int hour = timeCalendar.get(Calendar.HOUR_OF_DAY);
-        final int minute = timeCalendar.get(Calendar.MINUTE);
-        final int second = timeCalendar.get(Calendar.SECOND);
-
-        // Combine these values into a single date object
-        final Calendar newCalendar = Calendar.getInstance();
-        newCalendar.set(Calendar.YEAR, year);
-        newCalendar.set(Calendar.MONTH, month);
-        newCalendar.set(Calendar.DATE, day);
-        newCalendar.set(Calendar.HOUR_OF_DAY, hour);
-        newCalendar.set(Calendar.MINUTE, minute);
-        newCalendar.set(Calendar.SECOND, second);
-
-        final Date newDate = newCalendar.getTime();
-
-        return newDate;
-    }
-
-    /**
-     * @return the selected date time.
-     */
-    public Date getSelectedDateTime() {
-        return selectedDateTime;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/MergeConfigurationCLI.java
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/MergeConfigurationCLI.java b/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/MergeConfigurationCLI.java
index f0c5136..b8a64d9 100644
--- a/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/MergeConfigurationCLI.java
+++ b/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/MergeConfigurationCLI.java
@@ -54,10 +54,6 @@ import com.google.common.annotations.VisibleForTesting;
  * Helper class for processing command line arguments for the Merge Tool.
  */
 public class MergeConfigurationCLI {
-    private static final String DIALOG_TITLE = "Select a Start Time/Date";
-    private static final String DIALOG_MESSAGE =
-        "<html>Choose the time of the data to merge.<br>Only data modified AFTER the selected time will be merged.</html>";
-
     private static final Option CONFIG_OPTION = new Option("c", true, "Defines the configuration file for the Merge Tool to use.");
     private static final Option TIME_OPTION = new Option("t", true, "Defines the timestamp from which to filter RyaStatements when merging.");
     private static final Option PARENT_HOST_OPTION = new Option("a", "pHost", true, "Defines the hostname of the parent db to connect to.");
@@ -149,7 +145,12 @@ public class MergeConfigurationCLI {
             throw new MergeConfigurationException("Failed to create a config based on the provided configuration.", JAXBe);
         }
     }
-
+    /**
+     * Gets and parses the time from the configuration or command line.
+     * This is for API and is not used internally as of v3.2.11
+     * @return a time or throws an exception when no time is configured because time is required.
+     * @throws MergeConfigurationException when date is badly formated or missing.
+     */
     public Date getRyaStatementMergeTime() throws MergeConfigurationException {
         final Date time;
         if(cmd.hasOption(TIME_OPTION.getOpt())) {
@@ -160,9 +161,7 @@ public class MergeConfigurationCLI {
                 throw new MergeConfigurationException("The provided timestamp was not formatted correctly.", e);
             }
         } else {
-            final DateTimePickerDialog dialog = new DateTimePickerDialog(DIALOG_TITLE, DIALOG_MESSAGE);
-            dialog.setVisible(true);
-            time = dialog.getSelectedDateTime();
+        	throw new MergeConfigurationException("The "+TIME_OPTION.getArgName()+" option was not specified. "+TIME_OPTION.getDescription());
         }
         return time;
     }

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.merger/pom.xml b/extras/rya.merger/pom.xml
index 44f65ef..206c8f9 100644
--- a/extras/rya.merger/pom.xml
+++ b/extras/rya.merger/pom.xml
@@ -49,11 +49,6 @@ under the License.
             <artifactId>plexus-utils</artifactId>
          </dependency>
         <dependency>
-            <groupId>com.toedter</groupId>
-            <artifactId>jcalendar</artifactId>
-            <version>1.1.4</version>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.8.2</version>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/CopyTool.java
----------------------------------------------------------------------
diff --git a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/CopyTool.java b/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/CopyTool.java
index 660fa19..4597400 100644
--- a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/CopyTool.java
+++ b/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/CopyTool.java
@@ -88,7 +88,6 @@ import org.apache.rya.accumulo.AccumuloRdfConfiguration;
 import org.apache.rya.accumulo.mr.AccumuloHDFSFileInputFormat;
 import org.apache.rya.accumulo.mr.MRUtils;
 import org.apache.rya.accumulo.mr.merge.common.InstanceType;
-import org.apache.rya.accumulo.mr.merge.gui.DateTimePickerDialog;
 import org.apache.rya.accumulo.mr.merge.mappers.AccumuloCopyToolMapper;
 import org.apache.rya.accumulo.mr.merge.mappers.AccumuloRyaRuleMapper;
 import org.apache.rya.accumulo.mr.merge.mappers.FileCopyToolMapper;
@@ -207,10 +206,9 @@ public class CopyTool extends AbstractDualInstanceAccumuloMRTool {
      */
     public static final String QUERY_FILE_PROP = "ac.copy.queryfile";
 
-    private static final String DIALOG_TITLE = "Select a Start Time/Date";
-    private static final String DIALOG_MESSAGE =
-        "<html>Choose the time of the data to copy.<br>Only parent data AFTER the selected time will be copied to the child.</html>";
-
+    /**
+     *  startTime is the time of the data to copy. Only parent data AFTER the selected time will be copied to the child.
+     */
     private String startTime = null;
     private boolean useCopyFileOutput = false;
     private String baseOutputDir = null;
@@ -250,17 +248,7 @@ public class CopyTool extends AbstractDualInstanceAccumuloMRTool {
         startTime = conf.get(MergeTool.START_TIME_PROP, null);
 
         if (!useCopyFileImport) {
-            // Display start time dialog if requested
-            if (MergeTool.USE_START_TIME_DIALOG.equals(startTime)) {
-                log.info("Select start time from dialog...");
-                final DateTimePickerDialog dateTimePickerDialog = new DateTimePickerDialog(DIALOG_TITLE, DIALOG_MESSAGE);
-                dateTimePickerDialog.setVisible(true);
-
-                final Date date = dateTimePickerDialog.getSelectedDateTime();
-                startTime = MergeTool.START_TIME_FORMATTER.format(date);
-                conf.set(MergeTool.START_TIME_PROP, startTime);
-                log.info("Will copy all data after " + date);
-            } else if (startTime != null) {
+        	if (startTime != null) {
                 try {
                     final Date date = MergeTool.START_TIME_FORMATTER.parse(startTime);
                     log.info("Will copy all data after " + date);

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/MergeTool.java
----------------------------------------------------------------------
diff --git a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/MergeTool.java b/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/MergeTool.java
index d031d20..21a8316 100644
--- a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/MergeTool.java
+++ b/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/MergeTool.java
@@ -65,7 +65,6 @@ import com.google.common.collect.ImmutableMap;
 import org.apache.rya.accumulo.AccumuloRdfConfiguration;
 import org.apache.rya.accumulo.mr.AccumuloHDFSFileInputFormat;
 import org.apache.rya.accumulo.mr.MRUtils;
-import org.apache.rya.accumulo.mr.merge.gui.DateTimePickerDialog;
 import org.apache.rya.accumulo.mr.merge.mappers.MergeToolMapper;
 import org.apache.rya.accumulo.mr.merge.util.AccumuloRyaUtils;
 import org.apache.rya.accumulo.mr.merge.util.TimeUtils;
@@ -115,16 +114,7 @@ public class MergeTool extends AbstractDualInstanceAccumuloMRTool {
      */
     public static final String MERGE_FILE_INPUT_PATH = "merge.file.input.path";
 
-    /**
-     * A value used for the {@link #START_TIME_PROP} property to indicate that a dialog
-     * should be displayed to select the time.
-     */
-    public static final String USE_START_TIME_DIALOG = "dialog";
-
-    private static final String DIALOG_TITLE = "Select a Start Time/Date";
-    private static final String DIALOG_MESSAGE =
-        "<html>Choose the time of the data to merge.<br>Only data modified AFTER the selected time will be merged.</html>";
-
+    // startTime is the time of the data to merge. Only data modified AFTER the selected time will be merged.
     private String startTime = null;
     private String tempDir = null;
     private boolean useMergeFileInput = false;
@@ -208,18 +198,7 @@ public class MergeTool extends AbstractDualInstanceAccumuloMRTool {
         startTime = conf.get(START_TIME_PROP, null);
 
         if (!useMergeFileInput) {
-            // Display start time dialog if requested
-            if (USE_START_TIME_DIALOG.equals(startTime)) {
-                log.info("Select start time from dialog...");
-
-                final DateTimePickerDialog dateTimePickerDialog = new DateTimePickerDialog(DIALOG_TITLE, DIALOG_MESSAGE);
-                dateTimePickerDialog.setVisible(true);
-
-                final Date date = dateTimePickerDialog.getSelectedDateTime();
-                startTime = START_TIME_FORMATTER.format(date);
-                conf.set(START_TIME_PROP, startTime);
-                log.info("Will merge all data after " + date);
-            } else if (startTime != null) {
+            if (startTime != null) {
                 try {
                     final Date date = START_TIME_FORMATTER.parse(startTime);
                     log.info("Will merge all data after " + date);
@@ -510,20 +489,12 @@ public class MergeTool extends AbstractDualInstanceAccumuloMRTool {
     }
 
     /**
-     * Creates a formatted string for the start time based on the specified date and whether the dialog is to be displayed.
+     * Creates a formatted string for the start time based on the specified date.
      * @param startDate the start {@link Date} to format.
-     * @param isStartTimeDialogEnabled {@code true} to display the time dialog instead of using the date. {@code false}
-     * to use the provided {@code startDate}.
-     * @return the formatted start time string or {@code "dialog"}.
+     * @return the formatted start time string.
      */
-    public static String getStartTimeString(final Date startDate, final boolean isStartTimeDialogEnabled) {
-        String startTimeString;
-        if (isStartTimeDialogEnabled) {
-            startTimeString = USE_START_TIME_DIALOG; // set start date from dialog box
-        } else {
-            startTimeString = convertDateToStartTimeString(startDate);
-        }
-        return startTimeString;
+    public static String getStartTimeString(final Date startDate) {
+        return convertDateToStartTimeString(startDate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/gui/DateTimePickerDialog.java
----------------------------------------------------------------------
diff --git a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/gui/DateTimePickerDialog.java b/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/gui/DateTimePickerDialog.java
deleted file mode 100644
index 1c12bee..0000000
--- a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/gui/DateTimePickerDialog.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.accumulo.mr.merge.gui;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.swing.BorderFactory;
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JSpinner;
-import javax.swing.JSpinner.DateEditor;
-import javax.swing.SpinnerDateModel;
-import javax.swing.SpinnerModel;
-import javax.swing.WindowConstants;
-
-import com.toedter.calendar.JCalendar;
-
-/**
- * Dialog for picking date and time.
- */
-public class DateTimePickerDialog extends JDialog {
-    private static final long serialVersionUID = 1L;
-
-    private JCalendar dateChooser;
-    private JSpinner timeSpinner;
-
-    private Date selectedDateTime;
-    private final JLabel label;
-
-
-    /**
-     * Creates a new instance of {@link DateTimePickerDialog}.
-     * @param title the title to display up top.
-     * @param message the message to display.
-     */
-    public DateTimePickerDialog(final String title, final String message) {
-        this(null, title, message);
-    }
-
-    /**
-     * Creates a new instance of {@link DateTimePickerDialog}.
-     * @param date the initial date to have the dialog show.
-     * @param title the title to display up top.
-     * @param message the message to display.
-     */
-    public DateTimePickerDialog(final Date date, final String title, final String message) {
-        // Create a modal dialog
-        super((JDialog) null);
-        setTitle(title);
-        setModalityType(ModalityType.APPLICATION_MODAL);
-        setType(Type.NORMAL);
-
-        setLayout(new GridBagLayout());
-        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
-
-        final JButton okButton = new JButton("OK");
-        okButton.addActionListener (new ActionListener() {
-            @Override
-            public void actionPerformed(final ActionEvent event) {
-                selectedDateTime = findSelectedDateTime();
-
-                // Hide dialog
-                setVisible(false);
-            }
-        });
-
-        getRootPane().setDefaultButton(okButton);
-
-        final JPanel dateTimePanel = buildDateTimePanel(date);
-        label = new JLabel (message);
-        label.setBorder(BorderFactory.createEtchedBorder());
-
-        final GridBagConstraints c = new GridBagConstraints();
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.insets = new Insets(5, 5, 5, 5);
-        c.gridx = 0;
-        c.gridy = 0;
-
-        add(dateTimePanel, c);
-        c.gridy++;
-        add(label, c);
-        c.anchor = GridBagConstraints.EAST;
-        c.fill = GridBagConstraints.NONE;
-        c.gridy++;
-        add(okButton, c);
-
-        pack();
-    }
-
-    private JPanel buildDateTimePanel(final Date date) {
-        final JPanel datePanel = new JPanel();
-
-        dateChooser = new JCalendar();
-        if (date != null) {
-            final Calendar calendar = Calendar.getInstance();
-            calendar.setTime(date);
-            dateChooser.setCalendar(calendar);
-        }
-
-        datePanel.add(dateChooser);
-
-        final SpinnerModel model = new SpinnerDateModel();
-        timeSpinner = new JSpinner(model);
-        final DateEditor editor = new DateEditor(timeSpinner, "HH:mm:ss");
-        timeSpinner.setEditor(editor);
-        if (date != null) {
-            timeSpinner.setValue(date);
-        }
-
-        datePanel.add(timeSpinner);
-
-        return datePanel;
-    }
-
-    private Date findSelectedDateTime() {
-        // Get the values from the date chooser
-        final int day = dateChooser.getDayChooser().getDay();
-        final int month = dateChooser.getMonthChooser().getMonth();
-        final int year = dateChooser.getYearChooser().getYear();
-
-        // Get the values from the time chooser
-        final Calendar timeCalendar = Calendar.getInstance();
-        timeCalendar.setTime((Date) timeSpinner.getValue());
-        final int hour = timeCalendar.get(Calendar.HOUR_OF_DAY);
-        final int minute = timeCalendar.get(Calendar.MINUTE);
-        final int second = timeCalendar.get(Calendar.SECOND);
-
-        // Combine these values into a single date object
-        final Calendar newCalendar = Calendar.getInstance();
-        newCalendar.set(Calendar.YEAR, year);
-        newCalendar.set(Calendar.MONTH, month);
-        newCalendar.set(Calendar.DATE, day);
-        newCalendar.set(Calendar.HOUR_OF_DAY, hour);
-        newCalendar.set(Calendar.MINUTE, minute);
-        newCalendar.set(Calendar.SECOND, second);
-
-        final Date newDate = newCalendar.getTime();
-
-        return newDate;
-    }
-
-    /**
-     * @return the selected date time.
-     */
-    public Date getSelectedDateTime() {
-        return selectedDateTime;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/CopyToolTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/CopyToolTest.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/CopyToolTest.java
index c4dae61..59f75a5 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/CopyToolTest.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/CopyToolTest.java
@@ -73,7 +73,6 @@ public class CopyToolTest {
     private static final boolean IS_MOCK = true;
     private static final boolean USE_TIME_SYNC = false;
     private static final boolean USE_COPY_FILE_OUTPUT = false;
-    private static final boolean IS_START_TIME_DIALOG_ENABLED = false;
 
     private static final String CHILD_SUFFIX = MergeTool.CHILD_SUFFIX;
 
@@ -167,7 +166,7 @@ public class CopyToolTest {
                 makeArgument(CopyTool.USE_COPY_FILE_OUTPUT_DIRECTORY_CLEAR, Boolean.toString(true)),
                 makeArgument(CopyTool.COPY_FILE_IMPORT_DIRECTORY, "resources/test/copy_tool_file_output/"),
                 makeArgument(CopyTool.USE_COPY_FILE_IMPORT, Boolean.toString(isImporting)),
-                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate, IS_START_TIME_DIALOG_ENABLED))
+                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate))
         });
 
         final Configuration toolConfig = copyTool.getConf();

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java
index 7c89466..54e5b44 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java
@@ -68,7 +68,6 @@ public class MergeToolTest {
 
     private static final boolean IS_MOCK = true;
     private static final boolean USE_TIME_SYNC = false;
-    private static final boolean IS_START_TIME_DIALOG_ENABLED = false;
 
     private static final String CHILD_SUFFIX = MergeTool.CHILD_SUFFIX;
 
@@ -157,7 +156,7 @@ public class MergeToolTest {
                 makeArgument(CopyTool.CHILD_TOMCAT_URL_PROP, CHILD_TOMCAT_URL),
                 makeArgument(CopyTool.NTP_SERVER_HOST_PROP, TimeUtils.DEFAULT_TIME_SERVER_HOST),
                 makeArgument(CopyTool.USE_NTP_SERVER_PROP, Boolean.toString(USE_TIME_SYNC)),
-                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate, IS_START_TIME_DIALOG_ENABLED))
+                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate))
         });
 
         log.info("Finished running tool.");

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/CopyToolDemo.java
----------------------------------------------------------------------
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/CopyToolDemo.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/CopyToolDemo.java
index e789c5f..6ac8d30 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/CopyToolDemo.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/CopyToolDemo.java
@@ -71,7 +71,6 @@ public class CopyToolDemo {
     private static final boolean USE_COPY_FILE_OUTPUT = false;
     private static final boolean USE_COPY_FILE_IMPORT = false;
     private static final boolean IS_PROMPTING_ENABLED = true;
-    private static final boolean IS_START_TIME_DIALOG_ENABLED = true;
     private static final LoggingDetail LOGGING_DETAIL = LoggingDetail.LIGHT;
 
     private static final String CHILD_SUFFIX = MergeTool.CHILD_SUFFIX;
@@ -190,7 +189,7 @@ public class CopyToolDemo {
                 makeArgument(CopyTool.COPY_FILE_IMPORT_DIRECTORY, "resources/test/copy_tool_file_output/"),
                 makeArgument(CopyTool.USE_COPY_FILE_IMPORT, Boolean.toString(USE_COPY_FILE_IMPORT)),
                 //makeArgument(CopyTool.COPY_TABLE_LIST_PROP, Joiner.on(",").join(accumuloDualInstanceDriver.getParentTableList())),
-                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate, IS_START_TIME_DIALOG_ENABLED))
+                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate))
         });
 
         final Configuration toolConfig = copyTool.getConf();

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3aae3258/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java
----------------------------------------------------------------------
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java
index c4cbdb9..6cc59f0 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java
@@ -56,7 +56,6 @@ public class MergeToolDemo {
     private static final boolean USE_TIME_SYNC = false;
     private static final boolean USE_MERGE_FILE_INPUT = false;
     private static final boolean IS_PROMPTING_ENABLED = true;
-    private static final boolean IS_START_TIME_DIALOG_ENABLED = true;
     private static final LoggingDetail LOGGING_DETAIL = LoggingDetail.LIGHT;
 
     private static final String CHILD_SUFFIX = MergeTool.CHILD_SUFFIX;
@@ -174,7 +173,7 @@ public class MergeToolDemo {
                 makeArgument(CopyTool.USE_NTP_SERVER_PROP, Boolean.toString(USE_TIME_SYNC)),
                 makeArgument(MergeTool.USE_MERGE_FILE_INPUT, Boolean.toString(USE_MERGE_FILE_INPUT)),
                 makeArgument(MergeTool.MERGE_FILE_INPUT_PATH, "resources/test/merge_tool_file_input/"),
-                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate, IS_START_TIME_DIALOG_ENABLED))
+                makeArgument(MergeTool.START_TIME_PROP, MergeTool.getStartTimeString(startDate))
         });
 
         log.info("Finished running tool.");


[2/3] incubator-rya git commit: RYA-360 Fixed licensing issues. Closes #222

Posted by dl...@apache.org.
RYA-360 Fixed licensing issues. Closes #222

Corrected Copyright on the NOTICE file.
Fixed a license header.
Renamed some occurrences of Rya to Apache Rya in documentation.
Updated generated source headers to use the AL for the ASF.


Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/46245982
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/46245982
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/46245982

Branch: refs/heads/master
Commit: 46245982d63cec5cdb0a627ed2412518a4458590
Parents: 3aae325
Author: jdasch <hc...@gmail.com>
Authored: Wed Sep 6 13:56:59 2017 -0400
Committer: David Lotts <da...@parsons.com>
Committed: Fri Sep 8 15:03:48 2017 -0400

----------------------------------------------------------------------
 NOTICE                                          |  2 +-
 README.md                                       | 10 +--
 extras/rya.benchmark/pom.xml                    | 23 ++---
 extras/rya.benchmark/src/license/header.txt     | 16 ++++
 extras/rya.export/export.accumulo/pom.xml       | 23 ++---
 .../rya.export/export.accumulo/src/.gitignore   |  1 -
 .../export.accumulo/src/license/header.txt      | 16 ++++
 extras/rya.export/export.api/pom.xml            | 24 +++---
 extras/rya.export/export.api/src/gen/.gitignore |  1 -
 .../export.api/src/license/header.txt           | 16 ++++
 .../rya/export/client/conf/TimeUtils.java       | 32 ++++---
 extras/rya.manual/src/site/markdown/_index.md   | 91 ++++++++++----------
 .../src/site/markdown/build-source.md           |  2 +-
 extras/rya.manual/src/site/markdown/eval.md     |  2 +-
 extras/rya.manual/src/site/markdown/index.md    |  6 +-
 .../src/site/markdown/loadPrecomputedJoin.md    |  2 +-
 .../rya.manual/src/site/markdown/mapreduce.md   |  2 +-
 extras/rya.manual/src/site/markdown/overview.md |  4 +-
 .../rya.manual/src/site/markdown/querydata.md   |  2 +-
 .../rya.manual/src/site/markdown/quickstart.md  |  4 +-
 .../src/site/markdown/sm-firststeps.md          |  2 +-
 extras/rya.manual/src/site/markdown/sm-infer.md |  2 +-
 .../src/site/markdown/sm-simpleaqr.md           |  2 +-
 pom.xml                                         | 10 +--
 24 files changed, 170 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index 9e44983..0f192f4 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Rya (Incubating)
-Copyright 2016 The Apache Software Foundation
+Copyright 2015-2017 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index deb1973..640d1b6 100644
--- a/README.md
+++ b/README.md
@@ -15,17 +15,17 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. -->
 
-# RYA
+# Apache Rya
 
 ## Overview
 
-[RYA] is a scalable RDF Store that is built on top of a Columnar Index Store (such as Accumulo). It is implemented as an extension to OpenRdf to provide easy query mechanisms (SPARQL, SERQL, etc) and Rdf data storage (RDF/XML, NTriples, etc).
+[Apache Rya] is a scalable RDF Store that is built on top of a Columnar Index Store (such as Accumulo). It is implemented as an extension to OpenRdf to provide easy query mechanisms (SPARQL, SERQL, etc) and Rdf data storage (RDF/XML, NTriples, etc).
 
-RYA stands for RDF y(and) Accumulo.
+Rya stands for RDF y(and) Accumulo.
 
-## Rya Manual
+## Manual
 
-A copy of the Rya Manual is located [here](extras/rya.manual/src/site/markdown/index.md).  The material in the manual and below may be out of sync.
+A copy of the Apache Rya Manual is located [here](extras/rya.manual/src/site/markdown/index.md).  The material in the manual and below may be out of sync.
 
 ## Upgrade Path
 

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.benchmark/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.benchmark/pom.xml b/extras/rya.benchmark/pom.xml
index 17640e4..a2b2d3b 100644
--- a/extras/rya.benchmark/pom.xml
+++ b/extras/rya.benchmark/pom.xml
@@ -108,23 +108,24 @@
             </plugin>
 
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
+                <groupId>com.mycila</groupId>
                 <artifactId>license-maven-plugin</artifactId>
+                <configuration>
+                    <header>${project.basedir}/src/license/header.txt</header>
+                </configuration>
                 <executions>
                     <execution>
                         <id>update-generated-source-headers</id>
-                        <goals>
-                            <goal>update-file-header</goal>
-                        </goals>
-                        <phase>process-sources</phase>
                         <configuration>
-                            <roots>
-                                <root>${project.build.directory}/generated-sources/jaxb</root>
-                            </roots>
-                            <extraFiles>
-                                <sun-jaxb.episode>xml</sun-jaxb.episode>
-                            </extraFiles>
+                            <basedir>${project.build.directory}/generated-sources</basedir>
+                            <mapping>
+                                <sun-jaxb.episode>XML_STYLE</sun-jaxb.episode>
+                            </mapping>
                         </configuration>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>format</goal>
+                        </goals>
                     </execution>
                 </executions>
             </plugin>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.benchmark/src/license/header.txt
----------------------------------------------------------------------
diff --git a/extras/rya.benchmark/src/license/header.txt b/extras/rya.benchmark/src/license/header.txt
new file mode 100644
index 0000000..90705e0
--- /dev/null
+++ b/extras/rya.benchmark/src/license/header.txt
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.export/export.accumulo/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.accumulo/pom.xml b/extras/rya.export/export.accumulo/pom.xml
index 19342d2..406c93d 100644
--- a/extras/rya.export/export.accumulo/pom.xml
+++ b/extras/rya.export/export.accumulo/pom.xml
@@ -100,23 +100,24 @@ under the License.
             </plugin>
 
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
+                <groupId>com.mycila</groupId>
                 <artifactId>license-maven-plugin</artifactId>
+                <configuration>
+                    <header>${project.basedir}/src/license/header.txt</header>
+                </configuration>
                 <executions>
                     <execution>
                         <id>update-generated-source-headers</id>
-                        <goals>
-                            <goal>update-file-header</goal>
-                        </goals>
-                        <phase>process-sources</phase>
                         <configuration>
-                            <roots>
-                                <root>${project.build.directory}/generated-sources/jaxb</root>
-                            </roots>
-                            <extraFiles>
-                                <sun-jaxb.episode>xml</sun-jaxb.episode>
-                            </extraFiles>
+                            <basedir>${project.build.directory}/generated-sources</basedir>
+                            <mapping>
+                                <sun-jaxb.episode>XML_STYLE</sun-jaxb.episode>
+                            </mapping>
                         </configuration>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>format</goal>
+                        </goals>
                     </execution>
                 </executions>
             </plugin>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.export/export.accumulo/src/.gitignore
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.accumulo/src/.gitignore b/extras/rya.export/export.accumulo/src/.gitignore
deleted file mode 100644
index e8e450b..0000000
--- a/extras/rya.export/export.accumulo/src/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-gen/

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.export/export.accumulo/src/license/header.txt
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.accumulo/src/license/header.txt b/extras/rya.export/export.accumulo/src/license/header.txt
new file mode 100644
index 0000000..90705e0
--- /dev/null
+++ b/extras/rya.export/export.accumulo/src/license/header.txt
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.export/export.api/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.api/pom.xml b/extras/rya.export/export.api/pom.xml
index f699bec..b07a664 100644
--- a/extras/rya.export/export.api/pom.xml
+++ b/extras/rya.export/export.api/pom.xml
@@ -91,25 +91,25 @@ under the License.
                     <packageName>org.apache.rya.export</packageName>
                 </configuration>
             </plugin>
-
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
+                <groupId>com.mycila</groupId>
                 <artifactId>license-maven-plugin</artifactId>
+                <configuration>
+                    <header>${project.basedir}/src/license/header.txt</header>
+                </configuration>
                 <executions>
                     <execution>
                         <id>update-generated-source-headers</id>
-                        <goals>
-                            <goal>update-file-header</goal>
-                        </goals>
-                        <phase>process-sources</phase>
                         <configuration>
-                            <roots>
-                                <root>${project.build.directory}/generated-sources/jaxb</root>
-                            </roots>
-                            <extraFiles>
-                                <sun-jaxb.episode>xml</sun-jaxb.episode>
-                            </extraFiles>
+                            <basedir>${project.build.directory}/generated-sources</basedir>
+                            <mapping>
+                                <sun-jaxb.episode>XML_STYLE</sun-jaxb.episode>
+                            </mapping>
                         </configuration>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>format</goal>
+                        </goals>
                     </execution>
                 </executions>
             </plugin>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.export/export.api/src/gen/.gitignore
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.api/src/gen/.gitignore b/extras/rya.export/export.api/src/gen/.gitignore
deleted file mode 100644
index 1e574a9..0000000
--- a/extras/rya.export/export.api/src/gen/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/java/

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.export/export.api/src/license/header.txt
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.api/src/license/header.txt b/extras/rya.export/export.api/src/license/header.txt
new file mode 100644
index 0000000..90705e0
--- /dev/null
+++ b/extras/rya.export/export.api/src/license/header.txt
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/TimeUtils.java
----------------------------------------------------------------------
diff --git a/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/TimeUtils.java b/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/TimeUtils.java
index 596e98d..c7e2174 100644
--- a/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/TimeUtils.java
+++ b/extras/rya.export/export.client/src/main/java/org/apache/rya/export/client/conf/TimeUtils.java
@@ -1,24 +1,22 @@
-package org.apache.rya.export.client.conf;
-
 /*
- * #%L
- * mvm.rya.accumulo.mr.merge
- * %%
- * Copyright (C) 2014 Rya
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
+package org.apache.rya.export.client.conf;
 
 import java.io.IOException;
 import java.net.HttpURLConnection;

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/_index.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/_index.md b/extras/rya.manual/src/site/markdown/_index.md
index 6e45779..9e682a5 100644
--- a/extras/rya.manual/src/site/markdown/_index.md
+++ b/extras/rya.manual/src/site/markdown/_index.md
@@ -1,45 +1,48 @@
-
-<!--
-
-[comment]: # Licensed to the Apache Software Foundation (ASF) under one
-[comment]: # or more contributor license agreements.  See the NOTICE file
-[comment]: # distributed with this work for additional information
-[comment]: # regarding copyright ownership.  The ASF licenses this file
-[comment]: # to you under the Apache License, Version 2.0 (the
-[comment]: # "License"); you may not use this file except in compliance
-[comment]: # with the License.  You may obtain a copy of the License at
-[comment]: # 
-[comment]: #   http://www.apache.org/licenses/LICENSE-2.0
-[comment]: # 
-[comment]: # Unless required by applicable law or agreed to in writing,
-[comment]: # software distributed under the License is distributed on an
-[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-[comment]: # KIND, either express or implied.  See the License for the
-[comment]: # specific language governing permissions and limitations
-[comment]: # under the License.
-
--->
-
-# Rya
-- [Overview](overview.md)
-- [Quick Start](quickstart.md)
-- [Load Data](loaddata.md)
-- [Query Data](querydata.md)
-- [Evaluation Table](eval.md)
-- [Pre-computed Joins](loadPrecomputedJoin.md)
-- [Inferencing](infer.md)
+
+<!--
+
+[comment]: # Licensed to the Apache Software Foundation (ASF) under one
+[comment]: # or more contributor license agreements.  See the NOTICE file
+[comment]: # distributed with this work for additional information
+[comment]: # regarding copyright ownership.  The ASF licenses this file
+[comment]: # to you under the Apache License, Version 2.0 (the
+[comment]: # "License"); you may not use this file except in compliance
+[comment]: # with the License.  You may obtain a copy of the License at
+[comment]: # 
+[comment]: #   http://www.apache.org/licenses/LICENSE-2.0
+[comment]: # 
+[comment]: # Unless required by applicable law or agreed to in writing,
+[comment]: # software distributed under the License is distributed on an
+[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+[comment]: # KIND, either express or implied.  See the License for the
+[comment]: # specific language governing permissions and limitations
+[comment]: # under the License.
+
+-->
+
+# Apache Rya
+
+This project contains documentation about Apache Rya, a scalable RDF triple store on top of Accumulo.
+
+- [Overview](overview.md)
+- [Quick Start](quickstart.md)
+- [Load Data](loaddata.md)
+- [Query Data](querydata.md)
+- [Evaluation Table](eval.md)
+- [Pre-computed Joins](loadPrecomputedJoin.md)
+- [Inferencing](infer.md)
 - [MapReduce Interface](mapreduce.md)
-
-# Samples
-- [Typical First Steps](sm-firststeps.md)
-- [Simple Add/Query/Remove Statements](sm-simpleaqr.md)
-- [Sparql query](sm-sparqlquery.md)
-- [Adding Authentication](sm-addauth.md)
-- [Inferencing](sm-infer.md)
-- [Named Graph](sm-namedgraph.md)
-- [Update data](sm-updatedata.md)
-- [Alx](alx.md)
-
-# Development
-- [Building From Source](build-source.md)
-- [LTS Maven Settings XML](maven-settings.md)
+
+# Samples
+- [Typical First Steps](sm-firststeps.md)
+- [Simple Add/Query/Remove Statements](sm-simpleaqr.md)
+- [Sparql query](sm-sparqlquery.md)
+- [Adding Authentication](sm-addauth.md)
+- [Inferencing](sm-infer.md)
+- [Named Graph](sm-namedgraph.md)
+- [Update data](sm-updatedata.md)
+- [Alx](alx.md)
+
+# Development
+- [Building From Source](build-source.md)
+- [LTS Maven Settings XML](maven-settings.md)

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/build-source.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/build-source.md b/extras/rya.manual/src/site/markdown/build-source.md
index 07f0cb5..91e0bda 100644
--- a/extras/rya.manual/src/site/markdown/build-source.md
+++ b/extras/rya.manual/src/site/markdown/build-source.md
@@ -23,7 +23,7 @@
 
 ## Prerequisites
 
-* Rya code
+* Apache Rya code
 * Maven 2.2 +
 
 ## Building

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/eval.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/eval.md b/extras/rya.manual/src/site/markdown/eval.md
index ff894eb..ac75086 100644
--- a/extras/rya.manual/src/site/markdown/eval.md
+++ b/extras/rya.manual/src/site/markdown/eval.md
@@ -22,7 +22,7 @@
 # Prospects Table
 
 The Prospects Table provides statistics on the number of subject/predicate/object data found in the triple store. It is currently a
-Map Reduce job that will run against the Rya store and save all the statistics in the prosepcts table.
+Map Reduce job that will run against the Apache Rya store and save all the statistics in the prospects table.
 
 ## Build
 

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/index.md b/extras/rya.manual/src/site/markdown/index.md
index 2840d10..9e682a5 100644
--- a/extras/rya.manual/src/site/markdown/index.md
+++ b/extras/rya.manual/src/site/markdown/index.md
@@ -19,9 +19,10 @@
 [comment]: # under the License.
 
 -->
-# Rya
 
-This project contains documentation about the Rya, a scalable RDF triple store on top of Accumulo.
+# Apache Rya
+
+This project contains documentation about Apache Rya, a scalable RDF triple store on top of Accumulo.
 
 - [Overview](overview.md)
 - [Quick Start](quickstart.md)
@@ -44,3 +45,4 @@ This project contains documentation about the Rya, a scalable RDF triple store o
 
 # Development
 - [Building From Source](build-source.md)
+- [LTS Maven Settings XML](maven-settings.md)

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md b/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md
index 2616ab3..f0d1e02 100644
--- a/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md
+++ b/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md
@@ -21,7 +21,7 @@
 -->
 # Load Pre-computed Join
 
-A tool has been created to load a pre-computed join.  This tool will generate an index to support a pre-computed join on a user provided SPARQL query, and then register that query within Rya.
+A tool has been created to load a pre-computed join.  This tool will generate an index to support a pre-computed join on a user provided SPARQL query, and then register that query within Apache Rya.
 
 
 ## Registering a pre-computed join

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/mapreduce.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/mapreduce.md b/extras/rya.manual/src/site/markdown/mapreduce.md
index 2763307..f99a78f 100644
--- a/extras/rya.manual/src/site/markdown/mapreduce.md
+++ b/extras/rya.manual/src/site/markdown/mapreduce.md
@@ -20,7 +20,7 @@
 -->
 # MapReduce Interface
 
-The rya.mapreduce project contains a set of classes facilitating the use of
+The Apache Rya `rya.mapreduce` project contains a set of classes facilitating the use of
 Accumulo-backed Rya as the input source or output destination of Hadoop
 MapReduce jobs.
 

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/overview.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/overview.md b/extras/rya.manual/src/site/markdown/overview.md
index 068bd57..46da734 100644
--- a/extras/rya.manual/src/site/markdown/overview.md
+++ b/extras/rya.manual/src/site/markdown/overview.md
@@ -21,6 +21,6 @@
 -->
 # Overview
 
-RYA is a scalable RDF Store that is built on top of a Columnar Index Store (such as Accumulo). It is implemented as an extension to OpenRdf to provide easy query mechanisms (SPARQL, SERQL, etc) and Rdf data storage (RDF/XML, NTriples, etc).
+Apache Rya is a scalable RDF Store that is built on top of a Columnar Index Store (such as Accumulo). It is implemented as an extension to OpenRdf to provide easy query mechanisms (SPARQL, SERQL, etc) and Rdf data storage (RDF/XML, NTriples, etc).
 
-RYA stands for RDF y(and) Accumulo.
+Rya stands for RDF y(and) Accumulo.

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/querydata.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/querydata.md b/extras/rya.manual/src/site/markdown/querydata.md
index a7e2a6d..adc5d12 100644
--- a/extras/rya.manual/src/site/markdown/querydata.md
+++ b/extras/rya.manual/src/site/markdown/querydata.md
@@ -21,7 +21,7 @@
 -->
 # Query Data
 
-There are a few mechanisms to query data
+Apache Rya has a few mechanisms to query data
 
 ## Web JSP endpoint
 

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/quickstart.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/quickstart.md b/extras/rya.manual/src/site/markdown/quickstart.md
index 4f0aa05..f0d76a8 100644
--- a/extras/rya.manual/src/site/markdown/quickstart.md
+++ b/extras/rya.manual/src/site/markdown/quickstart.md
@@ -21,12 +21,12 @@
 -->
 # Quick Start
 
-This tutorial will outline the steps needed to get quickly started with the Rya store using the web based endpoint.
+This tutorial will outline the steps needed to get quickly started with the Apache Rya store using the web based endpoint.
 
 ## Prerequisites
 
 * Columnar Store (Accumulo)
-* Rya code (Git: git://git.apache.org/incubator-rya.git)
+* Apache Rya code (Git: git://git.apache.org/incubator-rya.git)
 * Maven 3.0 +
 
 ## Building from Source

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/sm-firststeps.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/sm-firststeps.md b/extras/rya.manual/src/site/markdown/sm-firststeps.md
index 5f49b41..228bfb5 100644
--- a/extras/rya.manual/src/site/markdown/sm-firststeps.md
+++ b/extras/rya.manual/src/site/markdown/sm-firststeps.md
@@ -27,7 +27,7 @@ In this tutorial, I will give you a quick overview of some of the first steps I
 
  We are assuming Accumulo 1.5+ usage here.
 
- * Rya Source Code `web.rya.war`)
+ * Apache Rya Source Code (`web.rya.war`)
  * Accumulo on top of Hadoop 0.20+
  * RDF Data (in N-Triples format, this format is the easiest to bulk load)
 

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/sm-infer.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/sm-infer.md b/extras/rya.manual/src/site/markdown/sm-infer.md
index a2b0b66..c2d112c 100644
--- a/extras/rya.manual/src/site/markdown/sm-infer.md
+++ b/extras/rya.manual/src/site/markdown/sm-infer.md
@@ -21,7 +21,7 @@
 -->
 # Inferencing
 
-Rya currently provides simple inferencing. The supported list of inferred relationships include:
+Apache Rya currently provides simple inferencing. The supported list of inferred relationships include:
 
 - rdfs:subClassOf
 - rdfs:subPropertyOf

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/extras/rya.manual/src/site/markdown/sm-simpleaqr.md
----------------------------------------------------------------------
diff --git a/extras/rya.manual/src/site/markdown/sm-simpleaqr.md b/extras/rya.manual/src/site/markdown/sm-simpleaqr.md
index cb8f068..9188c2a 100644
--- a/extras/rya.manual/src/site/markdown/sm-simpleaqr.md
+++ b/extras/rya.manual/src/site/markdown/sm-simpleaqr.md
@@ -21,7 +21,7 @@
 -->
 # Simple Add Query and Remove of Statements
 
-This quick tutorial will give a small example on how to add, query, and remove statements from Rya
+This quick tutorial will give a small example on how to add, query, and remove statements from Apache Rya
 
 ## Code
 

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/46245982/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 51822be..7a0bf2c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -940,15 +940,9 @@ under the License.
                     </configuration>
                 </plugin>
                 <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
+                    <groupId>com.mycila</groupId>
                     <artifactId>license-maven-plugin</artifactId>
-                    <version>1.13</version>
-                    <configuration>
-                        <licenseName>apache_v2</licenseName>
-                        <processStartTag>========================LICENSE_START=================================</processStartTag>
-                        <processEndTag>=========================LICENSE_END==================================</processEndTag>
-                        <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
-                    </configuration>
+                    <version>3.0</version>
                 </plugin>
             </plugins>
         </pluginManagement>


[3/3] incubator-rya git commit: RYA-362 Improved UX for case where create-pcj is called without args. Closes #223

Posted by dl...@apache.org.
RYA-362 Improved UX for case where create-pcj is called without args. Closes #223


Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/28b0a52d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/28b0a52d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/28b0a52d

Branch: refs/heads/master
Commit: 28b0a52d056a553f8602cd204791d577d50b5e1c
Parents: 4624598
Author: jdasch <hc...@gmail.com>
Authored: Thu Sep 7 10:14:18 2017 -0400
Committer: David Lotts <da...@parsons.com>
Committed: Fri Sep 8 15:04:33 2017 -0400

----------------------------------------------------------------------
 .../org/apache/rya/shell/RyaAdminCommands.java  | 25 ++++++++++----------
 .../apache/rya/shell/RyaAdminCommandsTest.java  | 19 +++++++++++++++
 2 files changed, 32 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/28b0a52d/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java b/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
index 7d0ab79..db81096 100644
--- a/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
+++ b/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
@@ -290,9 +290,9 @@ public class RyaAdminCommands implements CommandMarker {
 
     @CliCommand(value = CREATE_PCJ_CMD, help = "Creates and starts the maintenance of a new PCJ using a Fluo application.")
     public String createPcj(
-            @CliOption(key = {"exportToRya"}, mandatory = false, help = "Indicates that results for the query should be exported to a Rya PCJ table.")
+            @CliOption(key = {"exportToRya"}, mandatory = false, help = "Indicates that results for the query should be exported to a Rya PCJ table.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
             boolean exportToRya,
-            @CliOption(key = {"exportToKafka"}, mandatory = false, help = "Indicates that results for the query should be exported to a Kafka Topic.")
+            @CliOption(key = {"exportToKafka"}, mandatory = false, help = "Indicates that results for the query should be exported to a Kafka Topic.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
             boolean exportToKafka) {
         // Fetch the command that is connected to the store.
         final ShellState shellState = state.getShellState();
@@ -300,19 +300,20 @@ public class RyaAdminCommands implements CommandMarker {
         final String ryaInstance = shellState.getRyaInstanceName().get();
 
         try {
+            final Set<ExportStrategy> strategies = new HashSet<>();
+            if(exportToRya) {
+                strategies.add(ExportStrategy.RYA);
+            }
+            if(exportToKafka) {
+                strategies.add(ExportStrategy.KAFKA);
+            }
+            if(strategies.isEmpty()) {
+                return "The user must specify at least one export strategy: (--exportToRya, --exportToKafka)";
+            }
+            
             // Prompt the user for the SPARQL.
             final Optional<String> sparql = sparqlPrompt.getSparql();
             if (sparql.isPresent()) {
-                Set<ExportStrategy> strategies = new HashSet<>();
-                if(exportToRya) {
-                    strategies.add(ExportStrategy.RYA);
-                }
-                if(exportToKafka) {
-                    strategies.add(ExportStrategy.KAFKA);
-                }
-                if(strategies.size() == 0) {
-                    return "The user must specify at least one export strategy by setting either exportToRya or exportToKafka to true."; 
-                }
                 // Execute the command.
                 final String pcjId = commands.getCreatePCJ().createPCJ(ryaInstance, sparql.get(), strategies);
                 // Return a message that indicates the ID of the newly created ID.

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/28b0a52d/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java b/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
index f08e02a..1249536 100644
--- a/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
+++ b/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
@@ -128,6 +128,25 @@ public class RyaAdminCommandsTest {
     }
 
     @Test
+    public void createPCJ_noExportStrategy() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        final String message = commands.createPcj(false, false);
+
+        // Verify a message is returned that explains what was created.
+        assertEquals("The user must specify at least one export strategy: (--exportToRya, --exportToKafka)", message);
+    }
+
+    @Test
     public void deletePCJ() throws InstanceDoesNotExistException, RyaClientException {
         // Mock the object that performs the delete operation.
         final DeletePCJ mockDeletePCJ = mock(DeletePCJ.class);