@Nonnull public ClassPathResource getResource () { return new ClassPathResource (m_sPath); }
@Nonnull public static final ClassPathResource getXSDResource () { return new ClassPathResource ("/schemas/XAdES01903v132-201601.xsd", CXAdES132.class.getClassLoader ()); } }
@Nonnull public static final ClassPathResource getXSDResource () { return new ClassPathResource ("/schemas/xmldsig-core-schema.xsd", CXMLDSig.class.getClassLoader ()); } }
@Nonnull public static final ClassPathResource getXSDResource () { return new ClassPathResource ("/schemas/xmldsig11-schema.xsd", CXMLDSig11.class.getClassLoader ()); } }
@Nonnull public static final ClassPathResource getXSDResource () { return new ClassPathResource ("/schemas/CCTS_CCT_SchemaModule.xsd", CCCTS.class.getClassLoader ()); } }
@Nonnull public static TestResource createGoodCase (@Nonnull final String sClassPathResource) { return new TestResource (new ClassPathResource (sClassPathResource), null); } }
@Override @Nonnull protected IReadableResource getResource (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final String sFilename) { // URL decode is required because requests contain e.g. "%20" final String sFilename1 = URLHelper.urlDecode (sFilename); return new ClassPathResource (sFilename1); } }
@Nonnull public IReadableResource getSuccessResource (@Nonnull @Nonempty final String sFilename) { return new ClassPathResource ("/peppol-ubl/" + m_sDirName + "/success/" + sFilename); }
/** * Read the default resource. * * @return this * @see #MIME_TYPE_INFO_XML */ @Nonnull public MimeTypeInfoManager readDefault () { return read (new ClassPathResource (MIME_TYPE_INFO_XML)); }
@Nonnull public IReadableResource getErrorResource (@Nonnull @Nonempty final String sFilename) { return new ClassPathResource ("/peppol-ubl/" + m_sDirName + "/error/" + sFilename); } }
/** * Create a new Schematron resource. * * @param sSCHPath * The classpath relative path to the Schematron file. May neither be * <code>null</code> nor empty. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourceSCH fromClassPath (@Nonnull @Nonempty final String sSCHPath) { return new SchematronResourceSCH (new ClassPathResource (sSCHPath)); }
/** * Check if the referenced JS and CSS files exist * * @throws IllegalStateException * if not */ public static void validateHTMLConfiguration () throws IllegalStateException { // This will throw an IllegalStateException for wrong files in html/js.xml // and html/css.xml PhotonCSS.readCSSIncludesForGlobal (new ClassPathResource (PhotonCSS.DEFAULT_FILENAME)); PhotonJS.readJSIncludesForGlobal (new ClassPathResource (PhotonJS.DEFAULT_FILENAME)); }
/** * Create a new Schematron resource. * * @param sSCHPath * The classpath relative path to the Schematron file. May neither be * <code>null</code> nor empty. * @return Never <code>null</code>. */ @Nonnull public static SchematronResourceSCH fromClassPath (@Nonnull @Nonempty final String sSCHPath) { return new SchematronResourceSCH (new ClassPathResource (sSCHPath)); }
@Nonnull public static SchematronResourceXSLT fromClassPath (@Nonnull @Nonempty final String sXSLTPath) { return new SchematronResourceXSLT (new ClassPathResource (sXSLTPath)); }
private EUBL22DocumentType (@Nonnull final Class <?> aClass, @Nonnull final String sXSDPath) { m_aDocType = new JAXBDocumentType (aClass, new CommonsArrayList <> (new ClassPathResource (CUBL22.SCHEMA_DIRECTORY + sXSDPath, _getCL ())), s -> StringHelper.trimEnd (s, "Type")); }
private EUBL21DocumentType (@Nonnull final Class <?> aClass, @Nonnull final String sXSDPath) { m_aDocType = new JAXBDocumentType (aClass, new CommonsArrayList <> (new ClassPathResource (CUBL21.SCHEMA_DIRECTORY + sXSDPath, _getCL ())), s -> StringHelper.trimEnd (s, "Type")); }
private EUBL20DocumentType (@Nonnull final Class <?> aClass, @Nonnull final String sXSDPath) { m_aDocType = new JAXBDocumentType (aClass, new CommonsArrayList <> (new ClassPathResource (CUBL20.SCHEMA_DIRECTORY + sXSDPath, _getCL ())), s -> StringHelper.trimEnd (s, "Type")); }
private EUBL20DocumentType (@Nonnull final Class <?> aClass, @Nonnull final String sXSDPath) { m_aDocType = new JAXBDocumentType (aClass, new CommonsArrayList <> (new ClassPathResource (CUBL20.SCHEMA_DIRECTORY + sXSDPath, _getCL ())), s -> StringHelper.trimEnd (s, "Type")); }
private EUBLPEDocumentType (@Nonnull final Class <?> aClass, @Nonnull @Nonempty final List <String> aXSDPaths) { m_aDocType = new JAXBDocumentType (aClass, new CommonsArrayList <> (aXSDPaths, x -> new ClassPathResource (x, _getCL ())), s -> StringHelper.trimEnd (s, "Type")); }
private static void _readList (@Nonnull final String sPath) { final ICommonsList <String> aList = new CommonsArrayList <> (); if (XMLListHandler.readList (new ClassPathResource (sPath), aList).isFailure ()) throw new IllegalStateException ("Failed to read " + sPath); s_aSet.addAllMapped (aList, MobileBrowserManager::_unify); }