Revision: 1802
Author: [email protected]
Date: Thu Dec 31 09:34:50 2009
Log: Move question sets into their own classes
http://code.google.com/p/simal/source/detail?r=1802

Added:
   
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/InfoQuestions.java
   
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/KnowledgeQuestions.java
   
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/LegalQuestions.java
Modified:
   
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/SustainabilityRating.java

=======================================
--- /dev/null
+++  
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/InfoQuestions.java
   
Thu Dec 31 09:34:50 2009
@@ -0,0 +1,35 @@
+package uk.ac.osswatch.simal.ssmm;
+/*
+ * Copyright 2008 University of Oxford
+ *
+ * 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                           *
+ *                                                                   *
+ *   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.                                                *
+ */
+
+import uk.ac.osswatch.simal.ssmm.model.Question;
+import uk.ac.osswatch.simal.ssmm.model.QuestionSet;
+
+public class InfoQuestions extends QuestionSet {
+
+       public InfoQuestions() {
+               Question question = new Question("Project name", "What is the 
project  
name?", "Please provide a project name.");
+               put(question.getLabel(), question);
+        question = new Question("Project URL", "What is the URL for the  
project?", "Please provide a project URL.");
+           put(question.getLabel(), question);
+           question = new Question("Contact Name", "What is your name?", "It 
is  
useful for us to thave the name of the person completing this set of  
questions in case we need to talk to the project about your responses.");
+           put(question.getLabel(), question);
+           question = new Question("Contact EMail", "What is your email  
address?", "It is useful for us to thave your email so that we can keep you  
informed about updates to this set of questions.");
+           put(question.getLabel(), question);
+       }
+
+}
=======================================
--- /dev/null
+++  
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/KnowledgeQuestions.java
      
Thu Dec 31 09:34:50 2009
@@ -0,0 +1,42 @@
+package uk.ac.osswatch.simal.ssmm;
+/*
+ * Copyright 2008 University of Oxford
+ *
+ * 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                           *
+ *                                                                   *
+ *   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.                                                *
+ */
+
+import java.util.LinkedHashMap;
+
+import uk.ac.osswatch.simal.ssmm.model.QuestionSet;
+import uk.ac.osswatch.simal.ssmm.model.SelectionQuestion;
+
+public class KnowledgeQuestions extends QuestionSet {
+
+       public KnowledgeQuestions() {
+               LinkedHashMap<String, String> options = new 
LinkedHashMap<String,  
String>();
+               options.put("User Docs", "User documentation section on 
website");
+               options.put("Design Docs", "Design documentation");
+               options.put("Roadmap", "Managed project roadmap");
+               options.put("Metadata", "Machine readable meta-data");
+               options.put("wiki", "Publicly writeable wiki");
+               options.put("Revision control", "Version control system");
+               options.put("Discussion", "Email lists or online forums");
+               options.put("IM", "Instant messaging/IRC");
+               options.put("Issue Tracker", "Issue tracker for bug and feature 
 
tracking");
+
+           SelectionQuestion question = new SelectionQuestion("Communication  
Channels", "Which publicly available communication or dissemination  
mechanisms does the project use?", "Multiple documentation and  
communication components are indicative of at least the opportunity for  
project knowledge to exist. There are certainly cases where too many  
avenues of knowledge can hurt a project.", options);
+               put(question.getLabel(), question);
+       }
+
+}
=======================================
--- /dev/null
+++  
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/LegalQuestions.java
  
Thu Dec 31 09:34:50 2009
@@ -0,0 +1,38 @@
+package uk.ac.osswatch.simal.ssmm;
+/*
+ * Copyright 2008 University of Oxford
+ *
+ * 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                           *
+ *                                                                   *
+ *   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.                                                *
+ */
+
+import java.util.LinkedHashMap;
+
+import uk.ac.osswatch.simal.ssmm.model.MultipleChoiceQuestion;
+import uk.ac.osswatch.simal.ssmm.model.QuestionSet;
+
+public class LegalQuestions extends QuestionSet {
+
+       public LegalQuestions() {
+               LinkedHashMap<String, String> options = new 
LinkedHashMap<String,  
String>();
+               options.put("Don't know", "The licence model is not currently  
understood.");
+               options.put("Proprietary", "The licence used is a proprietary 
licence  
that has not been recognised by either the Free Software Foundation or the  
Open source Initiative");
+               options.put("OSI", "The licence used has been approved by the 
Open  
Source Initiative.");
+               options.put("FSF", "The licence has been recognised by the Free 
Software  
Foundation as a Free Software License");
+               options.put("FSF and OSI", "The license is recognised by the 
FSF and by  
the OSI.");
+
+           MultipleChoiceQuestion question = new 
MultipleChoiceQuestion("License  
type", "Is the licence recognised as a common Free and Open Source  
licences?", "If the licence has been recognised by either of these bodies,  
it is more likely to have been assessed and found to be relatively open  
than a new licence or one which has not been OSI or FSF approved.",  
options);
+               put(question.getLabel(), question);
+       }
+
+}
=======================================
---  
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/SustainabilityRating.java
    
Wed Dec 30 15:27:33 2009
+++  
/trunk/uk.ac.osswatch.simal.ssmm/src/main/uk/ac/osswatch/simal/ssmm/SustainabilityRating.java
    
Thu Dec 31 09:34:50 2009
@@ -17,7 +17,6 @@
   */

  import java.util.Iterator;
-import java.util.LinkedHashMap;
  import java.util.Scanner;

  import uk.ac.osswatch.simal.ssmm.model.MultipleChoiceQuestion;
@@ -28,9 +27,9 @@
  public class SustainabilityRating {

    private static final Object HELP_COMMAND = "help";
-  private static QuestionSet infoQuestions = new QuestionSet();
-  private static QuestionSet legalQuestions = new QuestionSet();
-  private static QuestionSet knowledgeQuestions = new QuestionSet();
+  private static InfoQuestions infoQuestions = new InfoQuestions();
+  private static LegalQuestions legalQuestions = new LegalQuestions();
+  private static KnowledgeQuestions knowledgeQuestions = new  
KnowledgeQuestions();
        /**
           * @param args
           */
@@ -52,50 +51,18 @@
        private static void askInfoQuestions() {
            System.out.println("General Information");
            System.out.println("===================");
-
-               Question question = new Question("Project name", "What is the 
project  
name?", "Please provide a project name.");
-               infoQuestions.put(question.getLabel(), question);
-        question = new Question("Project URL", "What is the URL for the  
project?", "Please provide a project URL.");
-           infoQuestions.put(question.getLabel(), question);
-
            askAll(infoQuestions);
        }

        private static void askKnowledgeQuestions() {
            System.out.println("Knowledge Information");
            System.out.println("=====================");
-
-               LinkedHashMap<String, String> options = new 
LinkedHashMap<String,  
String>();
-               options.put("User Docs", "User documentation section on 
website");
-               options.put("Design Docs", "Design documentation");
-               options.put("Roadmap", "Managed project roadmap");
-               options.put("Metadata", "Machine readable meta-data");
-               options.put("wiki", "Publicly writeable wiki");
-               options.put("Revision control", "Version control system");
-               options.put("Discussion", "Email lists or online forums");
-               options.put("IM", "Instant messaging/IRC");
-               options.put("Issue Tracker", "Issue tracker for bug and feature 
 
tracking");
-
-           SelectionQuestion question = new SelectionQuestion("Communication  
Channels", "Which publicly available communication or dissemination  
mechanisms does the project use?", "Multiple documentation and  
communication components are indicative of at least the opportunity for  
project knowledge to exist. There are certainly cases where too many  
avenues of knowledge can hurt a project.", options);
-               knowledgeQuestions.put(question.getLabel(), question);
-
            askAll(knowledgeQuestions);
        }

        private static void askLegalQuestions() {
            System.out.println("Legal Information");
            System.out.println("=================");
-
-               LinkedHashMap<String, String> options = new 
LinkedHashMap<String,  
String>();
-               options.put("Don't know", "The licence model is not currently  
understood.");
-               options.put("Proprietary", "The licence used is a proprietary 
licence  
that has not been recognised by either the Free Software Foundation or the  
Open source Initiative");
-               options.put("OSI", "The licence used has been approved by the 
Open  
Source Initiative.");
-               options.put("FSF", "The licence has been recognised by the Free 
Software  
Foundation as a Free Software License");
-               options.put("FSF and OSI", "The license is recognised by the 
FSF and by  
the OSI.");
-
-           MultipleChoiceQuestion question = new 
MultipleChoiceQuestion("License  
type", "Is the licence recognised as a common Free and Open Source  
licences?", "If the licence has been recognised by either of these bodies,  
it is more likely to have been assessed and found to be relatively open  
than a new licence or one which has not been OSI or FSF approved.",  
options);
-               legalQuestions.put(question.getLabel(), question);
-
            askAll(legalQuestions);
        }

--

You received this message because you are subscribed to the Google Groups 
"Simal Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simal-commits?hl=en.


Reply via email to