Class AIVersionMarker
- java.lang.Object
-
- net.stoerr.ai.aigenpipeline.framework.task.AIVersionMarker
-
public class AIVersionMarker extends Object
A parsing / creation class for markers like AIGenVersion(ourversion, inputfile1@version1, inputfile2@version2, ...).
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILESUFFIX_VERSION
Suffix appended to files with formats braindead enough to not allow comments so that we have to store the file version in an additional file.protected List<String>
inputVersions
protected String
ourVersion
static Pattern
VERSION_MARKER_PATTERN
-
Constructor Summary
Constructors Constructor Description AIVersionMarker(String ourVersion, List<String> inputVersions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<String>
calculateInputMarkers(List<AIInOut> inputs, List<String> additionalMarkers)
static String
determineFileVersionMarker(AIInOut inOut)
Determine the version marker for input files / prompt files.boolean
equals(Object obj)
static AIVersionMarker
find(String content)
List<String>
getInputVersions()
String
getOurVersion()
int
hashCode()
static String
replaceMarkerIn(String content, String newMarker)
static String
shaHash(String content)
String
toString()
-
-
-
Field Detail
-
VERSION_MARKER_PATTERN
public static final Pattern VERSION_MARKER_PATTERN
-
FILESUFFIX_VERSION
public static final String FILESUFFIX_VERSION
Suffix appended to files with formats braindead enough to not allow comments so that we have to store the file version in an additional file.- See Also:
- Constant Field Values
-
ourVersion
protected final String ourVersion
-
-
Method Detail
-
find
@Nullable public static AIVersionMarker find(String content)
-
replaceMarkerIn
@Nullable public static String replaceMarkerIn(@Nullable String content, @Nonnull String newMarker)
-
determineFileVersionMarker
public static String determineFileVersionMarker(@Nonnull AIInOut inOut)
Determine the version marker for input files / prompt files.
-
calculateInputMarkers
public static List<String> calculateInputMarkers(List<AIInOut> inputs, List<String> additionalMarkers)
-
getOurVersion
public String getOurVersion()
-
-