Search in sources :

Example 1 with PSTitle

use of com.helger.schematron.pure.model.PSTitle in project ph-schematron by phax.

the class DocumentationExamples method readModifyAndWrite.

public static boolean readModifyAndWrite(@Nonnull final File aSchematronFile) throws Exception {
    final PSSchema aSchema = new PSReader(new FileSystemResource(aSchematronFile)).readSchema();
    final PSTitle aTitle = new PSTitle();
    aTitle.addText("Created by ph-schematron");
    aSchema.setTitle(aTitle);
    return MicroWriter.writeToFile(aSchema.getAsMicroElement(), aSchematronFile).isSuccess();
}
Also used : PSTitle(com.helger.schematron.pure.model.PSTitle) PSReader(com.helger.schematron.pure.exchange.PSReader) FileSystemResource(com.helger.commons.io.resource.FileSystemResource) PSSchema(com.helger.schematron.pure.model.PSSchema)

Aggregations

FileSystemResource (com.helger.commons.io.resource.FileSystemResource)1 PSReader (com.helger.schematron.pure.exchange.PSReader)1 PSSchema (com.helger.schematron.pure.model.PSSchema)1 PSTitle (com.helger.schematron.pure.model.PSTitle)1