Record Class PersistenceDirectoryLayoutInstance
java.lang.Object
java.lang.Record
de.bsvrz.ars.ars.persistence.layout.PersistenceDirectoryLayoutInstance
- Record Components:
layout
- Verzeichnis-LayoutbasePath
- Dateisystem-Pfad, unter dem die Archivdaten liegen. Dies ist z. B. das konkrete Wochenverzeichnis.simulationVariant
- Simulationsvariante der Daten in diesem Verzeichnis
public record PersistenceDirectoryLayoutInstance(PersistenceDirectoryLayout layout, Path basePath, int simulationVariant)
extends Record
Konkrete instanz eines
PersistenceDirectoryLayout
, welches sich an einer bestimmten Position im Dateisystem befindet.-
Constructor Summary
ConstructorsConstructorDescriptionPersistenceDirectoryLayoutInstance
(PersistenceDirectoryLayout layout, Path basePath, int simulationVariant) Creates an instance of aPersistenceDirectoryLayoutInstance
record class. -
Method Summary
Modifier and TypeMethodDescriptionbasePath()
Returns the value of thebasePath
record component.detectFromPath
(Path path) Versucht, von einem Verzeichnis zu ermitteln, welches persistenzverzeichnislayout in diesem Verzeichnis genutzt wird und gibt dies alsPersistenceDirectoryLayoutInstance
zurück.final boolean
Indicates whether some other object is "equal to" this one.getContainerDirectory
(BaseIndex<?> index) Ermittelt von einer Index-Datei im Dateisystem die DatenidentifikationgetContainerDirectory
(Path containerDirectory) Ermittelt von einem Pfad im Dateisystem die Datenidentifikation und DatenartgetPath
(ContainerDirectory containerDirectory) Gibt zu einem ContainerDirectory das zugehörige Verzeichnis zurück.getPath
(IdDataIdentification dataIdentification) Gibt zu einer Datenidentifikation das Dateisystemverzeichnis zurückIdentifiziert die Datenidentifiaktion des angegebenen VerzeichnissesgetPathType
(ArrayList<String> pathStack) Identifiziert den Typ des angegebenen Verzeichnissesfinal int
hashCode()
Returns a hash code value for this object.layout()
Returns the value of thelayout
record component.int
Returns the value of thesimulationVariant
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PersistenceDirectoryLayoutInstance
public PersistenceDirectoryLayoutInstance(PersistenceDirectoryLayout layout, Path basePath, int simulationVariant) Creates an instance of aPersistenceDirectoryLayoutInstance
record class.- Parameters:
layout
- the value for thelayout
record componentbasePath
- the value for thebasePath
record componentsimulationVariant
- the value for thesimulationVariant
record component
-
-
Method Details
-
getContainerDirectory
Ermittelt von einer Index-Datei im Dateisystem die Datenidentifikation- Parameters:
index
- Index- Returns:
- Datenidentifikation und Datenart
- Throws:
IndexException
- Fehler bei Abfrage
-
getContainerDirectory
public IdContainerFileDir getContainerDirectory(Path containerDirectory) throws PersistenceException Ermittelt von einem Pfad im Dateisystem die Datenidentifikation und Datenart- Parameters:
containerDirectory
- Containerdateien-Verzeichnis- Returns:
- Datenidentifikation und Datenart
- Throws:
PersistenceException
- Fehler bei Abfrage
-
getPath
Gibt zu einem ContainerDirectory das zugehörige Verzeichnis zurück.- Parameters:
containerDirectory
- Datenidentifikation und Archivdatenart, die das Containerverzeichnis identifizieren- Returns:
- Verzeichnis
-
getPath
Gibt zu einer Datenidentifikation das Dateisystemverzeichnis zurück- Parameters:
dataIdentification
- Datenidentifikation- Returns:
- Verzeichnis
-
getPathType
Identifiziert den Typ des angegebenen Verzeichnisses- Parameters:
pathStack
- Stack wo man sich im Verzeichnisbaum befindet, siehetoStack(Path)
- Returns:
- Typ des angegebenen Pfads
-
getPath
Identifiziert die Datenidentifiaktion des angegebenen Verzeichnisses- Parameters:
pathStack
- Stack wo man sich im Verzeichnisbaum befindet, siehetoStack(Path)
- Returns:
- Typ des angegebenen Pfads
-
detectFromPath
@NotNull public static PersistenceDirectoryLayoutInstance detectFromPath(Path path) throws PersistenceException Versucht, von einem Verzeichnis zu ermitteln, welches persistenzverzeichnislayout in diesem Verzeichnis genutzt wird und gibt dies alsPersistenceDirectoryLayoutInstance
zurück.- Parameters:
path
- Verzeichnis- Returns:
- Instanz (nie null)
- Throws:
PersistenceException
- wenn die Instanz nicht ermittelt werden konnte
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
layout
Returns the value of thelayout
record component.- Returns:
- the value of the
layout
record component
-
basePath
Returns the value of thebasePath
record component.- Returns:
- the value of the
basePath
record component
-
simulationVariant
public int simulationVariant()Returns the value of thesimulationVariant
record component.- Returns:
- the value of the
simulationVariant
record component
-