@Nonnull public static SchematronResourceXSLT fromFile (@Nonnull final File aXSLTFile) { return new SchematronResourceXSLT (new FileSystemResource (aXSLTFile)); } }
@Nonnull public static SchematronResourceXSLT fromFile (@Nonnull final File aXSLTFile) { return new SchematronResourceXSLT (new FileSystemResource (aXSLTFile)); } }
/** * Create a new Schematron resource. * * @param aSCHFile * The Schematron file. May not be <code>null</code>. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourceSCH fromFile (@Nonnull final File aSCHFile) { return new SchematronResourceSCH (new FileSystemResource (aSCHFile)); } }
/** * Create a new {@link SchematronResourcePure} from file system Schematron * rules * * @param aSCHFile * The file system path to the Schematron rules. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourcePure fromFile (@Nonnull final File aSCHFile) { return new SchematronResourcePure (new FileSystemResource (aSCHFile)); }
/** * Create a new {@link SchematronResourcePure} from file system Schematron * rules * * @param aSCHFile * The file system path to the Schematron rules. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourcePure fromFile (@Nonnull final File aSCHFile) { return new SchematronResourcePure (new FileSystemResource (aSCHFile)); }
/** * Create a new Schematron resource. * * @param aSCHFile * The Schematron file. May not be <code>null</code>. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourceSCH fromFile (@Nonnull final File aSCHFile) { return new SchematronResourceSCH (new FileSystemResource (aSCHFile)); } }
@Nullable public static InputSource create (@Nonnull final File aFile) { return create (new FileSystemResource (aFile)); }
@Nullable public static InputSource create (@Nonnull final Path aPath) { return create (new FileSystemResource (aPath)); }
@Nonnull public static SchematronResourceXSLT fromFile (@Nonnull @Nonempty final String sXSLTPath) { return new SchematronResourceXSLT (new FileSystemResource (sXSLTPath)); }
@Nonnull public static SchematronResourceXSLT fromFile (@Nonnull @Nonempty final String sXSLTPath) { return new SchematronResourceXSLT (new FileSystemResource (sXSLTPath)); }
/** * Create a new {@link SchematronResourcePure} from file system Schematron * rules * * @param sSCHPath * The file system path to the Schematron rules. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourcePure fromFile (@Nonnull @Nonempty final String sSCHPath) { return new SchematronResourcePure (new FileSystemResource (sSCHPath)); }
/** * Create a new Schematron resource. * * @param sSCHPath * The file system path to the Schematron file. May neither be * <code>null</code> nor empty. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourceSCH fromFile (@Nonnull @Nonempty final String sSCHPath) { return new SchematronResourceSCH (new FileSystemResource (sSCHPath)); }
/** * Create a new Schematron resource. * * @param sSCHPath * The file system path to the Schematron file. May neither be * <code>null</code> nor empty. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourceSCH fromFile (@Nonnull @Nonempty final String sSCHPath) { return new SchematronResourceSCH (new FileSystemResource (sSCHPath)); }
/** * Create a new {@link SchematronResourcePure} from file system Schematron * rules * * @param sSCHPath * The file system path to the Schematron rules. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourcePure fromFile (@Nonnull @Nonempty final String sSCHPath) { return new SchematronResourcePure (new FileSystemResource (sSCHPath)); }
/** * Read the CSS from the passed File. * * @param aFile * The file containing the CSS to be parsed. May not be * <code>null</code>. * @param aSettings * The settings to be used for reading the CSS. May not be * <code>null</code>. * @return <code>null</code> if reading failed, the CSS declarations * otherwise. * @since 3.8.2 */ @Nullable public static CascadingStyleSheet readFromFile (@Nonnull final File aFile, @Nonnull final CSSReaderSettings aSettings) { return readFromStream (new FileSystemResource (aFile), aSettings); }
@Nullable public static CSSDeclarationList readFromFile (@Nonnull final File aFile, @Nonnull final Charset aCharset, @Nonnull final ECSSVersion eVersion) { return readFromReader (new FileSystemResource (aFile).getReader (aCharset), new CSSReaderSettings ().setCSSVersion (eVersion)); }
@Nullable public static CSSDeclarationList readFromFile (@Nonnull final File aFile, @Nonnull final Charset aCharset, @Nonnull final ECSSVersion eVersion, @Nullable final ICSSParseErrorHandler aCustomErrorHandler) { return readFromReader (new FileSystemResource (aFile).getReader (aCharset), new CSSReaderSettings ().setCSSVersion (eVersion) .setCustomErrorHandler (aCustomErrorHandler)); }
@Nullable public static CSSDeclarationList readFromFile (@Nonnull final File aFile, @Nonnull final Charset aCharset, @Nonnull final ECSSVersion eVersion, @Nullable final ICSSParseExceptionCallback aCustomExceptionHandler) { return readFromReader (new FileSystemResource (aFile).getReader (aCharset), new CSSReaderSettings ().setCSSVersion (eVersion) .setCustomExceptionHandler (aCustomExceptionHandler)); }
@Nullable public static CSSDeclarationList readFromFile (@Nonnull final File aFile, @Nonnull final Charset aCharset, @Nonnull final ECSSVersion eVersion, @Nullable final ICSSParseErrorHandler aCustomErrorHandler, @Nullable final ICSSParseExceptionCallback aCustomExceptionHandler) { return readFromReader (new FileSystemResource (aFile).getReader (aCharset), new CSSReaderSettings ().setCSSVersion (eVersion) .setCustomErrorHandler (aCustomErrorHandler) .setCustomExceptionHandler (aCustomExceptionHandler)); }
/** * Trigger the registered custom exception handlers for read errors. * * @param t * Thrown exception. Never <code>null</code>. * @param sErrorFilename * The filename tried to write to. Never <code>null</code>. * @param aDoc * The XML content that should be written. May be <code>null</code> if * the error occurred in XML creation. */ protected static void triggerExceptionHandlersWrite (@Nonnull final Throwable t, @Nonnull final String sErrorFilename, @Nullable final IMicroDocument aDoc) { // Check if a custom exception handler is present if (exceptionHandlersWrite ().isNotEmpty ()) { final IReadableResource aRes = new FileSystemResource (sErrorFilename); final String sXMLContent = aDoc == null ? "no XML document created" : MicroWriter.getNodeAsString (aDoc); exceptionHandlersWrite ().forEach (aCB -> aCB.onDAOWriteException (t, aRes, sXMLContent)); } }