Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate german #393 #463

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
package org.libreoffice.lots.config;

/**
* Signalisiert einen Fehler in einer zu parsenden Zeichenfolge
* Indicates an error in a string to be parsed.
* @author Matthias Benkmann (D-III-ITD 5.1)
*/
public class SyntaxErrorException extends Exception
{
/**
* keine Ahnung was das soll, aber es macht Eclipse glücklich.
* I have no idea what this is for, but it makes Eclipse happy.
*/
private static final long serialVersionUID = 7215084024054862356L;
public SyntaxErrorException() {super();}
Expand Down
13 changes: 6 additions & 7 deletions core/src/main/java/org/libreoffice/lots/db/Dataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,22 @@
package org.libreoffice.lots.db;

/**
* Interface für Datensätze einer Tabelle.
* Interface for records of a table.
*/
public interface Dataset
{
/**
* Liefert den Wert des Datensatzes aus der Spalte columnName (null falls nicht belegt).
* Returns the value of the record from the column columnName (null if not filled).
*
* @throws ColumnNotFoundException
* falls die Spalte nicht existiert. Man beachte, dass dies eine Eigenschaft des
* Datenbankschemas ist und nichts damit zu tun hat, ob der Wert des Datensatzes in der
* entsprechenden Spalte gesetzt ist.
* If the column does not exist. Note that this is a property of the database schema
* and has nothing to do with whether the value of the record is set in the
* corresponding column.
*/
public String get(String columnName) throws ColumnNotFoundException;

/**
* Liefert den Schlüsselwert dieses Datensatzes. Dieser sollte den Datensatz in seiner Datenbank
* eindeutig identifizieren muss es aber nicht.
* Returns the key value of this record. This should uniquely identify the record in its database, but it's not mandatory.
*/
public String getKey();
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
package org.libreoffice.lots.db;

/**
* Wird geworfen, falls kein passender Datensatz gefunden wurde und
* die Möglichkeit, eine leere Ergebnisliste zurückzugeben nicht
* existiert.
* Thrown if no matching record was found and
* the possibility to return an empty result list does not
* exists.
* @author Matthias Benkmann (D-III-ITD 5.1)
*/
public class DatasetNotFoundException extends Exception
Expand Down
60 changes: 29 additions & 31 deletions core/src/main/java/org/libreoffice/lots/db/Datasource.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,24 @@
import org.slf4j.LoggerFactory;

/**
* Interface für Datenquellen, die der DJ verwalten kann. ACHTUNG! Die Konstruktoren dieser Klasse
* dürfen keine potentiell lange blockierenden Aktionen (zum Beispiel Netzverbindung herstellen)
* ausführen. Sie dürfen auch nicht versagen, falls irgendeine Rahmenbedingung nicht gegeben ist,
* die nur für Zugriffe auf die Datensätze relevant ist (z.B. Verbindung zum LDAP-Server). Der
* Konstruktor darf (und muss) nur dann versagen, wenn es nicht möglich ist, die Datenquelle in
* einen Zustand zu bringen, in dem sie die Methoden ausführen kann, die unabhängig von den
* Datensätzen sind. Am wichtigsten sind hier die Methoden zur Abfrage des Schemas. Für die
* Methoden, die auf Datensätze zugreifen gilt, dass ihr Versagen aufgrund von Rahmenbedingungen
* (z.B. kein Netz) nicht dazu führen darf, dass das Datenquellen-Objekt in einen unbrauchbaren
* Zustand gerät. Wo immer sinnvoll sollte es möglich sein, eine Operation zu einem späteren
* Zeitpunkt zu wiederholen, wenn die Rahmenbedingungen sich geändert haben, und dann sollte die
* Operation gelingen. Dies bedeutet insbesondere, dass Verbindungsaufbau zu Servern wo nötig
* jeweils neu versucht wird und nicht nur einmalig im Konstruktor. In diesem Zusammenhang sei
* darauf hingewiesen, dass Verbindungen explizit mit close() beendet werden sollten (typischerweise
* in einem finally() Block, damit der Befehl auch im Ausnahmefall ausgeführt wird), weil die
* Garbage Collection von Java dies evtl. sehr spät tut. <br>
* <br>
* Argumente gegen Datasource-Typ "override": - (korrekte) Suche nur schwierig und ineffizient zu
* implementieren - würde vermutlich dazu führen, dass Daten im LDAP schlechter gepflegt werden,
* weil es einfacher ist, einen Override einzuführen
* Interface for data sources that the DJ can manage. CAUTION! The constructors of this class must not perform
* potentially long-blocking actions (e.g., establishing a network connection).
* They must not fail if any preconditions are not met, which are only relevant for
* accessing the records (e.g., connection to the LDAP server).
* The constructor should (and must) only fail if it's not possible to bring the data source
* into a state where it can execute methods that are independent of the records.
* Most importantly, this includes methods for querying the schema.
* For methods that access records, their failure due to conditions (e.g., no network)
* must not render the data source object unusable. Wherever possible,
* it should be possible to retry an operation at a later time if the conditions have changed,
* and the operation should succeed then. This particularly means that connection establishment to servers,
* where necessary, should be retried as needed and not just once in the constructor.
* In this context, it should be noted that connections should be explicitly
* closed using close() (typically in a finally() block to ensure it's executed even in exceptional cases)
* because Java's Garbage Collection may do this very late. <br>
* <br> Arguments against the "override" data source type: - (correct) search implementation
* would be difficult and inefficient - would likely result in poorer data maintenance in
* LDAP because it's easier to introduce an override
*/
public abstract class Datasource
{
Expand All @@ -63,14 +61,14 @@ public abstract class Datasource
private static Long datasourceTimeout = null;

/**
* Liefert eine Liste, die die Titel aller Spalten der Datenquelle enthält.
* Returns a list containing the titles of all columns in the data source.
*/
public abstract List<String> getSchema();

/**
* Liefert alle Datensätze, deren Schlüssel in der Collection keys enthalten sind. Man beachte,
* dass die Eindeutigkeit von Schlüsseln nur eine Empfehlung darstellt. Die Anzahl der
* zurückgelieferten Datensätze kann also die Anzahl der übergebenen Schlüssel übersteigen.
* Returns all records whose keys are included in the collection 'keys.'
* Please note that the uniqueness of keys is only a recommendation.
* The number of returned records may exceed the number of provided keys.
*
* @param keys
* Keys to search against.
Expand All @@ -79,9 +77,9 @@ public abstract class Datasource
public abstract QueryResults getDatasetsByKey(Collection<String> keys);

/**
* Liefert alle Datensätze, die alle Bedingungen von query (Liste von {@link QueryPart}s)
* erfüllen. Ist query leer, werden keine Datensätze zurückgeliefert. Enthält query Bedingungen
* über Spalten, die die Datenbank nicht hat, werden keine Datensätze zurückgeliefert.
* Returns all records that satisfy all conditions specified in the 'query' (a list of {@link QueryPart}s).
* If 'query' is empty, no records are returned. If 'query' contains conditions on columns that the database
* does not have, no records are returned.
*
* @param query
* Query to search against the main datasource.
Expand All @@ -90,14 +88,14 @@ public abstract class Datasource
public abstract QueryResults find(List<QueryPart> query);

/**
* Liefert eine implementierungsabhängige Teilmenge der Datensätze der Datenquelle. Wenn möglich
* sollte die Datenquelle hier all ihre Datensätze zurückliefern oder zumindest soviele wie
* möglich. Es ist jedoch auch erlaubt, dass hier gar keine Datensätze zurückgeliefert werden.
* Returns an implementation-dependent subset of records from the data source.
* Ideally, the data source should return all of its records here, or at least as many as possible.
* However, it is also permissible for no records to be returned in this context.
*/
public abstract QueryResults getContents();

/**
* Liefert den Namen dieser Datenquelle.
* Returns the name of this data source.
*/
public abstract String getName();

Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/libreoffice/lots/db/Datasources.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public static Map<String, Datasource> getDatasources()
{
LOGGER.error("Data source {} of type {} could not be initialized", name, type);
/*
* Falls schon eine alte Datenquelle name registriert ist, entferne diese Registrierung.
* Ansonsten würde mit der vorher registrierten Datenquelle weitergearbeitet, was seltsame
* Effekte zur Folge hätte die schwierig nachzuvollziehen sind.
* If an old data source with the name 'name' is already registered, remove that registration.
* Otherwise, continuing with the previously registered data source
* would result in strange and hard-to-trace effects.
*/
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@
import java.util.Vector;

/**
* Eine Dummy-Datenquelle, die im Schema keine Datensätze enthält und als QueryResult
* bei getDatasetsByKey den String "&lt;key&gt;" zurück liefert.
*
* verwendet im noConfig Modus.
* A dummy data source that does not contain any records in the schema and
* returns the string &lt;key&gt; as a QueryResult
* when used in 'noConfig' mode
*
* @author Matthias Benkmann (D-III-ITD 5.1)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.Vector;

/**
* Eine Datenquelle, die keine Datensätze enthält.
* A data source that contains no records.
*
* @author Matthias Benkmann (D-III-ITD 5.1)
*/
Expand Down
15 changes: 6 additions & 9 deletions core/src/main/java/org/libreoffice/lots/db/FunkyDatasource.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@
import org.libreoffice.lots.util.L;

/**
* Datasource, die mit WollMux-Funktionen berechnete Spalten ermöglicht. ACHTUNG!
* Diese Datasource verhält sich bei Suchanfragen nicht entsprechend dem normalen
* Verhalten einer Datasource, da sie immer auf den Originaldaten sucht, jedoch
* transformierte Datensätze zurückliefert.
* Data source that enables columns calculated with WollMux functions.
* CAUTION! This data source does not behave in search queries according to the normal behavior of a data source,
* as it always searches the original data but returns transformed records.
*
* @author Matthias Benkmann (D-III-ITD-D101)
*/
Expand All @@ -54,14 +53,12 @@ public class FunkyDatasource extends Datasource
private ColumnTransformer columnTransformer;

/**
* Erzeugt eine neue FunkyDatasource.
* Creates a new FunkyDatasource.
*
* @param nameToDatasource
* enthält alle bis zum Zeitpunkt der Definition dieser UnionDatasource
* bereits vollständig instanziierten Datenquellen.
* Contains all data sources that were fully instantiated up to the point of defining this UnionDatasource.
* @param sourceDesc
* der "Datenquelle"-Knoten, der die Beschreibung dieser UnionDatasource
* enthält.
* The 'data source' node containing the description of this UnionDatasource.
*/
public FunkyDatasource(Map<String, Datasource> nameToDatasource,
ConfigThingy sourceDesc) throws ConfigurationErrorException
Expand Down
Loading