Search in sources :

Example 1 with UUIDAttribute

use of doc.attributes.UUIDAttribute in project OpenNotebook by jaltekruse.

the class MathObject method addGenericDefaultAttributes.

public void addGenericDefaultAttributes() {
    addAttribute(new IntegerAttribute(X_POS, 0, 0, 610, false, false));
    addAttribute(new IntegerAttribute(Y_POS, 0, 0, 790, false, false));
    addAttribute(new IntegerAttribute(WIDTH, 1, 1, 610, false, false));
    addAttribute(new IntegerAttribute(HEIGHT, 1, 1, 790, false, false));
    addAttribute(new UUIDAttribute(OBJECT_ID, UUID.randomUUID(), false, false));
}
Also used : IntegerAttribute(doc.attributes.IntegerAttribute) UUIDAttribute(doc.attributes.UUIDAttribute)

Example 2 with UUIDAttribute

use of doc.attributes.UUIDAttribute in project OpenNotebook by jaltekruse.

the class GeneratedProblem method addGeneratedProblemAttibutes.

private void addGeneratedProblemAttibutes() {
    addList(new ListAttribute<>(GEN_LIST, new UUIDAttribute(""), 20, false, false));
    // the next line for adding UUID_STR as an attribute was commented out
    // it broke the JAVA based expression problem generators
    // I uncommented it, but I don't remember why I commented it out origionally
    // figured it out, this was replaced with the list above, leaving it in broke the parsing
    // of the generated problems created from VarValInsertionProblems
    //addAttribute(new UUIDAttribute(UUID_STR, false, false));
    addAttribute(new IntegerAttribute(DIFFICULTY, false));
}
Also used : IntegerAttribute(doc.attributes.IntegerAttribute) UUIDAttribute(doc.attributes.UUIDAttribute)

Example 3 with UUIDAttribute

use of doc.attributes.UUIDAttribute in project OpenNotebook by jaltekruse.

the class ProblemGenerator method addProblemAttributes.

private void addProblemAttributes() {
    addAttribute(new StringAttribute(NAME, false));
    addAttribute(new StringAttribute(DIRECTIONS, false));
    addAttribute(new StringAttribute(AUTHOR, false));
    addAttribute(new DateAttribute(DATE, false));
    addAttribute(new UUIDAttribute(UUID_STR, UUID.randomUUID(), false));
    addList(new ListAttribute<>(TAGS, new StringAttribute(""), false));
    addList(new ListAttribute<>(SCRIPTS, new StringAttribute("")));
}
Also used : StringAttribute(doc.attributes.StringAttribute) UUIDAttribute(doc.attributes.UUIDAttribute) DateAttribute(doc.attributes.DateAttribute)

Aggregations

UUIDAttribute (doc.attributes.UUIDAttribute)3 IntegerAttribute (doc.attributes.IntegerAttribute)2 DateAttribute (doc.attributes.DateAttribute)1 StringAttribute (doc.attributes.StringAttribute)1