Class GitHubConnector
- java.lang.Object
-
- de.julielab.jcore.pipeline.builder.base.connectors.GitHubConnector
-
public class GitHubConnector extends Object
-
-
Constructor Summary
Constructors Constructor Description GitHubConnector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,MetaDescription>getComponents(GitHubRepository repository, Boolean exposable)Lists all folders in a the repository $repo$ of branch %version% with their respective MetaFile InputStream.static InputStreamgetGitHubContentStream(GitHubRepository repository)Gets the content of a GitHub repository in JSON formatstatic InputStreamgetMetaFileStream(String name, GitHubRepository repository)Gets the content of a JCoRe component meta filestatic InputStreamgetPomFileStream(String user, String name, String module, String version)Gets the content of a JCoRe component pom.xml filestatic List<RepositoryBranchInformation>getRepositoryBranches(GitHubRepository repository)static List<RepositoryBranchInformation>getRepositoryBranches(String user, String repositoryName)
-
-
-
Method Detail
-
getRepositoryBranches
public static List<RepositoryBranchInformation> getRepositoryBranches(GitHubRepository repository)
-
getRepositoryBranches
public static List<RepositoryBranchInformation> getRepositoryBranches(String user, String repositoryName)
-
getMetaFileStream
public static InputStream getMetaFileStream(String name, GitHubRepository repository) throws GithubInformationException
Gets the content of a JCoRe component meta file- Parameters:
name- e.g. "jcore-ace-reader"- Returns:
- Throws:
GithubInformationException
-
getPomFileStream
public static InputStream getPomFileStream(String user, String name, String module, String version) throws GithubInformationException
Gets the content of a JCoRe component pom.xml file- Parameters:
name- e.g. "jcore-ace-reader"module- e.g. "jcore-base"version- e.g. "2.3.0-SNAPSHOT"- Returns:
- Throws:
GithubInformationException
-
getGitHubContentStream
public static InputStream getGitHubContentStream(GitHubRepository repository) throws GithubInformationException
Gets the content of a GitHub repository in JSON format- Returns:
- Throws:
GithubInformationException
-
getComponents
public static Map<String,MetaDescription> getComponents(GitHubRepository repository, Boolean exposable) throws IOException, GithubInformationException
Lists all folders in a the repository $repo$ of branch %version% with their respective MetaFile InputStream. %exposable% is checked against the flag 'exposable' in the 'component.meta' file of each folder (i.e. component). If the component has no 'component.meta', it is not listed as well.- Parameters:
exposable- should it only include components that can be used as 'building blocks' for a pipeline- Returns:
- Throws:
IOExceptionGithubInformationException
-
-