repo stringlengths 1 191 ⌀ | file stringlengths 23 351 | code stringlengths 0 5.32M | file_length int64 0 5.32M | avg_line_length float64 0 2.9k | max_line_length int64 0 288k | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationGroupId.java | package org.jabref.model.openoffice.style;
/**
* Identifies a citation group in a document.
*/
public class CitationGroupId {
String groupId;
public CitationGroupId(String groupId) {
this.groupId = groupId;
}
/**
* CitationEntry needs some string identifying the group that it can pass ... | 418 | 19.95 | 89 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationGroups.java | package org.jabref.model.openoffice.style;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import org.jabref.model.database.BibDatabase;
import... | 10,396 | 34.975779 | 121 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationLookupResult.java | package org.jabref.model.openoffice.style;
import java.util.Objects;
import org.jabref.model.database.BibDatabase;
import org.jabref.model.entry.BibEntry;
public class CitationLookupResult {
public final BibEntry entry;
public final BibDatabase database;
public CitationLookupResult(BibEntry entry, BibD... | 1,641 | 34.695652 | 314 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationMarkerEntry.java | package org.jabref.model.openoffice.style;
import java.util.Optional;
import org.jabref.model.openoffice.ootext.OOText;
/**
* This is what we need for createCitationMarker to produce author-year citation markers.
*/
public interface CitationMarkerEntry extends CitationMarkerNormEntry {
/**
* uniqueLetter... | 760 | 27.185185 | 158 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationMarkerNormEntry.java | package org.jabref.model.openoffice.style;
import java.util.Optional;
/**
* This is what we need to produce normalized author-year citation markers.
*/
public interface CitationMarkerNormEntry {
/**
* Citation key. This is what we usually get from the document.
* <p>
* Used if getLookupResult() ... | 618 | 24.791667 | 99 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationMarkerNumericBibEntry.java | package org.jabref.model.openoffice.style;
import java.util.Optional;
/**
* This is for the numeric bibliography labels.
*/
public interface CitationMarkerNumericBibEntry {
/**
* For unresolved citation we show the citation key.
*/
String getCitationKey();
/**
* @return Optional.empty()... | 381 | 18.1 | 56 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationMarkerNumericEntry.java | package org.jabref.model.openoffice.style;
import java.util.Optional;
import org.jabref.model.openoffice.ootext.OOText;
/**
* This is what we need for numeric citation markers.
*/
public interface CitationMarkerNumericEntry {
String getCitationKey();
/**
* @return Optional.empty() for unresolved
... | 399 | 18.047619 | 53 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationPath.java | package org.jabref.model.openoffice.style;
/**
* Identifies a citation with the identifier of the citation group containing it and its storage index within.
*/
public class CitationPath {
public final CitationGroupId group;
public final int storageIndexInGroup;
CitationPath(CitationGroupId group, int ... | 435 | 24.647059 | 110 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitationType.java | package org.jabref.model.openoffice.style;
/*
* Presentation types of citation groups.
*/
public enum CitationType {
AUTHORYEAR_PAR,
AUTHORYEAR_INTEXT,
INVISIBLE_CIT;
public boolean inParenthesis() {
return switch (this) {
case AUTHORYEAR_PAR, INVISIBLE_CIT -> true;
... | 451 | 17.08 | 55 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitedKey.java | package org.jabref.model.openoffice.style;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.jabref.model.database.BibDatabase;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.openoffice.ootext.OOText;
/**
* Cited keys are collected from the citations in citati... | 3,989 | 28.124088 | 188 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CitedKeys.java | package org.jabref.model.openoffice.style;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Optional;
import org.jabref.model.database.BibDatabase;
import org.jabref.model.entry.BibEntry;
public class CitedKeys {
/**
* Order-pr... | 2,334 | 26.797619 | 72 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/ComparableCitation.java | package org.jabref.model.openoffice.style;
import java.util.Optional;
import org.jabref.model.openoffice.ootext.OOText;
/**
* When sorting citations (in a group), we also consider pageInfo. Otherwise we sort citations as cited keys.
*/
public interface ComparableCitation extends ComparableCitedKey {
Optional<O... | 344 | 25.538462 | 109 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/ComparableCitedKey.java | package org.jabref.model.openoffice.style;
import java.util.Optional;
import org.jabref.model.entry.BibEntry;
/**
* This is what we need to sort bibliography entries.
*/
public interface ComparableCitedKey {
String getCitationKey();
Optional<BibEntry> getBibEntry();
}
| 285 | 15.823529 | 53 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CompareCitation.java | package org.jabref.model.openoffice.style;
import java.util.Comparator;
import org.jabref.model.entry.BibEntry;
/*
* Given a Comparator<BibEntry> provide a Comparator<ComparableCitation> that can handle unresolved
* citation keys and takes pageInfo into account.
*/
public class CompareCitation implements Comparat... | 890 | 27.741935 | 99 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/CompareCitedKey.java | package org.jabref.model.openoffice.style;
import java.util.Comparator;
import java.util.Optional;
import org.jabref.model.entry.BibEntry;
/*
* Given a Comparator<BibEntry> provide a Comparator<ComparableCitedKey> that also handles
* unresolved citation keys.
*/
public class CompareCitedKey implements Comparator<... | 1,346 | 32.675 | 90 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/NonUniqueCitationMarker.java | package org.jabref.model.openoffice.style;
/**
* What should createCitationMarker do if it discovers that uniqueLetters provided are not sufficient for unique presentation?
*/
public enum NonUniqueCitationMarker {
/**
* Give an insufficient representation anyway.
*/
FORGIVEN,
/**
* Throw... | 356 | 17.789474 | 126 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/OODataModel.java | package org.jabref.model.openoffice.style;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.jabref.model.openoffice.ootext.OOText;
/**
* What is the data stored?
*/
public enum OODataModel {
/**
* JabRef52: pageInfo belongs to CitationGroup, not Citation.
*/
... | 1,099 | 25.829268 | 97 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/style/PageInfo.java | package org.jabref.model.openoffice.style;
import java.util.Optional;
import org.jabref.model.openoffice.ootext.OOText;
public class PageInfo {
private PageInfo() {
}
/*
* pageInfo normalization
*/
public static Optional<OOText> normalizePageInfo(Optional<OOText> optionalText) {
i... | 1,305 | 26.787234 | 111 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/CreationException.java | package org.jabref.model.openoffice.uno;
/**
* Exception used to indicate failure in either
* <p>
* XMultiServiceFactory.createInstance() XMultiComponentFactory.createInstanceWithContext()
*/
public class CreationException extends Exception {
public CreationException(String message) {
super(message);
... | 328 | 22.5 | 91 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/NoDocumentException.java | package org.jabref.model.openoffice.uno;
public class NoDocumentException extends Exception {
public NoDocumentException(String message) {
super(message);
}
public NoDocumentException() {
super("Not connected to a document");
}
}
| 265 | 19.461538 | 52 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoBookmark.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.container.NoSuchElementException;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNamed;
import com.sun.star.lang.DisposedException;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.te... | 3,052 | 32.922222 | 132 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoCast.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.uno.UnoRuntime;
public class UnoCast {
private UnoCast() {
}
/**
* cast : short for Optional.ofNullable(UnoRuntime.queryInterface(...))
*
* @return A reference to the requested UNO interface type if a... | 533 | 24.428571 | 103 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoCrossRef.java | package org.jabref.model.openoffice.uno;
import com.sun.star.beans.PropertyVetoException;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.beans.XPropertySet;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.text.ReferenceFieldPa... | 4,051 | 44.022222 | 118 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoCursor.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextRange;
import com.sun.star.text.XTextViewCursor;
import com.sun.star.text.XTextViewCursorSupplier;
pub... | 1,424 | 29.978261 | 93 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoNameAccess.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.container.NoSuchElementException;
import com.sun.star.container.XNameAccess;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.text.XTextContent;
public class UnoNameAccess {
private UnoNameAccess() {
... | 791 | 27.285714 | 100 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoNamed.java | package org.jabref.model.openoffice.uno;
import com.sun.star.container.XNamed;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextRange;
public class UnoNamed {
private UnoNamed() {
}
/**
* Inse... | 2,419 | 44.660377 | 226 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoProperties.java | package org.jabref.model.openoffice.uno;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import com.sun.star.beans.Property;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.bean... | 2,839 | 34.061728 | 106 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoRedlines.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.NoSuchElementException;
import com.sun.star.container.XEnumeration;
import com.sun.star.container.XEnumerationAccess;
import com... | 2,054 | 32.145161 | 108 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoReferenceMark.java | package org.jabref.model.openoffice.uno;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import com.sun.star.container.NoSuchElementException;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNamed;
import com.sun.star.lang.DisposedExcept... | 4,224 | 33.917355 | 277 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoScreenRefresh.java | package org.jabref.model.openoffice.uno;
import com.sun.star.text.XTextDocument;
/**
* Disable/enable screen refresh.
*/
public class UnoScreenRefresh {
private UnoScreenRefresh() {
}
/**
* Disable screen refresh.
* <p>
* Must be paired with unlockControllers()
* <p>
* https:/... | 840 | 23.735294 | 110 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoSelection.java | package org.jabref.model.openoffice.uno;
import java.util.Objects;
import java.util.Optional;
import com.sun.star.frame.XController;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.text.XTextDocument;
import com.sun.star.view.XSelectionSupplier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**... | 4,010 | 44.579545 | 331 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoStyle.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.container.NoSuchElementException;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.style.XStyle;
import com.sun.star.styl... | 2,790 | 34.782051 | 110 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoTextDocument.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.beans.XPropertySet;
import com.sun.star.document.XDocumentProperties;
import com.sun.star.document.XDocumentPropertiesSupplier;
import com.sun.star.frame.XController;
import com.sun.star.frame.XFrame;
import com.sun.star.lang.Disp... | 2,922 | 32.597701 | 104 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoTextRange.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.text.XFootnote;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextRange;
import com.sun.star.text.XTextRangeCompare;
public class UnoTextRange {
private UnoTextRange() {
}
/**
* If original i... | 2,930 | 34.743902 | 108 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoTextSection.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.container.NoSuchElementException;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNamed;
import com.sun.star.lang.DisposedException;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.te... | 2,768 | 33.6125 | 183 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoUndo.java | package org.jabref.model.openoffice.uno;
import java.util.Optional;
import com.sun.star.document.XUndoManager;
import com.sun.star.document.XUndoManagerSupplier;
import com.sun.star.text.XTextDocument;
import com.sun.star.util.InvalidStateException;
/**
* Undo : group document changes into larger Undo actions.
*/
... | 1,450 | 33.547619 | 153 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/uno/UnoUserDefinedProperty.java | package org.jabref.model.openoffice.uno;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import com.sun.star.beans.IllegalTypeException;
import com.sun.star.beans.NotRemoveableException;
import com.sun.star.beans.PropertyAttribute;
import com.sun.star.beans.Prop... | 5,954 | 36.45283 | 121 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/util/OOListUtil.java | package org.jabref.model.openoffice.util;
import java.util.Comparator;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class OOListUtil {
public static <T, U> List<U> map(List<T> list, Function<T, U> fun) {
return list.... | 913 | 28.483871 | 96 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/util/OOPair.java | package org.jabref.model.openoffice.util;
public class OOPair<A, B> {
public final A a;
public final B b;
public OOPair(A a, B b) {
this.a = a;
this.b = b;
}
}
| 195 | 14.076923 | 41 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/util/OOResult.java | package org.jabref.model.openoffice.util;
import java.util.NoSuchElementException;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
/*
* An instance of this class represents either the result of a computation, or an error
* value. Neither of these is allowed to be n... | 2,590 | 21.929204 | 87 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/util/OOTuple3.java | package org.jabref.model.openoffice.util;
/**
* This class allows three objects to be packed together, and later accessed as fields `a`, `b` and `c`.
* <p>
* Can be used to avoid creating a new class for just this purpose.
* <p>
* Can be useful if you do not have `Trifunction` at hand but need to pass three objec... | 545 | 22.73913 | 104 | java |
null | jabref-main/src/main/java/org/jabref/model/openoffice/util/OOVoidResult.java | package org.jabref.model.openoffice.util;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
/*
* error cannot be null
*/
public class OOVoidResult<E> {
private final Optional<E> error;
private OOVoidResult(Optional<E> error) {
this.error = error;
... | 1,091 | 19.603774 | 61 | java |
null | jabref-main/src/main/java/org/jabref/model/paging/Page.java | package org.jabref.model.paging;
import java.util.Collection;
import java.util.Collections;
public class Page<T> {
private int pageNumber;
private String query;
private Collection<T> content;
public Page(String query, int pageNumber, Collection<T> content) {
this.query = query;
this.... | 797 | 20 | 70 | java |
null | jabref-main/src/main/java/org/jabref/model/pdf/FileAnnotation.java | package org.jabref.model.pdf;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.Objects;
import java.util.Optional;
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation;
impo... | 6,888 | 36.237838 | 143 | java |
null | jabref-main/src/main/java/org/jabref/model/pdf/FileAnnotationType.java | package org.jabref.model.pdf;
import java.util.Locale;
import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Our representation of the type of the FileAnnotation. This is needed as some FileAnnotationTypes require special
* handling (e.... | 2,525 | 31.805195 | 140 | java |
null | jabref-main/src/main/java/org/jabref/model/pdf/search/EnglishStemAnalyzer.java | package org.jabref.model.pdf.search;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.LowerCaseFilter;
import org.apache.lucene.analysis.StopFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.DecimalDig... | 996 | 37.346154 | 80 | java |
null | jabref-main/src/main/java/org/jabref/model/pdf/search/PdfSearchResults.java | package org.jabref.model.pdf.search;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
public final class PdfSearchResults {
private final List<SearchResult> searchResults;
public PdfSearchResults(List<SearchResult> search) {
this.searchResult... | 1,539 | 31.083333 | 113 | java |
null | jabref-main/src/main/java/org/jabref/model/pdf/search/SearchFieldConstants.java | package org.jabref.model.pdf.search;
public class SearchFieldConstants {
public static final String PATH = "path";
public static final String CONTENT = "content";
public static final String PAGE_NUMBER = "pageNumber";
public static final String ANNOTATIONS = "annotations";
public static final Stri... | 508 | 32.933333 | 110 | java |
null | jabref-main/src/main/java/org/jabref/model/pdf/search/SearchResult.java | package org.jabref.model.pdf.search;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.jabref.model.entry.BibEntry;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.search.In... | 3,895 | 37.96 | 126 | java |
null | jabref-main/src/main/java/org/jabref/model/schema/DublinCoreSchemaCustom.java | package org.jabref.model.schema;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.apache.xmpbox.XMPMetadata;
import org.apache.xmpbox.schema.DublinCoreSchema;
import org.apache.xmpbox.type.AbstractField;
import org.apac... | 2,494 | 36.238806 | 111 | java |
null | jabref-main/src/main/java/org/jabref/model/search/GroupSearchQuery.java | package org.jabref.model.search;
import java.util.EnumSet;
import java.util.Objects;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.search.rules.SearchRule;
import org.jabref.model.search.rules.SearchRules;
import org.jabref.model.search.rules.SearchRules.SearchFlags;
public class GroupSearchQuery i... | 1,833 | 26.787879 | 85 | java |
null | jabref-main/src/main/java/org/jabref/model/search/SearchMatcher.java | package org.jabref.model.search;
import org.jabref.model.entry.BibEntry;
@FunctionalInterface
public interface SearchMatcher {
boolean isMatch(BibEntry entry);
}
| 168 | 17.777778 | 39 | java |
null | jabref-main/src/main/java/org/jabref/model/search/matchers/AndMatcher.java | package org.jabref.model.search.matchers;
import org.jabref.model.entry.BibEntry;
/**
* A set of matchers that returns true if all matcher match the given entry.
*/
public class AndMatcher extends MatcherSet {
@Override
public boolean isMatch(BibEntry entry) {
return matchers.stream()
... | 378 | 22.6875 | 76 | java |
null | jabref-main/src/main/java/org/jabref/model/search/matchers/MatcherSet.java | package org.jabref.model.search.matchers;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.jabref.model.search.SearchMatcher;
public abstract class MatcherSet implements SearchMatcher {
protected final List<SearchMatcher> matchers = new ArrayList<>();
@Override
pu... | 1,036 | 22.568182 | 69 | java |
null | jabref-main/src/main/java/org/jabref/model/search/matchers/MatcherSets.java | package org.jabref.model.search.matchers;
public class MatcherSets {
public enum MatcherType {
AND,
OR
}
public static MatcherSet build(MatcherType ruleSet) {
if (ruleSet == MatcherType.AND) {
return new AndMatcher();
} else {
return new OrMatcher()... | 340 | 17.944444 | 57 | java |
null | jabref-main/src/main/java/org/jabref/model/search/matchers/NotMatcher.java | package org.jabref.model.search.matchers;
import java.util.Objects;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.search.SearchMatcher;
/**
* Inverts the search result.
* <p>
* Example:
* false --> true
* true --> false
*/
public class NotMatcher implements SearchMatcher {
private final ... | 586 | 19.964286 | 65 | java |
null | jabref-main/src/main/java/org/jabref/model/search/matchers/OrMatcher.java | package org.jabref.model.search.matchers;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.util.ListUtil;
/**
* A set of matchers that returns true if any matcher matches the given entry.
*/
public class OrMatcher extends MatcherSet {
@Override
public boolean isMatch(BibEntry entry) {
... | 395 | 23.75 | 78 | java |
null | jabref-main/src/main/java/org/jabref/model/search/rules/ContainsBasedSearchRule.java | package org.jabref.model.search.rules;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import org.jabref.architecture.AllowedToUseLogic;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.field.Field;
import org.jabref.model.search.rules.SearchRu... | 2,065 | 33.433333 | 111 | java |
null | jabref-main/src/main/java/org/jabref/model/search/rules/FullTextSearchRule.java | package org.jabref.model.search.rules;
import java.io.IOException;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.stream.Collectors;
import org.jabref.architecture.AllowedToUseLogic;
import org.jabref.gui.Globals;
import org.jabref.logic.pdf.search.retrieval.PdfSearche... | 2,572 | 34.736111 | 112 | java |
null | jabref-main/src/main/java/org/jabref/model/search/rules/GrammarBasedSearchRule.java | package org.jabref.model.search.rules;
import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.regex.Matcher;
import java.util.regex.Pattern;... | 11,134 | 38.207746 | 204 | java |
null | jabref-main/src/main/java/org/jabref/model/search/rules/RegexBasedSearchRule.java | package org.jabref.model.search.rules;
import java.util.EnumSet;
import java.util.Optional;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.jabref.architecture.AllowedToUseLogic;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.e... | 2,174 | 33.52381 | 163 | java |
null | jabref-main/src/main/java/org/jabref/model/search/rules/SearchRule.java | package org.jabref.model.search.rules;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.pdf.search.PdfSearchResults;
public interface SearchRule {
boolean applyRule(String query, BibEntry bibEntry);
PdfSearchResults getFulltextResults(String query, BibEntry bibEntry);
boolean validateSea... | 348 | 23.928571 | 73 | java |
null | jabref-main/src/main/java/org/jabref/model/search/rules/SearchRules.java | package org.jabref.model.search.rules;
import java.util.EnumSet;
import java.util.regex.Pattern;
/**
* This is a factory to instantiate the matching SearchRule implementation matching a given query
*/
public class SearchRules {
private static final Pattern SIMPLE_EXPRESSION = Pattern.compile("[^\\p{Punct}]*");... | 1,540 | 29.82 | 99 | java |
null | jabref-main/src/main/java/org/jabref/model/search/rules/SentenceAnalyzer.java | package org.jabref.model.search.rules;
import java.util.ArrayList;
import java.util.List;
public class SentenceAnalyzer {
public static final char ESCAPE_CHAR = '\\';
public static final char QUOTE_CHAR = '"';
private final String query;
public SentenceAnalyzer(String query) {
this.query = ... | 1,946 | 32.568966 | 76 | java |
null | jabref-main/src/main/java/org/jabref/model/strings/LatexToUnicodeAdapter.java | package org.jabref.model.strings;
import java.text.Normalizer;
import java.util.Objects;
import java.util.Optional;
import java.util.regex.Pattern;
import com.github.tomtung.latex2unicode.LaTeX2Unicode;
import fastparse.Parsed;
/**
* Adapter class for the latex2unicode lib. This is an alternative to our LatexToUnic... | 1,855 | 35.392157 | 113 | java |
null | jabref-main/src/main/java/org/jabref/model/strings/StringUtil.java | package org.jabref.model.strings;
import java.text.Normalizer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import ... | 27,740 | 35.549407 | 200 | java |
null | jabref-main/src/main/java/org/jabref/model/strings/UnicodeToReadableCharMap.java | package org.jabref.model.strings;
import java.util.HashMap;
public class UnicodeToReadableCharMap extends HashMap<String, String> {
public UnicodeToReadableCharMap() {
put("\u00C0", "A");
put("\u00C1", "A");
put("\u00C2", "A");
put("\u00C3", "A");
put("\u00C4", "Ae");
... | 7,232 | 26.819231 | 71 | java |
null | jabref-main/src/main/java/org/jabref/model/study/FetchResult.java | package org.jabref.model.study;
import org.jabref.model.database.BibDatabase;
/**
* Represents the result of fetching the results for a query for a specific library
*/
public class FetchResult {
private final String fetcherName;
private final BibDatabase fetchResult;
public FetchResult(String fetcherNa... | 592 | 22.72 | 83 | java |
null | jabref-main/src/main/java/org/jabref/model/study/QueryResult.java | package org.jabref.model.study;
import java.util.List;
/**
* Represents the result of fetching the results from all active fetchers for a specific query.
*/
public class QueryResult {
private final String query;
private final List<FetchResult> resultsPerLibrary;
public QueryResult(String query, List<Fe... | 595 | 22.84 | 95 | java |
null | jabref-main/src/main/java/org/jabref/model/study/Study.java | package org.jabref.model.study;
import java.util.List;
import java.util.Objects;
import org.jabref.logic.crawler.StudyYamlParser;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* This... | 3,315 | 25.95935 | 148 | java |
null | jabref-main/src/main/java/org/jabref/model/study/StudyDatabase.java | package org.jabref.model.study;
/**
* data model for the view {@link org.jabref.gui.slr.StudyCatalogItem}
*/
public class StudyDatabase {
private String name;
private boolean enabled;
public StudyDatabase(String name, boolean enabled) {
this.name = name;
this.enabled = enabled;
}
... | 1,581 | 21.28169 | 93 | java |
null | jabref-main/src/main/java/org/jabref/model/study/StudyQuery.java | package org.jabref.model.study;
public class StudyQuery {
private String query;
public StudyQuery(String query) {
this.query = query;
}
/**
* Used for Jackson deserialization
*/
public StudyQuery() {
}
public String getQuery() {
return query;
}
public v... | 996 | 18.94 | 97 | java |
null | jabref-main/src/main/java/org/jabref/model/texparser/Citation.java | package org.jabref.model.texparser;
import java.nio.file.Path;
import java.util.Objects;
public class Citation {
/**
* The total number of characters that are shown around a cite (cite width included).
*/
private static final int CONTEXT_WIDTH = 300;
private final Path path;
private final ... | 2,967 | 26.481481 | 104 | java |
null | jabref-main/src/main/java/org/jabref/model/texparser/LatexBibEntriesResolverResult.java | package org.jabref.model.texparser;
import java.nio.file.Path;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import org.jabref.model.entry.BibEntry;
import com.google.common.collect.Multimap;
public class LatexBibEntriesResolverResult {
private final LatexParserResult latexParserRes... | 1,968 | 24.907895 | 94 | java |
null | jabref-main/src/main/java/org/jabref/model/texparser/LatexParserResult.java | package org.jabref.model.texparser;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import org.jabref.model.entry.BibEntry;
import com.google.common.collect.HashMultimap;
import co... | 3,479 | 26.401575 | 103 | java |
null | jabref-main/src/main/java/org/jabref/model/util/DummyFileUpdateMonitor.java | package org.jabref.model.util;
import java.nio.file.Path;
/**
* This {@link FileUpdateMonitor} does nothing.
* Normally, you want to use {@link org.jabref.gui.util.DefaultFileUpdateMonitor} except if you don't care about updates.
*/
public class DummyFileUpdateMonitor implements FileUpdateMonitor {
@Override
... | 675 | 20.806452 | 121 | java |
null | jabref-main/src/main/java/org/jabref/model/util/FileUpdateListener.java | package org.jabref.model.util;
public interface FileUpdateListener {
/**
* The file has been updated. A new call will not result until the file has been modified again.
*/
void fileUpdated();
}
| 214 | 20.5 | 100 | java |
null | jabref-main/src/main/java/org/jabref/model/util/FileUpdateMonitor.java | package org.jabref.model.util;
import java.io.IOException;
import java.nio.file.Path;
public interface FileUpdateMonitor {
/**
* Add a new file to monitor.
*
* @param file The file to monitor.
* @throws IOException if the file does not exist.
*/
void addListenerForFile(Path file, File... | 804 | 22.676471 | 87 | java |
null | jabref-main/src/main/java/org/jabref/model/util/ListUtil.java | package org.jabref.model.util;
import java.util.function.Predicate;
/**
* Provides a few helper methods for lists.
*/
public class ListUtil {
/**
* Equivalent to list.stream().anyMatch but with slightly better performance (especially for small lists).
*/
public static <T> boolean anyMatch(Iterabl... | 885 | 25.058824 | 110 | java |
null | jabref-main/src/main/java/org/jabref/model/util/MultiKeyMap.java | package org.jabref.model.util;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public class MultiKeyMap<K1 extends Enum<K1>, K2, V> {
private final EnumMap<K1, Map<K2, V>> map;
public MultiKeyMap(Class<K1> keyType) {
map = new EnumMap<>(keyType);
... | 993 | 24.487179 | 60 | java |
null | jabref-main/src/main/java/org/jabref/model/util/OptionalUtil.java | package org.jabref.model.util;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.function.BiFunction;
import java.util.function.BiPredicate;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Colle... | 2,997 | 31.586957 | 132 | java |
null | jabref-main/src/main/java/org/jabref/model/util/ResultingStringState.java | package org.jabref.model.util;
public class ResultingStringState {
public final int caretPosition;
public final String text;
public ResultingStringState(int caretPosition, String text) {
this.caretPosition = caretPosition;
this.text = text;
}
}
| 279 | 22.333333 | 65 | java |
null | jabref-main/src/main/java/org/jabref/model/util/TreeCollector.java | package org.jabref.model.util;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BiPredicate;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import ... | 3,654 | 33.158879 | 119 | java |
null | jabref-main/src/main/java/org/jabref/preferences/BibEntryPreferences.java | package org.jabref.preferences;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
public class BibEntryPreferences {
private final ObjectProperty<Character> keywordSeparator;
public BibEntryPreferences(Character keywordSeparator) {
this.keywordSeparator =... | 698 | 26.96 | 77 | java |
null | jabref-main/src/main/java/org/jabref/preferences/CleanupPreferences.java | package org.jabref.preferences;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.Set;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableSet;
import org.jabref.logic.cleanup... | 3,223 | 29.130841 | 111 | java |
null | jabref-main/src/main/java/org/jabref/preferences/ExportPreferences.java | package org.jabref.preferences;
import java.nio.file.Path;
import java.util.List;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
imp... | 2,575 | 31.607595 | 89 | java |
null | jabref-main/src/main/java/org/jabref/preferences/ExternalApplicationsPreferences.java | package org.jabref.preferences;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class ExternalApplicationsPreferences {
private final StringProperty eMailSubjec... | 4,581 | 33.19403 | 116 | java |
null | jabref-main/src/main/java/org/jabref/preferences/FilePreferences.java | package org.jabref.preferences;
import java.nio.file.Path;
import java.util.Comparator;
import java.util.Optional;
import java.util.Set;
import java.util.TreeSet;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javaf... | 6,498 | 34.320652 | 162 | java |
null | jabref-main/src/main/java/org/jabref/preferences/GuiPreferences.java | package org.jabref.preferences;
import java.nio.file.Path;
import java.util.List;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleDoublePropert... | 7,707 | 30.720165 | 96 | java |
null | jabref-main/src/main/java/org/jabref/preferences/InternalPreferences.java | package org.jabref.preferences;
import java.nio.file.Path;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.... | 2,229 | 30.408451 | 80 | java |
null | jabref-main/src/main/java/org/jabref/preferences/JabRefPreferences.java | package org.jabref.preferences;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
impo... | 144,107 | 48.284542 | 675 | java |
null | jabref-main/src/main/java/org/jabref/preferences/LibraryPreferences.java | package org.jabref.preferences;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import org.jabref.model.database.BibDatabaseMode;
public class LibraryPreferences {
pr... | 1,906 | 30.783333 | 89 | java |
null | jabref-main/src/main/java/org/jabref/preferences/MrDlibPreferences.java | package org.jabref.preferences;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
public class MrDlibPreferences {
private final BooleanProperty acceptRecommendations;
private final BooleanProperty sendLanguage;
private final BooleanProperty sendOs;
pri... | 1,954 | 27.75 | 139 | java |
null | jabref-main/src/main/java/org/jabref/preferences/PreferencesFilter.java | package org.jabref.preferences;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
public class PreferencesFilter {
private final PreferencesService preferences;
public PreferencesFilter(PreferencesS... | 3,160 | 30.29703 | 119 | java |
null | jabref-main/src/main/java/org/jabref/preferences/PreferencesService.java | package org.jabref.preferences;
import java.nio.file.Path;
import java.util.Map;
import java.util.prefs.BackingStoreException;
import org.jabref.gui.autocompleter.AutoCompletePreferences;
import org.jabref.gui.entryeditor.EntryEditorPreferences;
import org.jabref.gui.groups.GroupsPreferences;
import org.jabref.gui.ke... | 4,664 | 30.734694 | 81 | java |
null | jabref-main/src/main/java/org/jabref/preferences/PreviewPreferences.java | package org.jabref.preferences;
import java.util.List;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.pr... | 3,663 | 35.277228 | 95 | java |
null | jabref-main/src/main/java/org/jabref/preferences/PushToApplicationPreferences.java | package org.jabref.preferences;
import java.util.Map;
import javafx.beans.property.MapProperty;
import javafx.beans.property.SimpleMapProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
public class PushToApplicationPrefer... | 2,273 | 30.583333 | 95 | java |
null | jabref-main/src/main/java/org/jabref/preferences/SearchPreferences.java | package org.jabref.preferences;
import java.util.EnumSet;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.p... | 4,652 | 32.47482 | 247 | java |
null | jabref-main/src/main/java/org/jabref/preferences/SidePanePreferences.java | package org.jabref.preferences;
import java.util.Map;
import java.util.Set;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableMap;
import javafx.collections.ObservableSet;
import org.jabref.gu... | 1,776 | 33.173077 | 92 | java |
null | jabref-main/src/main/java/org/jabref/preferences/TelemetryPreferences.java | package org.jabref.preferences;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class TelemetryPreferences {
private final BooleanProperty collectTelemetry;
... | 1,569 | 31.040816 | 92 | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.