use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreTotalABWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PRETOTALAB:" + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(prereq.getOperand());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreSizeWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
try {
writer.write("PRESIZE" + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(prereq.getOperator().toString().toUpperCase());
writer.write(':');
writer.write(prereq.getOperand());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreSkillMultWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PRESKILLMULT:" + (prereq.isOverrideQualify() ? "Q:" : "") + "1,");
writer.write(prereq.getKey());
if (prereq.getSubKey() != null) {
writer.write(" (");
writer.write(prereq.getSubKey());
writer.write(")");
}
writer.write('=');
writer.write(prereq.getOperand());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreSpellCastMemorizeWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PRESPELLCAST:" + (prereq.isOverrideQualify() ? "Q:" : "") + "MEMORIZE=");
writer.write(prereq.getKey());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreSpellDescriptorWriter method write.
/*
* (non-Javadoc)
*
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer,
* pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PRE" + kindHandled().toUpperCase() + ':' + (prereq.isOverrideQualify() ? "Q:" : "") + "1,");
writer.write(prereq.getKey());
writer.write('=');
writer.write(prereq.getOperand());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
Aggregations