macaw.businessLayer
Class DerivedVariable

java.lang.Object
  extended by macaw.businessLayer.Variable
      extended by macaw.businessLayer.DerivedVariable
All Implemented Interfaces:
java.lang.Cloneable, Displayable

public class DerivedVariable
extends Variable

a Variable that has been created using data from one or more Variable.


Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing 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.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Field Summary
 
Fields inherited from class macaw.businessLayer.Variable
codeBookNumber, columnEnd, columnStart, form, notes, questionNumber
 
Constructor Summary
DerivedVariable()
           
 
Method Summary
 void addSourceVariable(Variable variable)
           
 void addSourceVariables(java.util.ArrayList<Variable> variables)
           
 java.lang.Object clone()
           
 boolean containsSourceVariable(Variable targetVariable)
           
static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user, DerivedVariable originalDerivedVariable, DerivedVariable revisedDerivedVariable)
           
 java.util.ArrayList<Variable> getSourceVariables()
           
 boolean hasSameDisplayName(Variable variable)
           
 void removeSourceVariable(Variable variable)
           
 void removeSourceVariables(java.util.ArrayList<Variable> variablesToDelete)
           
 void setSourceVariables(java.util.ArrayList<Variable> sourceVariables)
           
static void validateFields(DerivedVariable derivedVariable)
           
 
Methods inherited from class macaw.businessLayer.Variable
addOntologyTerm, addOntologyTerms, addSupportingDocument, addSupportingDocuments, addValueLabel, cloneAttributes, containsOntologyTerm, containsSupportingDocument, createVariableSummary, detectChangesInAlternativeVariable, detectFieldChanges, getAlias, getAlternativeVariable, getAvailability, getCategory, getCleaningDescription, getCleaningStatus, getCodeBookNumber, getColumnEnd, getColumnStart, getDisplayItemIdentifier, getDisplayName, getFilePath, getForm, getIdentifier, getLabel, getName, getNotes, getOntologyTerms, getQuestionNumber, getSupportingDocuments, getValueLabels, getYear, isCleaned, isCoded, isNewRecord, removeOntologyTerm, removeOntologyTerms, removeSupportingDocument, removeSupportingDocuments, removeValueLabel, setAlias, setAlternativeVariable, setAvailability, setCategory, setCleaned, setCleaningDescription, setCleaningStatus, setCodeBookNumber, setCoded, setColumnEnd, setColumnStart, setFilePath, setForm, setIdentifier, setIsNewRecord, setLabel, setName, setNotes, setOntologyTerms, setQuestionNumber, setSupportingDocuments, setValueLabels, setYear, updateOntologyTerm, validateFields
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerivedVariable

public DerivedVariable()
Method Detail

getSourceVariables

public java.util.ArrayList<Variable> getSourceVariables()

addSourceVariables

public void addSourceVariables(java.util.ArrayList<Variable> variables)

setSourceVariables

public void setSourceVariables(java.util.ArrayList<Variable> sourceVariables)

addSourceVariable

public void addSourceVariable(Variable variable)

removeSourceVariable

public void removeSourceVariable(Variable variable)

removeSourceVariables

public void removeSourceVariables(java.util.ArrayList<Variable> variablesToDelete)

containsSourceVariable

public boolean containsSourceVariable(Variable targetVariable)

detectFieldChanges

public static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user,
                                                                       DerivedVariable originalDerivedVariable,
                                                                       DerivedVariable revisedDerivedVariable)

hasSameDisplayName

public boolean hasSameDisplayName(Variable variable)

validateFields

public static void validateFields(DerivedVariable derivedVariable)
                           throws MacawException
Throws:
MacawException

clone

public java.lang.Object clone()
Specified by:
clone in class Variable