public QtiInvalidLookupException(final Identifier identifier) { this(ComplexReferenceIdentifier.assumedLegal(identifier.toString())); }
/** * @throws QtiParseException if either value is not a valid identifier */ public AbstractPairValue(final String sourceValue, final String destValue) { this.sourceValue = Identifier.parseString(sourceValue); this.destValue = Identifier.parseString(destValue); }
/** * Parses the given Identifier String, making sure it follows the required syntax. * <p> * Use this factory method for user-supplied identifiers. * * @throws QtiParseException if value is not a valid identifier */ public static Identifier parseString(final String value) { verifyIdentifier(value); return new Identifier(value); }
@Override public boolean equals(final Object object) { if (!(object instanceof PairValue)) { return false; } final PairValue other = (PairValue) object; return sourceValue.equals(other.sourceValue) && destValue.equals(other.destValue) || sourceValue.equals(other.destValue) && destValue.equals(other.sourceValue); }
public TestPlanNodeKey(final Identifier identifier, final int abstractPartGlobalIndex, final int instanceNumber) { this.identifier = identifier; this.abstractPartGlobalIndex = abstractPartGlobalIndex; this.instanceNumber = instanceNumber; this.stringRepresentation = identifier.toString() + ":" + abstractPartGlobalIndex + ":" + instanceNumber; }
public FileValue(final FileResponseData fileResponseData) { this.file = fileResponseData.getFile(); this.contentType = fileResponseData.getContentType(); this.fileName = fileResponseData.getFileName(); }
/** * Parses the given Identifier String, making sure it follows the required syntax. * <p> * Use this factory method for user-supplied identifiers. * * @throws QtiParseException if value is not a valid identifier */ public static ComplexReferenceIdentifier parseString(final String value) { verifyIdentifier(value); return new ComplexReferenceIdentifier(value); }
@Override public String toQtiString() { return DataTypeBinder.toString(doubleValue); } }
/** * Creates an {@link ComplexReferenceIdentifier} from the given String, without checking its syntax. * This should ONLY be used for identifiers that are known to be valid, such as the ones * defined in the QTI specification. */ public static ComplexReferenceIdentifier assumedLegal(final String value) { return new ComplexReferenceIdentifier(value); }
@Override public String toDomAttributeValue(final ComplexReferenceIdentifier value) { return value.toString(); } }
/** * Constructs <code>UriValue</code> from given <code>String</code> representation. * * @param value <code>String</code> representation of <code>UriValue</code> * @throws QtiParseException if <code>String</code> representation of <code>UriValue</code> is not valid */ public UriValue(final String value) { this.uriValue = DataTypeBinder.parseUri(value); }
/** * Creates an {@link Identifier} from the given String, without checking its syntax. * This should ONLY be used for identifiers that are known to be valid, such as the ones * defined in the QTI specification. */ public static Identifier assumedLegal(final String value) { return new Identifier(value); }
@Override public String toQtiString() { return identifierValue.toString(); } }
@Override public String toQtiString() { return DataTypeBinder.toString(intValue); } }
@Override public boolean equals(final Object object) { if (!(object instanceof IdentifierValue)) { return false; } final IdentifierValue other = (IdentifierValue) object; return identifierValue.equals(other.identifierValue); }
@Override public String toDomAttributeValue(final Date value) { return DataTypeBinder.toString(value); } }
/** * Returns true if given target is special (EXIT_TEST, EXIT_TESTPART, EXIT_SECTION); false otherwise. * * @param target given target * @return true if given target is special (EXIT_TEST, EXIT_TESTPART, EXIT_SECTION); false otherwise */ public static boolean isSpecial(final Identifier target) { return target.equals(EXIT_TEST) || target.equals(EXIT_TESTPART) || target.equals(EXIT_SECTION); } }
@Override public final String toQtiString() { return DataTypeBinder.toString(sourceValue, destValue); } }