Class SchematronBootstrapTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
name.jurgenei.gradle.xml.SchematronBootstrapTask
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

@DisableCachingByDefault(because="Bootstrap generation is typically one-time setup and may consume remote URLs") public abstract class SchematronBootstrapTask extends org.gradle.api.DefaultTask
Bootstraps a Schematron SEL schema from an XSD file or URL.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.Namer
  • Field Summary

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates task with default namespace prefix convention.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Generates bootstrap Schematron from configured XSD input.
    abstract org.gradle.api.provider.Property<String>
    XML namespace prefix used in generated Schematron contexts.
    abstract org.gradle.api.file.RegularFileProperty
    Destination Schematron file generated by this task.
    abstract org.gradle.api.file.RegularFileProperty
    Source XSD file used for bootstrap generation.
    abstract org.gradle.api.provider.Property<String>
    Optional URL to load source XSD from when no local schema file is configured.
    void
    output(Object path)
    Sets generated Schematron output file using Gradle file notation.
    void
    schema(Object path)
    Sets schema file location using Gradle file notation.
    void
    Sets schema URL used when bootstrapping from remote XSD.

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getLoggingManager, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, notCompatibleWithConfigurationCache
  • Constructor Details

    • SchematronBootstrapTask

      public SchematronBootstrapTask()
      Creates task with default namespace prefix convention.
  • Method Details

    • getSchemaFile

      @Optional @InputFile @PathSensitive(RELATIVE) public abstract org.gradle.api.file.RegularFileProperty getSchemaFile()
      Source XSD file used for bootstrap generation.
      Returns:
      schema file property
    • getSchemaUrl

      @Optional @Input public abstract org.gradle.api.provider.Property<String> getSchemaUrl()
      Optional URL to load source XSD from when no local schema file is configured.
      Returns:
      schema URL property
    • getOutputFile

      @OutputFile public abstract org.gradle.api.file.RegularFileProperty getOutputFile()
      Destination Schematron file generated by this task.
      Returns:
      output file property
    • getNamespacePrefix

      @Input public abstract org.gradle.api.provider.Property<String> getNamespacePrefix()
      XML namespace prefix used in generated Schematron contexts.
      Returns:
      namespace prefix property
    • schema

      public void schema(Object path)
      Sets schema file location using Gradle file notation.
      Parameters:
      path - schema file path
    • schemaUrl

      public void schemaUrl(String value)
      Sets schema URL used when bootstrapping from remote XSD.
      Parameters:
      value - schema URL
    • output

      public void output(Object path)
      Sets generated Schematron output file using Gradle file notation.
      Parameters:
      path - output file path
    • bootstrap

      public void bootstrap()
      Generates bootstrap Schematron from configured XSD input.