Class AtlasUtil

java.lang.Object
io.atlasmap.core.AtlasUtil

public class AtlasUtil extends Object
  • Field Details

  • Constructor Details

    • AtlasUtil

      public AtlasUtil()
  • Method Details

    • loadPropertiesFromURL

      public static Properties loadPropertiesFromURL(URL url) throws Exception
      Throws:
      Exception
    • isEmpty

      public static boolean isEmpty(String string)
    • matchUriModule

      public static boolean matchUriModule(String uriA, String uriB)
    • validateUri

      protected static void validateUri(String atlasUri)
    • getUriPartsAsArray

      protected static List<String> getUriPartsAsArray(String atlasUri)
    • getUriScheme

      public static String getUriScheme(String atlasUri)
      Returns the "scheme" piece of an Atlas uri ie. atlas:stringseparated:csv?quoteChar=" scheme: atlas module: stringseparated remaining: csv config: quoteChar=" if atlasUri is null, returns null. if empty or no scheme present, returns empty. otherwise, the $scheme is returned
      Parameters:
      atlasUri - URI string
      Returns:
      URI scheme
    • getUriModule

      public static String getUriModule(String atlasUri)
    • getUriDataType

      public static String getUriDataType(String atlasUri)
    • getUriModuleVersion

      public static String getUriModuleVersion(String atlasUri)
    • getUriParameterValue

      public static String getUriParameterValue(String atlasUri, String key)
    • getUriParameters

      public static Map<String,String> getUriParameters(String atlasUri)
    • countCharacters

      public static int countCharacters(String text, char match)
    • findClassesForPackage

      public static List<Class<?>> findClassesForPackage(String scannedPackage)
    • addAudit

      public static void addAudit(AtlasInternalSession session, Field field, String message, AuditStatus status, String value)
    • addAudit

      public static void addAudit(AtlasInternalSession session, String docId, String message, AuditStatus status, String value)
    • createAudit

      public static Audit createAudit(AuditStatus status, String docId, String docName, String path, String value, String message)
    • addAudit

      public static void addAudit(AtlasSession session, Validation validation)
    • addAudits

      public static void addAudits(AtlasInternalSession session, Field field, List<Audit> audits)
    • toAuditStatus

      public static AuditStatus toAuditStatus(ValidationStatus vstatus)
    • getDocumentNameById

      public static String getDocumentNameById(AtlasInternalSession session, String docId)
    • getResource

      protected static URL getResource(String scannedPath)
    • find

      protected static List<Class<?>> find(File file, String scannedPackage)
    • findClassesFromJar

      protected static List<Class<?>> findClassesFromJar(URL jarFileUrl)
    • getChainedMessage

      public static String getChainedMessage(Throwable t)
    • escapeForUri

      public static String escapeForUri(String source)
    • unescapeFromUri

      public static String unescapeFromUri(String uri)
    • deleteDirectory

      public static void deleteDirectory(File targetDir)
      Delete specified directory and the contents in it.
      Parameters:
      targetDir -
      See Also:
    • deleteDirectoryContents

      public static void deleteDirectoryContents(File targetDir)
      Delete all contents in the specified directory.
      Parameters:
      targetDir -
      See Also:
    • copyFile

      public static void copyFile(Path sourcePath, Path destPath) throws IOException
      Throws:
      IOException