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

Normalize pages in citavi to avoid unicode minus signs #8881

Merged
merged 2 commits into from
Jun 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -28,6 +28,7 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;

import org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter;
import org.jabref.logic.importer.Importer;
import org.jabref.logic.importer.Parser;
import org.jabref.logic.importer.ParserResult;
Expand Down Expand Up @@ -188,7 +189,12 @@ private BibEntry parseData(CitaviExchangeData.References.Reference data) {
.ifPresent(value -> entry.setField(StandardField.DOI, clean(value)));
Optional.ofNullable(data.getIsbn())
.ifPresent(value -> entry.setField(StandardField.ISBN, clean(value)));
entry.setField(StandardField.PAGES, clean(getPages(data)));

String pages = clean(getPages(data));
// Cleans also unicode minus signs
pages = new NormalizePagesFormatter().format(pages);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, the lifecycle of our formatters is longer --> introduce the formatter as class variable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this up now as a field

entry.setField(StandardField.PAGES, pages);

Optional.ofNullable(data.getVolume())
.ifPresent(value -> entry.setField(StandardField.VOLUME, clean(value)));
Optional.ofNullable(getAuthorName(data))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Article{,
author = {Agbaraji, Emmanuel and Ochulor, Deborah and Ezeh, Gloria},
title = {Food and drug counterfeiting in the developing nations},
pages = {24-31},
pages = {24--31},
volume = {3},
year = {2012},
}
Expand All @@ -16,7 +16,7 @@ @Book{
@Article{,
author = {Barlow, Susan and Boobis, Alan and Bridges, Jim and Cockburn, Andrew and Dekant, Wolfgang and Hepburn, Paul and Houben, Geert and König, Jürgen and Nauta, Maarten and Schuermans, Jeroen and Bánáti, Diána},
title = {The role of hazard- and risk-based approaches in ensuring food safety},
pages = {176-188},
pages = {176--188},
volume = {46},
abstract = {Background: Food legislation in the European Union and elsewhere includes both hazard- and risk-based approaches for ensuring safety. In hazard-based approaches, simply the presence of a potentially harmful agent at a detectable level in food is used as a basis for legislation and/or risk management action. Riskbased approaches allow consideration of exposure in assessing whether there may be unacceptable risks to health. Scope and approach: The advantages and disadvantages of hazard- and risk-based approaches for ensuring the safety of food chemicals, allergens, ingredients and microorganisms were explored at an ILSI Europe workshop. Key findings and conclusions: It was concluded that both types of approach have their place, depending on the context. However, problems can arise when both types of approach are used in regulation by separate agencies that address different aspects of the same agent/substance present in food. This separation of decision-making can result in hazard-based restrictions on marketing and use, whereas risk-based assessments for those exposed show there is reasonable certainty no harm will result. This in turn can lead to contradictory, confusing and ultimately unnecessary actions. Use of hazard-based approaches for foods also means that comparisons with benefits for nutrition and food security cannot be undertaken. This has the potential to lead to bias in the overall conclusions of regulators and risk managers, who may not have been presented with the benefits of particular foods. The value of riskbased approaches is becoming increasingly recognised.},
year = {2015},
Expand Down Expand Up @@ -116,7 +116,7 @@ @Article{

@Article{,
title = {Mitigation strategies to protect food against intentional adulteration. Final rule},
pages = {34165-223},
pages = {34165--223},
volume = {81},
abstract = {The Food and Drug Administration (FDA or we) is issuing this final rule to require domestic and foreign food facilities that are required to register under the Federal Food, Drug, and Cosmetic Act (the FD&C Act) to address hazards that may be introduced with the intention to cause wide scale public health harm. These food facilities are required to conduct a vulnerability assessment to identify significant vulnerabilities and actionable process steps and implement mitigation strategies to significantly minimize or prevent significant vulnerabilities identified at actionable process steps in a food operation. FDA is issuing these requirements as part of our implementation of the FDA Food Safety Modernization Act (FSMA).},
keywords = {Food industry legislation and jurisprudence, Food safety, Humans, Law and legislation, Legislation, Terrorism prevention and control, United States},
Expand Down Expand Up @@ -165,7 +165,7 @@ @Book{
@Article{,
author = {Kelepouris, Thomas and Pramatari, Katerina and Doukidis, Georgios},
title = {RFID-enabled traceability in the food supply chain},
pages = {183-200},
pages = {183--200},
volume = {107},
year = {2007},
}
Expand All @@ -187,7 +187,7 @@ @Article{
@Article{,
author = {Manning, Louise and Soon, Jan},
title = {Food safety, food fraud, and food defense},
pages = {R823-R834},
pages = {R823--R834},
volume = {81},
abstract = {Intentional food crime is plural in nature in terms of the types of crime and the differing levels of financial gain. Successful models of food crime are dependent on how well the crime has been executed and at what point, or even if, detection actually occurs. The aim of this paper is to undertake a literature review and critique the often contradictory definitions that can be found in the literature in order to compare and contrast existing food crime risk assessment tools and their application. Food safety, food defense, and food fraud risk assessments consider different criteria in order to determine the degree of situational risk for each criteria and the measures that need to be implemented to mitigate that risk. Further research is required to support the development of global countermeasures, that are of value in reducing overall risk even when the potential hazards may be largely unknown, and specific countermeasures that can act against unique risks.},
keywords = {Crime, Food safety, Fraud, Humans, Risk Assessment},
Expand All @@ -197,7 +197,7 @@ @Article{
@Article{,
author = {Meyer, Samantha and Wilson, Annabelle and Calnan, Michael and Henderson, Julie and Coveney, John and McCullum, Dean and Pearce, Alex and Ward, Paul and Webb, Trevor},
title = {In the interest of food safety},
pages = {1-13},
pages = {1--13},
volume = {17},
abstract = {BACKGROUND: Food regulatory bodies play an important role in public health, and in reducing the costs of food borne illness that are absorbed by both industry and government. Regulation in the food industry involves a relationship between regulators and members of the industry, and it is imperative that these relationships are built on trust. Research has shown in a variety of contexts that businesses find the most success when there are high levels of trust between them and their key stakeholders. An evidence-based understanding of the barriers to communication and trust is imperative if we are to put forward recommendations for facilitating the (re)building of trusting and communicative relationships. METHODS: We present data from 72 interviews with regulators and industry representatives regarding their trust in and communication with one another. Interviews were conducted in the UK, New Zealand, and Australia in 2013. RESULTS: Data identify a variety of factors that shape the dynamic and complex relationships between regulators and industry, as well as barriers to communication and trust between the two parties. Novel in our approach is our emphasis on identifying solutions to these barriers from the voices of industry and regulators. CONCLUSIONS: We provide recommendations (e.g., development of industry advisory boards) to facilitate the (re)building of trusting and communicative relationships between the two parties.},
year = {2017},
Expand All @@ -213,7 +213,7 @@ @Article{
@Article{,
author = {Nascimento, Carina and Santos, Poliana and Pereira-Filho, Edenir and Rocha, Fábio},
title = {Recent advances on determination of milk adulterants},
pages = {1232-1244},
pages = {1232--1244},
volume = {221},
abstract = {Milk adulteration is a current fraudulent practice to mask the quality parameters (e.g. protein and fat content) and increase the product shelf life. Milk adulteration includes addition of toxic substances, such as formaldehyde, hydrogen peroxide, hypochlorite, dichromate, salicylic acid, melamine, and urea. In order to assure the food safety and avoid health risks to consumers, novel analytical procedures have been proposed for detection of these adulterants. The innovations encompass sample pretreatment and improved detection and data processing, including chemometric tools. This review focuses on critical evaluation of analytical approaches for assay of milk adulteration, with emphasis on applications published after 2010. Alternatives for fast, environmentally friendly and in-situ detection of milk adulterants are highlighted.},
year = {2017},
Expand All @@ -234,7 +234,7 @@ @Article{
@Article{,
author = {Oliveira, Gislene and Alewijn, Martin and Boerrigter-Eenling, Rita and van Ruth, Saskia},
title = {Compositional signatures of conventional, free range, and organic pork meat using fingerprint techniques},
pages = {359-375},
pages = {359--375},
volume = {4},
abstract = {Consumers' interest in the way meat is produced is increasing in Europe. The resulting free range and organic meat products retail at a higher price, but are difficult to differentiate from their counterparts. To ascertain authenticity and prevent fraud, relevant markers need to be identified and new analytical methodology developed. The objective of this pilot study was to characterize pork belly meats of different animal welfare classes by their fatty acid (Fatty Acid Methyl Ester-FAME), non-volatile compound (electrospray ionization-tandem mass spectrometry-ESI-MS/MS), and volatile compound (proton-transfer-reaction mass spectrometry-PTR-MS) fingerprints. Well-defined pork belly meat samples (13 conventional, 15 free range, and 13 organic) originating from the Netherlands were subjected to analysis. Fingerprints appeared to be specific for the three categories, and resulted in 100%, 95.3%, and 95.3% correct identity predictions of training set samples for FAME, ESI-MS/MS, and PTR-MS respectively and slightly lower scores for the validation set. Organic meat was also well discriminated from the other two categories with 100% success rates for the training set for all three analytical approaches. Ten out of 25 FAs showed significant differences in abundance between organic meat and the other categories, free range meat differed significantly for 6 out of the 25 FAs. Overall, FAME fingerprinting presented highest discrimination power.},
year = {2015},
Expand All @@ -253,7 +253,7 @@ @Book{
@Article{,
author = {Opara, Linus},
title = {Traceability in agriculture and food supply chain},
pages = {101-106},
pages = {101--106},
volume = {1},
year = {2003},
}
Expand Down Expand Up @@ -307,7 +307,7 @@ @Article{
@Article{,
author = {Spink, John and Moyer, Douglas},
title = {Defining the public health threat of food fraud},
pages = {R157-R163},
pages = {R157--R163},
volume = {76},
abstract = {Food fraud, including the more defined subcategory ofeconomically motivated adulteration, is a food risk that is gaining recognition and concern. Regardless ofthe cause ofthe food risk, adulteration offood is both an industry and a government responsibility. Food safety, food fraud, and food defense incidents can create adulteration offood with public health threats. Food fraud is an intentional act for economic gain, whereas a food safety incident is an unintentional act with unintentional harm, and a food defense incident is an intentional act with intentional harm. Economically motivated adulteration may be just that—economically motivated—but the food-related public health risks are often more risky than traditional food safety threats because the contaminants are unconventional. Current intervention systems are not designed to look for a near infinite number ofpotential contaminants. The authors developed the core concepts reported here following comprehensive research ofarticles and reports, expert elicitation, and an extensive peer review. The intent of this research paper is to provide a base reference document for defining food fraud—it focuses specifically on the public health threat—and to facilitate a shift in focus from intervention to prevention. This will subsequently provide a framework for future quantitative or innovative research. The fraud opportunity is deconstructed using the criminology and behavioral science applications ofthe crime triangle and the chemistry ofthe crime. The research provides a food risk matrix and identifies food fraud incident types. This project provides a starting point for future food science, food safety, and food defense research.},
keywords = {Consumer product safety, Food safety methods, Fraud, Risk Assessment, Risk Factors, Terrorism},
Expand All @@ -317,7 +317,7 @@ @Article{
@Article{,
author = {Spink, John and Moyer, Douglas and Park, Hyeonho and Wu, Yongning and Fersht, Victor and Shao, Bing and Hong, Miao and Paek, Seung and Edelev, Dmitry},
title = {Introducing food fraud including translation and interpretation to Russian, Korean, and Chinese languages},
pages = {102-7},
pages = {102--7},
volume = {189},
abstract = {This paper introduces the topic of Food Fraud with translations to Russian, Korean, and Chinese. The concepts provide a system-wide focus leading to prevention. The goal is not to detect Food Fraud but to adjust entire food supply chains to reduce fraud opportunities. Food Fraud is a recently defined area of Food Protection between Food Safety (such as Salmonella or pesticide residue), and Food Defense (malicious intent to harm such as terrorism). Food Fraud is intentional with no intent to harm but only for economic gain. As with improving Food Safety and Food Defense, preventing Food Fraud is good for society and the economy. Society benefits through fewer public health threats from unauthorized acts. Society also benefits from increased consumer satisfaction and harmony. Food Security is increased through the production of more, higher-value products for consumers, commerce, and exporting. Food Fraud can reduce economic output because sickened citizens cannot work and it also reduces consumer confidence leading to less commerce.},
keywords = {China, Food contamination prevention and control, Food quality, Food safety, Fraud prevention and control, Language, Public Health, Republic of Korea, Russia},
Expand All @@ -335,7 +335,7 @@ @Book{
@Article{,
author = {Toci, Aline and Farah, Adriana and Pezza, Helena and Pezza, Leonardo},
title = {Coffee adulteration},
pages = {83-92},
pages = {83--92},
volume = {46},
abstract = {Coffee is a ubiquitous food product of considerable economic importance to the countries that produce and export it. The adulteration of roasted coffee is a strategy used to reduce costs. Conventional methods employed to identify adulteration in roasted and ground coffee involve optical and electron microscopy, which require pretreatment of samples and are time-consuming and subjective. Other analytical techniques have been studied that might be more reliable, reproducible, and widely applicable. The present review provides an overview of three analytical approaches (physical, chemical, and biological) to the identification of coffee adulteration. A total of 30 published articles are considered. It is concluded that despite the existence of a number of excellent studies in this area, there still remains a lack of a suitably sensitive and widely applicable methodology able to take into account the various different aspects of adulteration, considering coffee varieties, defective beans, and external agents.},
keywords = {Coffee, Electron scanning microscopy, Food contamination analysis},
Expand All @@ -361,7 +361,7 @@ @Article{
@Article{,
author = {Wang, Yunyu and He, Kai and Fan, Long and Wang, Yushui and Wu, Shifang and Murphy, Robert and Wang, Wenzhi and Zhang, Yaping},
title = {DNA barcoding reveals commercial fraud related to yak jerky sold in China},
pages = {106-8},
pages = {106--8},
volume = {59},
keywords = {Cattle genetics, China, DNA Barcoding, Food contamination, Food safety, Fraud, Hazard analysis and critical control points, Meat, Preserved food, RNA},
year = {2016},
Expand All @@ -381,7 +381,7 @@ @Misc{
@Article{,
author = {Yan, Yunxiang},
title = {Food safety and social risk in contemporary China},
pages = {705-729},
pages = {705--729},
volume = {71},
year = {2012},
}
Expand All @@ -402,39 +402,39 @@ @Article{
@Article{,
author = {Fassam, Liam and Dani, Samir and Hills, Mils},
title = {Supply chain food crime & fraud},
pages = {659-666},
pages = {659--666},
}

@Article{,
author = {Karipidis, Philippos and Tselempis, Dimitrios and Tsironis, Loukas},
title = {Eco-certification and transparency in global food supply chains},
pages = {70-90},
pages = {70--90},
}

@Article{,
author = {Manning, L.},
title = {Food Integrity},
pages = {2-6},
pages = {2--6},
volume = {119},
}

@Article{,
author = {Tian, Feng},
title = {An agri-food supply chain traceability system for China based on RFID & blockchain technology},
pages = {1-6},
pages = {1--6},
}

@Article{,
author = {Uyttendaele, Mieke and Franz, Eelco and Schlüter, Oliver},
title = {Food safety, a global challenge},
pages = {16},
pages = {1--6},
volume = {13},
}

@Article{,
author = {Whitworth, Elizabeth and Druckman, Angela and Woodward, Amy},
title = {Food scares},
pages = {131-142},
pages = {131--142},
volume = {119},
abstract = {Purpose – The purpose of this paper is to describe the development of a comprehensive categorisation of food scares. Design/methodology/approach – Following an initial desktop study, the categorisation was developed collaboratively with industry experts through a workshop and series of semi-structured interviews. Findings – The new categorisation developed is in Venn diagram format allowing overlapping categories. It is organised around the two major types of contamination (biological, and chemical/physical contaminants) and the two major causes of contamination (wilful deception, and transparency and awareness issues). Practical implications – The long and complex supply chains characteristic of current food production systems have resulted in a rising number of food scares. There is thus an increased emphasis on developing strategies to reduce both the number of incidents of food scares, and their associated economic, social and environmental impacts. The new categorisation developed in this study enables experts to address categories of food scares. Inclusion of the cause of contamination is particularly important as the method through which contamination occurs is key in devising food scare prevention strategies. Originality/value – The new categorisation, unlike previous categorisations, enables food scares to fall into multiple categories, as appropriate. Also, again in contrast to previous categorisations, it takes into account not only the physical problem of a food scare but also the mechanism through which it arises.},
keywords = {Classification, Consumer risk, Contamination, Food safety, Risk reduction},
Expand Down
Loading