Verified Owner
Top Description Fields Constructors Methods
org.jabref.model.groups

public Class DateGroup

extends AbstractGroup
Class Inheritance
Imports
java.util.Optional, org.jabref.model.entry.BibEntry, .Date, org.jabref.model.entry.field.Field, .StandardField

Group that matches entries based on their date/year field value. Supports grouping by YEAR, MONTH, or FULL_DATE granularity.

Field Summary

Modifier and TypeField and Description
pack-priv String
private final Field
Inherited from org.jabref.model.groups.AbstractGroup:
colorcontextdescriptioniconNameisExpandedname

Constructor Summary

AccessConstructor and Description
public
DateGroup(String groupName, GroupHierarchyType context, Field searchField, String date)

Method Summary

Modifier and TypeMethod and Description
public boolean
public AbstractGroup
pack-priv static Optional<Date>
extractDate(Field field, BibEntry entry)

pack-priv static Optional<String>

Returns:

optional key string in the requested granularity
getDateKey
(Date
the parsed date
d
,
String
sample format used only for its number of dashes
dateKeyFormat
)

Returns a date group key from d.

public boolean
isDynamic()

Implements abstract org.jabref.model.groups.AbstractGroup.isDynamic.

Returns true if this group is dynamic, i.e. uses a search definition or equiv.

Inherited from org.jabref.model.groups.AbstractGroup:
containsAllcontainsAnyequalsgetColorgetDescriptiongetHierarchicalContextgetIconNamegetNamehashCodeisExpandedisMatchnamePropertysetColorsetDescriptionsetExpandedsetIconNametoString

Field Detail

dateback to summary
pack-priv String date
fieldback to summary
private final Field field

Constructor Detail

DateGroupback to summary
public DateGroup(String groupName, GroupHierarchyType context, Field searchField, String date)

Method Detail

containsback to summary
public boolean contains(BibEntry entry)

Implements abstract org.jabref.model.groups.AbstractGroup.contains.

Annotations
@Override
deepCopyback to summary
public AbstractGroup deepCopy()

Implements abstract org.jabref.model.groups.AbstractGroup.deepCopy.

Annotations
@Override
extractDateback to summary
pack-priv static Optional<Date> extractDate(Field field, BibEntry entry)
getDateKeyback to summary
pack-priv static Optional<String> getDateKey(Date d, String dateKeyFormat)

Returns a date group key from d. Format is inferred from dateKeyFormat by dash count: 0→YYYY, 1→YYYY-MM, 2→YYYY-MM-DD. If required parts are missing, returns java.util.Optional#empty().

Parameters
d:Date

the parsed date

dateKeyFormat:String

sample format used only for its number of dashes

Returns:Optional<String>

optional key string in the requested granularity

isDynamicback to summary
public boolean isDynamic()

Implements abstract org.jabref.model.groups.AbstractGroup.isDynamic.

Doc from org.jabref.model.groups.AbstractGroup.isDynamic.

Returns true if this group is dynamic, i.e. uses a search definition or equiv. that might match new entries, or false if this group contains a fixed set of entries and thus will never match a new entry that was not explicitly added to it.

Annotations
@Override