Interface MavenEntityCore
- All Known Implementing Classes:
MavenEntityCoreImpl
public interface MavenEntityCore
Interface for maven coordinates with an additional 'remainder' field.
The remainder must be separated from the corrdinates using any of the following symbols:
- #
- /
- !
groupId:artifactId:version:jar:classifier!/path/to/file.txt
It also allows for retaining the remainder when transforming maven urns
into relative IRIs and resolving them against a base IRI:
Resolution of urn:mvn:groupId:artifactId:version:jar#dataset against
https://example.org gives
https://example.org/groupId/artifactId/artifactId-version.jar#dataset.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetFileNameSuffix(MavenEntityCore coord) Returns a present classifier and type prefixed with '-' and '.', respectively.The remainder is a string that follows the maven coordinate and should start with # or /getType()static MavenEntityCorenormalize(MavenEntityCore coord) Return a copy where all nulls replaced by empty strings and all strings are trimmedstatic MavenEntityCoreParse a maven GAV pattern with colons.static MavenEntityCorestatic MavenEntityCoresetArtifactId(String artifactId) setClassifier(String classifier) setGroupId(String groupId) setRemainder(String remainder) setVersion(String version) static StringtoFileName(MavenEntityCore coord) Return the file name: artifactId-version-classifier.typestatic StringtoPath(MavenEntityCore coord) Return the path fraction: org/the/groupId/artifactId/versionstatic StringtoPath(MavenEntityCore entity, String snapshotPrefix, String internalPrefix, String componentSeparator, boolean includePrefix, boolean includeDirectories, boolean includeFileName) static StringtoRelativeUrl(MavenEntityCore coord) Return a complete relative URL for the given coordinate, such as: org/the/groupId/artifactId/version/artifactId-version-classifier.typestatic StringtoString(MavenEntityCore coord)
-
Field Details
-
URN_MVN
- See Also:
-
-
Method Details
-
getGroupId
String getGroupId() -
setGroupId
-
getArtifactId
String getArtifactId() -
setArtifactId
-
getVersion
String getVersion() -
setVersion
-
getType
String getType() -
setType
-
getClassifier
String getClassifier() -
setClassifier
-
getRemainder
String getRemainder()The remainder is a string that follows the maven coordinate and should start with # or / -
setRemainder
-
normalize
Return a copy where all nulls replaced by empty strings and all strings are trimmed -
toString
-
getFileNameSuffix
Returns a present classifier and type prefixed with '-' and '.', respectively. I.e.: [-classifier][.type] -
toRelativeUrl
Return a complete relative URL for the given coordinate, such as: org/the/groupId/artifactId/version/artifactId-version-classifier.type -
toFileName
Return the file name: artifactId-version-classifier.type -
toPath
Return the path fraction: org/the/groupId/artifactId/version -
parseId
-
parseUrn
-
parse
Parse a maven GAV pattern with colons. The pattern may be optionally prefixed with urn:mvn: -
toPath
static String toPath(MavenEntityCore entity, String snapshotPrefix, String internalPrefix, String componentSeparator, boolean includePrefix, boolean includeDirectories, boolean includeFileName)
-