Class RoutePlotQuestionProfile
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.DatabaseBlobBean
org.deltava.beans.ImageBean
org.deltava.beans.testing.Question
org.deltava.beans.testing.QuestionProfile
org.deltava.beans.testing.MultiChoiceQuestionProfile
org.deltava.beans.testing.RoutePlotQuestionProfile
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<Object>, Auditable, IDBean, RoutePair, MultipleChoice, PassStatistics, RoutePlot, ViewEntry, Cacheable
A bean to store route plotting question data.
- Since:
- 2.3
- Version:
- 12.0
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ImageBean
ImageBean.ImageFormatNested classes/interfaces inherited from interface RoutePair
RoutePair.RoutePairImplModifier and TypeInterfaceDescriptionstatic classHelper class when all you need is a naked RoutePair. -
Field Summary
Fields inherited from class DatabaseBlobBean
_buffer -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new route plotting question profile. -
Method Summary
Modifier and TypeMethodDescriptionReturns the arrival Airport.Returns the departure Airport.Returns the CSS row class name if included in a view table.voidUpdates the arrival Airport.voidUpdates the departure Airport.Converts this profile into aMultiChoiceQuestionbean.Methods inherited from class MultiChoiceQuestionProfile
addChoice, getChoices, setChoices, setCorrectAnswerModifier and TypeMethodDescriptionvoidAdds a choice to the available choices.Returns the list of choices.voidsetChoices(Collection<String> choices) Clears and updates the list of available choices.voidsetCorrectAnswer(String answer) Sets the correct answer to this question.Methods inherited from class QuestionProfile
addAirline, addExam, compareTo, getActive, getAirlines, getAuditID, getExams, getOwner, getPassCount, getTotal, setActive, setAirlines, setCorrectAnswers, setExams, setNumber, setOwner, setQuestion, setTotalAnswersModifier and TypeMethodDescriptionvoidMakes this Question visible to an Airline.voidLinks this Question to an Examination.final intCompares to another Question by comparing the Question Numbers.booleanReturns whether this Question is active.Returns the Airlines that can access this Question.Returns the object ID for this auditable object.getExams()Returns the Examinatios associated with this Question.getOwner()Returns the Owner Airline for this Question.intReturns the number of test passes or correct answers.intgetTotal()Returns the total number of invocations.voidsetActive(boolean active) Marks this Question as Active.voidsetAirlines(Collection<AirlineInformation> airlines) Sets the Airlines that this Question will be visible to.voidsetCorrectAnswers(int count) Updates the total number of times this Question has been answered correctly.voidsetExams(Collection<String> exams) Links this Question to a number of Examinations.final voidsetNumber(int number) Sets the Question Number.voidSets which airline is the owner of this Question.voidsetQuestion(String text) Updates the Question text.voidsetTotalAnswers(int count) Updates the total number of times this Question has been included in an Examination.Methods inherited from class Question
getAnswer, getCorrectAnswer, getExactMatch, getImageType, getNumber, getQuestion, getReference, isCorrect, setAnswer, setCorrect, setReferenceModifier and TypeMethodDescriptionReturns the User's answer to the Question.Returns the Correct Answer to the Question.booleanReturns if the user has provided the exact correct answer.Returns the database image type.intReturns the Question Number.Returns the Question text.Returns an optional reference to the correct answer.booleanReturns if the question was answered correctly.voidSets the User-provided answer to this Question.voidsetCorrect(boolean isOK) Marks a Question as correctly answered.voidsetReference(String ref) Sets the reference to the correct answer to this Question.Methods inherited from class ImageBean
checkParam, getFormat, getHasImage, getHeight, getSize, getWidth, load, load, setFormat, setHeight, setSize, setWidthModifier and TypeMethodDescriptionprotected static voidcheckParam(int param, String msg) Helper method to check for negative numeric parameters.Returns the type of image.booleanQueries if the bean has an associated Image.intReturns the height of the image.intgetSize()Returns the size of the image.intgetWidth()Returns the width of the image.final voidload(byte[] buffer) Updates the image buffer.final voidload(InputStream is) Loads an image into the buffer.voidUpdates the image format.voidsetHeight(int y) Updates the height of this image.voidsetSize(int newSize) Updates the size of this image.voidsetWidth(int x) Updates the width of this image.Methods inherited from class DatabaseBlobBean
clear, getInputStream, isLoadedMethods inherited from class DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateIDModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.booleangetHexID()Returns the hexadecimal database ID of this object.intgetID()Returns the database ID of this object.inthashCode()voidsetID(int id) Update the database row ID of this bean.static voidvalidateID(int oldID, int newID) Validates a database ID.static voidvalidateID(int oldID, int newID, boolean allowZero) Validates a database ID.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Auditable
getAuditType, isCrossAppModifier and TypeMethodDescriptiondefault StringReturns the audit type for this auditable object.default booleanReturns whether this object is within multiple web applications.Methods inherited from interface RoutePair
createKey, getAirports, getDistance, getFlightType, includes, isPopulated, matches, midPointModifier and TypeMethodDescriptiondefault StringReturns a key that describes the route pair.Returns the airports in this Route Pair.default intReturns the distance between the Airports.default FlightTypeReturns the flight type for customs/gate purposes.default booleanReturns whether this RoutePair includes a particular IATA or ICAO code.default booleanReturns whether both airports are populated.default booleanReturns whether this RoutePair matches a particular Route Pair.default GeoLocationmidPoint()Returns the midpoint between the two Airports on a Great Circle route.
-
Constructor Details
-
RoutePlotQuestionProfile
Creates a new route plotting question profile.- Parameters:
text- the Question text- Throws:
NullPointerException- if text is null
-
-
Method Details
-
getAirportA
Description copied from interface:RoutePairReturns the arrival Airport.- Specified by:
getAirportAin interfaceRoutePair- Returns:
- the arrival Airport
-
getAirportD
Description copied from interface:RoutePairReturns the departure Airport.- Specified by:
getAirportDin interfaceRoutePair- Returns:
- the departure Airport
-
setAirportA
Description copied from interface:RoutePlotUpdates the arrival Airport.- Specified by:
setAirportAin interfaceRoutePlot- Parameters:
a- the arrival Airport bean
-
setAirportD
Description copied from interface:RoutePlotUpdates the departure Airport.- Specified by:
setAirportDin interfaceRoutePlot- Parameters:
a- the departure Airport bean
-
getRowClassName
Description copied from class:QuestionProfileReturns the CSS row class name if included in a view table.- Specified by:
getRowClassNamein interfaceViewEntry- Overrides:
getRowClassNamein classQuestionProfile- Returns:
- the CSS class name
-
toQuestion
Description copied from class:MultiChoiceQuestionProfileConverts this profile into aMultiChoiceQuestionbean. The choices will be rearranged in random order.- Overrides:
toQuestionin classMultiChoiceQuestionProfile- Returns:
- a Question bean
-