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 StringFILESUFFIX_VERSIONSuffix 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>inputVersionsprotected StringourVersionstatic PatternVERSION_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 StringdetermineFileVersionMarker(AIInOut inOut)Determine the version marker for input files / prompt files.booleanequals(Object obj)static AIVersionMarkerfind(String content)List<String>getInputVersions()StringgetOurVersion()inthashCode()static StringreplaceMarkerIn(String content, String newMarker)static StringshaHash(String content)StringtoString()
-
-
-
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()
-
-