100
6.0.0.4
false
2013-04-29T18:19:52+02:00
JHP
2020-01-11T19:58:26
Manuel
DGPs
APA
InTextCitation
Economics, EducationAndPsychology
de
Uni Mannheim LS Prof. Rausch & LS Prof. Deutscher - in Anlehnung an DGP
\cf0\ulnone\par
\fs18\par
}
]]>
AddFirstNames, AddPersonsUntilCitationIsUnique, AddLetterAfterYear
Abbreviated
Abbreviated
All
FirstNameLastName
Year
true
Always
1
2
3
Unknown
Field Title of Parent Reference is empty
Autor (Jahr) Bedingung
Field "Language" contains an entry other than EN or DE
false
{0}
Always
.
Always
Reference
true
AccessDate
false
D
Always
in press
true
false
false
{0}
Always
.
Always
Reference
true
Additions
false
false
{0}
Always
Always
Reference
true
Authors
false
-1
LastNameFirstName
Full
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameOnly
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
Always
Reference
true
Collaborators
false
-1
LastNameFirstName
Abbreviated
Full
All
Always
,
Always
, &
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
Always
,
Reference
true
Date
false
d
Always
Im Druck
true
true
false
{0}
Always
.
Always
Reference
true
Date2
false
D
Always
in press
true
false
false
{0}
Always
.
Always
,
Reference
true
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (componentPart == null) return null;
if (!componentPart.Elements.Any()) return null;
Reference reference = citation.Reference;
if (reference == null) return null;
Reference parentReference = reference.ParentReference;
string language = string.Empty;
if (componentPart.Scope == ComponentPartScope.Reference)
{
language = reference.Language.ToUpperInvariant();
}
else if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (parentReference == null) return null;
language = parentReference.Language.ToUpperInvariant();
}
if (string.IsNullOrEmpty(language)) return null;
PersonFieldElement editorFieldElement = componentPart.Elements.OfType().Where(field => field.PropertyId == ReferencePropertyId.Editors).FirstOrDefault() as PersonFieldElement;
if (editorFieldElement == null) return null;
#region German
if (language.Contains("DE"))
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = " (Hrsg.)";
editorFieldElement.GroupSuffixPlural.Text = " (Hrsg.)";
return null;
}
#endregion
#region English
if (language.Contains("EN"))
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = " (Ed.)";
editorFieldElement.GroupSuffixPlural.Text = " (Eds.)";
return null;
}
#endregion
#region Other
else
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = " (Hrsg.)";
editorFieldElement.GroupSuffixPlural.Text = " (Hrsg.)";
return null;
}
#endregion
return null;
}
}
}]]>
true
CPS019 Different prefix or suffix depending on language of reference - DGPs-Version
{0} (Hrsg.)/(Eds.) [DE/EN/other]
Always
Always
Reference
true
Editors
false
-1
LastNameFirstName
Full
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
6
Always
et al.
false
true
false
false
Always
,
Always
(Hrsg.)
Always
(Hrsg.)
NameOnly
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
.
Always
Reference
true
CustomField1
false
false
{0}
Always
.
Always
Reference
true
CustomField2
false
false
{0}
Always
.
Always
Reference
true
CustomField3
false
false
{0}
Always
.
Always
Reference
true
CustomField4
false
false
{0}
Always
Always
,
Reference
true
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameOnly
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
.
Always
Reference
true
Isbn
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
var ensureEnglishIsReferenceLanguage = true; //if set to false, the component part filter will ALWAYS capitalize, regardless of the reference's language
var convertFullUpperCaseWords = ConvertFullUpperCaseWords.Never;
#region Info on ConvertFullUpperCaseWords parameter
/*
Example 1: UN and US government made agreement on payments of contribution
Example 2: UN AND US GOVERNMENT MADE AGREEMENT ON PAYMENTS OF CONTRIBUTION
ConvertFullUpperCaseWords.Never (default)
Result 1: UN and US Government Made Agreement on Payments of Contribution
Result 2: UN and US GOVERNMENT MADE AGREEMENT on PAYMENTS of CONTRIBUTION
ConvertFullUpperCaseWords.Always:
Result 1: Un and Us Government Made Agreement on Payments of Contribution
Result 2: Un and Us Government Made Agreement on Payments of Contribution
ConvertFullUpperCaseWords.Auto:
Result 1: UN and US Government Made Agreement on Payments of Contribution
Result 2: Un and Us Government Made Agreement on Payments of Contribution
*/
#endregion
CultureInfo culture = CultureInfo.CurrentCulture;
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
if (template == null) return null;
if (ensureEnglishIsReferenceLanguage)
{
string languageResolved = citation.Reference.Language;
if (componentPart.Scope == ComponentPartScope.Reference)
{
//if ComponentPartScope is Reference, language can come from Reference or ParentReference
if (string.IsNullOrEmpty(languageResolved) && citation.Reference.ParentReference != null)
{
languageResolved = citation.Reference.ParentReference.Language;
}
if (string.IsNullOrEmpty(languageResolved)) return null;
}
else
{
//if ComponentPartScope is ParentReference, language MUST come from ParentReference
if (citation.Reference.ParentReference == null) return null;
languageResolved = citation.Reference.ParentReference.Language;
}
if (string.IsNullOrEmpty(languageResolved)) return null;
var termsList = new string[] {
"en",
"eng",
"engl",
"English",
"Englisch"
};
var regEx = new Regex(@"\b(" + string.Join("|", termsList) + @")\b", RegexOptions.IgnoreCase);
if (!regEx.IsMatch(languageResolved))
{
return null;
}
}
//Words that will not be capitalized; add words to this list as required
string[] exceptionsArray = { "a", "an", "and", "as", "at",
"but", "by", "down", "for", "from",
"in", "into", "nor",
"of", "on", "onto", "or", "over",
"so", "the", "till", "to",
"up", "via", "with", "yet" };
List exceptions = new List(exceptionsArray);
var textUnits = componentPart.GetTextUnitsUnfiltered(citation, template);
if (textUnits == null || !textUnits.Any()) return null;
string fullString = textUnits.ToString();
bool fullUpperCaseTreatment = false;
switch (convertFullUpperCaseWords)
{
case ConvertFullUpperCaseWords.Always:
fullUpperCaseTreatment = true;
break;
case ConvertFullUpperCaseWords.Never:
{
fullUpperCaseTreatment = false;
}
break;
default:
case ConvertFullUpperCaseWords.Auto:
{
if (HasLowerCase(fullString))
{
fullUpperCaseTreatment = false;
}
else
{
fullUpperCaseTreatment = true;
}
}
break;
}
string prevWord = string.Empty;
for (int i = 0; i < textUnits.Count; i++)
{
//textUnit.Text = textUnits[i].Text.ToLower(culture);
var text = textUnits[i].Text;
//Break the input text into a list of words at whitespaces,
//hyphens, opening parens, and ASCII quotation marks
string splitPattern = @"(\s)|(-)|(\()|(\))|(\"")|(\u2018)|(\u2019)|(\u201A)|(\u201C)|(\u201D)|(\u201E)|(\u201F)|(\u2039)|(\u203A)|(\u00AB)|(\u00BB)|(\.)|(:)|(\?)|(!)";
#region Infos about typographical quotation marks
/*
* \u2018 Left Single Quotation Mark
* \u2019 Right Single Quotation Mark
* \u201A Single Low-9 Quotation Mark
* \u201C Left Double Quotation Mark
* \u201D Right Double Quotation Mark
* \u201E Double Low-9 Quotation Mark
* \u201F Double High-Reversed-9 Quotation Mark
* \u2039 Single Left-Pointing Angle Quotation Mark
* \u203A Single Right-Pointing Angle Quotation Mark
* \u00AB Double Left-Pointing Angle Quotation Mark
* \u00BB Double Right-Pointing Angle Quotation Mark
*/
#endregion
List words = new List(Regex.Split(text, splitPattern));
string matchInterpunctuation = @"\.|:|\?|!";
string matchQuotationMarks = @"\""|\u2018|\u2019|\u201A|\u201C|\u201D|\u201E|\u201F|\u2039|\u203A|\u00AB|\u00BB";
var counter = 0;
text = string.Empty;
//Check each remaining word against the list, and append it to the new text.
//Leave words in upper case unchanged, unless they appear in the exception list.
foreach (string word in words)
{
counter++;
if (Regex.IsMatch(word, matchInterpunctuation) || word.Equals(" "))
{
//space or punctuation
text = text + word;
continue;
}
if (counter == 1) // first word in a textunit
{
if (i == 0) text = text + ToUpperFirstLetter(word, fullUpperCaseTreatment, culture); // first word overall => capitalize
else if ((String.IsNullOrWhiteSpace(prevWord)) && !(exceptions.Contains(word.ToLower(culture)))) text = text + ToUpperFirstLetter(word, fullUpperCaseTreatment, culture); // new textunit after space and not stopword => capitalize
else text = text + word; // in all other cases: do nothing
}
else if (Regex.IsMatch(prevWord, matchQuotationMarks)) // capitalize also stopwords directly after quotation marks
{
text = text + ToUpperFirstLetter(word, fullUpperCaseTreatment, culture);
}
else if (exceptions.Contains(word.ToLower(culture))) // check list of exceptions
{
text = text + word.ToLower(culture);
}
else // in all other cases: capitalize
{
text = text + ToUpperFirstLetter(word, fullUpperCaseTreatment, culture);
}
prevWord = word; // save current word as previous word for next iteration
}
textUnits[i].Text = text;
}
handled = true;
return textUnits;
}
public string ToUpperFirstLetter(string input, bool ensureAllButFirstIsLower = false, CultureInfo culture = null)
{
if (string.IsNullOrEmpty(input)) return input;
char[] letters = input.ToCharArray();
for (var i = 0; i < letters.Length; i++)
{
if (i == 0)
{
letters[0] = char.ToUpper(letters[0], culture);
continue;
}
if (i > 0 && ensureAllButFirstIsLower == false) break;
letters[i] = char.ToLower(letters[i], culture);
}
return new string(letters);
}
public enum ConvertFullUpperCaseWords
{
Never,
Always,
Auto //converts full uppercase words to lower case only if the conmplete text is written in uppercase
};
public bool HasLowerCase(string input)
{
return !string.IsNullOrEmpty(input) && input.Any(c => char.IsLower(c));
}
}
}
]]>
true
Capitalize english journal names
. {0} [italic]
Always
Always
.
Reference
true
Periodical
false
true
false
false
false
true
false
false
false
false
false
Name
false
{0}
Always
.
Always
Reference
true
Language
false
false
{0}
Always
.
Always
Reference
true
PageCount
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
{0}
Always
.
Always
Reference
true
NumberOfVolumes
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
{0}
Always
.
Always
Reference
true
OnlineAddress
false
false
false
false
false
false
{0}
Always
.
Always
Reference
true
OriginalPublication
false
D
Always
im Druck
true
false
false
{0}
Always
Always
Reference
true
OthersInvolved
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
, S. {0}
Always
Always
,
Reference
true
PageRange
false
Arabic
true
FullRange
Always
Sp.
Always
–
Always
false
StartPageOnly
Always
Sp.
Always
Always
false
FullRange
Always
Sp.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Nr.
Always
Always
false
FullRange
Always
Nr.
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
§§
Always
–
Always
true
StartPageOnly
Always
§
Always
Always
false
FullRange
Always
§§
Always
Always
Arabic
true
FullRange
Always
Rn.
Always
–
Always
true
FullRange
Always
Rn.
Always
Always
false
FullRange
Always
Rn.
Always
Always
false
{0}
Always
.
Always
Reference
true
ParallelTitle
false
false
{0}
Always
Always
.
Reference
true
PlaceOfPublication
false
true
1
1
Always
Always
,
false
{0}
Always
.
Always
Reference
true
Price
false
false
{0}
Always
Always
:
Reference
true
Publishers
false
false
{0}
Always
Always
.
Reference
true
SeriesTitle
false
true
Name
false
{0}
Always
.
Always
Reference
true
ShortTitle
false
false
{0}
Always
.
Always
Reference
true
SpecificField1
false
false
{0}
Always
.
Always
Reference
true
SpecificField2
false
false
{0}
Always
.
Always
Reference
true
SpecificField3
false
false
{0}
Always
.
Always
Reference
true
SpecificField4
false
false
{0}
Always
.
Always
Reference
true
SpecificField5
false
false
{0}
Always
.
Always
Reference
true
SpecificField6
false
false
{0}
Always
.
Always
Reference
true
SpecificField7
false
false
{0}
Always
.
Always
Reference
true
NextElementHasData
[
StorageMedium
false
PreviousElementHasData
]
false
{0}
Always
Always
.
Reference
true
Title
false
false
. {0}
Always
.
Always
.
Reference
true
Subtitle
false
false
{0}
Always
.
Always
Reference
true
TitleInOtherLanguages
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find field elements, of type: TextFieldElement, ReferencePropertyId = TranslatedTitle
var translatedTitleFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.TranslatedTitle).ToList();
if (translatedTitleFieldElements == null || !translatedTitleFieldElements.Any()) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (TextFieldElement element in translatedTitleFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
//if (string.IsNullOrEmpty(value)) continue;
switch (language)
{
case (Language.English):
{
//no output
handled = true;
return null;
}
break;
default:
case (Language.German):
{
//no output
handled = true;
return null;
}
break;
case Language.Other:
{
//output the Translated Title
handled = false;
return null;
}
break;
}
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
COT025 Output translated title language specific
[{0}]
Always
Always
Reference
true
NextElementHasData
[
TranslatedTitle
false
PreviousElementHasData
]
false
{0}
Always
.
Always
Reference
true
UniformTitle
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find numeric field elements
//we treat only numeric field elemements that output the Volume field
var numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Volume).ToList();
if (numericFieldElements == null || numericFieldElements.Count() == 0) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region Volume field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "vol. ";
element.PluralPrefix.Text = "vol. ";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "Bd. ";
element.PluralPrefix.Text = "Bd. ";
}
break;
case Language.Other:
{
element.SingularPrefix.Text = "Bd. ";
element.PluralPrefix.Text = "Bd. ";
}
break;
}
}
#endregion Volume field contains just a number
#region Volume field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
}
}
#endregion Volume field contains text
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
COT001 Add language specific prefix + suffix to volume - DGPs-Version (Bd./vol.)
, Bd. {0} [DE/EN/other]
Always
Always
,
Reference
true
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Bd.
Always
Always
Bd.
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
, {0}
Always
Always
,
Reference
true
YearResolved
false
yyyy
Always
im Druck
true
true
false
{0}
Always
Always
,
Reference
true
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
({0})
Always
Always
Reference
true
NextElementHasData
(
YearResolved
false
yyyy
Always
im Druck
true
true
AnyElementInComponentHasData
)
false
. {0}. {1}
Always
Always
.
Reference
true
Title
false
PreviousAndNextElementsHaveData
.
Subtitle
false
false
({0})
Always
.
Always
Reference
true
NextElementHasData
(
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
PreviousElementHasData
)
false
{0} [kursiv]
Always
Always
,
Reference
true
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
false
false
false
true
false
false
false
false
false
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
({0}, {1})
Always
Always
Reference
true
NextElementHasData
(
Authors
false
-1
LastNameOnly
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
1
Always
et al.
false
false
false
true
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
NextElementHasData
,
YearResolved
false
D
Always
in press
true
false
AnyElementInComponentHasData
)
false
{0}, {1}
Always
Always
Reference
true
Authors
false
-1
LastNameOnly
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
1
Always
et al.
false
false
false
true
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
PreviousAndNextElementsHaveData
,
YearResolved
false
D
Always
in press
true
false
false
({0})
Always
Always
Reference
true
NextElementHasData
(
Date
false
d
Always
im Druck
true
true
PreviousElementHasData
)
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find numeric field elements
//we treat only numeric field elemements that output the Edition field
var numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Edition).ToList();
if (numericFieldElements == null || !numericFieldElements.Any()) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region Edition field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.UseNumericAbbreviations = true;
element.DefaultNumericAbbreviation.Text = "th";
element.DefaultNumericAbbreviation.FontStyle = FontStyle.Neutral; //or: Superscript
element.SpecialNumericAbbreviations.Text = "1|st|2|nd|3|rd";
element.SpecialNumericAbbreviations.FontStyle = FontStyle.Neutral; //or: Superscript
//to avoid the Superscript propagating any further, we set the font style to neutral
element.SingularSuffix.Text = " ed.";
element.SingularSuffix.FontStyle = FontStyle.Neutral;
element.PluralSuffix.Text = " ed.";
element.PluralSuffix.FontStyle = FontStyle.Neutral;
}
break;
default:
case Language.German:
{
element.SingularSuffix.Text = " Aufl.";
element.PluralSuffix.Text = " Aufl.";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = " Aufl.";
element.PluralSuffix.Text = " Aufl.";
}
break;
}
}
#endregion Edition field contains just a number
#region Edition field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
}
}
#endregion Edition field contains text
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
CED003 Add language specific prefix + suffix to edition - DGPs: neutral statt hochgestellt
({0} Aufl.) [DE/EN/other]
Always
Always
Reference
true
NextElementHasData
(
Edition
false
Always
th
Always
Always
. Aufl.
Always
Always
. Aufl.
Always
1|st|2|nd|3|rd
Always
Always
false
PreviousElementHasData
)
false
{0}. {1} [kursiv]
Always
Always
.
Reference
true
Title
false
false
false
false
true
false
false
false
false
false
PreviousAndNextElementsHaveData
.
Subtitle
false
false
false
false
true
false
false
false
false
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (componentPart == null) return null;
if (!componentPart.Elements.Any()) return null;
Reference reference = citation.Reference;
if (reference == null) return null;
Reference parentReference = reference.ParentReference;
string language = string.Empty;
if (componentPart.Scope == ComponentPartScope.Reference)
{
language = reference.Language.ToUpperInvariant();
}
else if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (parentReference == null) return null;
language = parentReference.Language.ToUpperInvariant();
}
if (string.IsNullOrEmpty(language)) return null;
PersonFieldElement editorFieldElement = componentPart.Elements.OfType().Where(field => field.PropertyId == ReferencePropertyId.Editors).FirstOrDefault() as PersonFieldElement;
if (editorFieldElement == null) return null;
#region German
if (language.Contains("DE"))
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = ", Hrsg.";
editorFieldElement.GroupSuffixPlural.Text = ", Hrsg.";
return null;
}
#endregion
#region English
if (language.Contains("EN"))
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = ", ed.";
editorFieldElement.GroupSuffixPlural.Text = ", eds.";
return null;
}
#endregion
#region Other
else
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = ", Hrsg.";
editorFieldElement.GroupSuffixPlural.Text = ", Hrsg.";
return null;
}
#endregion
return null;
}
}
}]]>
true
CPS019 Different prefix or suffix depending on language of reference - DGPs-Version
({0}), Hrsg./eds. [de/en/other]
Always
Always
Reference
true
NextElementHasData
(
Editors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
8
6
Always
, et al.
false
false
false
false
Always
,
Always
, Hrsg.
Always
, Hrsg.
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
AnyElementInComponentHasData
)
false
({0})
Always
Always
Reference
true
NextElementHasData
(
TitleSupplement
false
AnyElementInComponentHasData
)
false
({0})
Always
Always
Reference
true
NextElementHasData
(
PageRange
false
Arabic
true
FullRange
Always
Sp.
Always
–
Always
false
StartPageOnly
Always
Sp.
Always
Always
false
FullRange
Always
Sp.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Nr.
Always
Always
false
FullRange
Always
Nr.
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
§§
Always
–
Always
true
StartPageOnly
Always
§
Always
Always
false
FullRange
Always
§§
Always
Always
Arabic
true
FullRange
Always
Rn.
Always
–
Always
false
FullRange
Always
Rn.
Always
Always
false
FullRange
Always
Rn.
Always
Always
PreviousElementHasData
)
false
(Original erschienen {0})
Always
Always
Reference
true
AnyElementInComponentHasData
(
NextElementHasData
Original erschienen
OriginalPublication
false
D
Always
im Druck
true
false
AnyElementInComponentHasData
)
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find numeric field elements
//we treat only numeric field elemements that output the Volume field
var numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Volume).ToList();
if (numericFieldElements == null || numericFieldElements.Count() == 0) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region Volume field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "no. ";
element.PluralPrefix.Text = "no. ";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "Nr. ";
element.PluralPrefix.Text = "Nr. ";
}
break;
case Language.Other:
{
element.SingularPrefix.Text = "Nr. ";
element.PluralPrefix.Text = "Nr. ";
}
break;
}
}
#endregion Volume field contains just a number
#region Volume field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
}
}
#endregion Volume field contains text
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
COT001 - DGPs-Version (Reihentitel Nr./no. Nummer)
(Report {0} Nr./no. {1}) [DE/EN/other]
Always
Always
Reference
true
AnyElementInComponentHasData
(
SeriesTitle
false
true
Name
PreviousAndNextElementsHaveData
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
Nicht veröffentlichtes Manuskript
Always
.
Always
Reference
true
Always
Nicht veröffentlichtes Manuskript.
false
{0} (Produzent)
Always
.
Always
Reference
true
Editors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
(Produzent)
Always
(Produzenten)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0} (Regie)
Always
.
Always
,
Reference
true
Authors
false
-1
LastNameFirstName
Abbreviated
Full
All
Always
,
Always
, &
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
(Regie)
Always
(Regie)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
[Spielfilm]
Always
.
Always
Reference
true
Always
[Spielfilm]
false
{0} (Autor)
Always
.
Always
Reference
true
Authors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
PreviousElementHasData
(Autor)
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find electronic address field elements
//we treat only electronic address field elemements that output the Edition field
IEnumerable electronicAddressFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.OnlineAddress).ToList();
if (electronicAddressFieldElements == null || !electronicAddressFieldElements.Any()) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
if (string.IsNullOrEmpty(reference.OnlineAddress)) return null;
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (ElectronicAddressFieldElement element in electronicAddressFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
//if (string.IsNullOrEmpty(value)) continue;
switch (language)
{
case (Language.English):
{
//add prefix
LiteralElement newElement = new LiteralElement(componentPart, "Retrieved from ");
componentPart.Elements.InsertIElementBefore(element, newElement);
//add suffix
newElement = new LiteralElement(componentPart, "");
componentPart.Elements.InsertIElementAfter(element, newElement);
}
break;
default:
case (Language.German):
{
//add prefix
LiteralElement newElement = new LiteralElement(componentPart, "Verfügbar unter ");
componentPart.Elements.InsertIElementBefore(element, newElement);
//add suffix
newElement = new LiteralElement(componentPart, "");
componentPart.Elements.InsertIElementAfter(element, newElement);
}
break;
case Language.Other:
{
//add prefix
LiteralElement newElement = new LiteralElement(componentPart, "Verfügbar unter ");
componentPart.Elements.InsertIElementBefore(element, newElement);
//add suffix
newElement = new LiteralElement(componentPart, "");
componentPart.Elements.InsertIElementAfter(element, newElement);
}
break;
}
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
COT024 Add language specific prefix + suffix to online address - DGPs-Version
. Verfügbar unter / Retrieved from {0}
Always
Always
.
Reference
true
OnlineAddress
false
false
false
false
false
PreviousElementHasData
##
false
{0} (Sprecher)
Always
Always
,
Reference
true
Collaborators
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
(Sprecher)
Always
(Sprecher)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
Interview mit {0}
Always
Always
.
Reference
true
NextElementHasData
Interview mit
Collaborators
false
-1
FirstNameLastName
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0} {1}
Always
Always
Reference
true
SpecificField2
false
NextElementHasData
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
({0} {1})
Always
Always
Reference
true
NextElementHasData
(
SpecificField2
false
NextElementHasData
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
{0}, {1}
Always
.
Always
Reference
true
SpecificField1
false
NextElementHasData
,
YearResolved
false
D
Always
in press
true
false
false
({0}, {1})
Always
Always
Reference
true
NextElementHasData
(
SpecificField1
false
NextElementHasData
,
YearResolved
false
D
Always
in press
true
false
PreviousElementHasData
)
false
({0} {1})
Always
Always
Reference
true
Always
(
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
NextElementHasData
SpecificField2
false
AnyElementInComponentHasData
)
false
{0}
Always
Always
Reference
true
Year
false
D
Always
in press
true
false
false
({0} {1}, {2})
Always
.
Always
Reference
true
Always
(
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
NextElementHasData
SpecificField2
false
NextElementHasData
,
QuotationPageRange
false
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
AnyElementInComponentHasData
)
false
{0}, {1}, {2}
Always
Always
Reference
true
SpecificField1
false
PreviousAndNextElementsHaveData
,
YearResolved
false
D
Always
in press
true
false
PreviousAndNextElementsHaveData
,
QuotationPageRange
false
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
false
({0}, {1}, {2})
Always
.
Always
Reference
true
NextElementHasData
(
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
NextElementHasData
,
YearResolved
false
D
Always
in press
true
false
NextElementHasData
,
QuotationPageRange
false
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
PreviousElementHasData
)
false
({0} {1}, {2})
Always
Always
Reference
true
NextElementHasData
(
SpecificField2
false
NextElementHasData
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
QuotationPageRange
false
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
AnyElementInComponentHasData
)
false
{0}, {1}
Always
Always
Reference
true
Subtitle
false
NextElementHasData
,
YearResolved
false
D
Always
in press
true
false
false
, {0} [ohne S.]
Always
Always
,
Reference
true
PageRange
false
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
false
(
Always
Always
Reference
true
Always
(
false
)
Always
Always
Reference
true
Always
)
false
{0} [nur Nachnamen]
Always
Always
Reference
true
Authors
false
-1
LastNameOnly
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
1
Always
, et al.
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
Always
,
Reference
true
QuotationPageRange
false
Arabic
true
FullRange
Always
Sp.
Always
–
Always
false
StartPageOnly
Always
Sp.
Always
Always
false
FullRange
Always
Sp.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
§§
Always
–
Always
true
StartPageOnly
Always
§
Always
Always
false
FullRange
Always
§§
Always
Always
Arabic
true
FullRange
Always
Rn.
Always
–
Always
false
FullRange
Always
Rn.
Always
Always
false
FullRange
Always
Rn.
Always
Always
false
{0} [nur Nachnamen, ohne Zusätze]
Always
Always
Reference
true
Editors
false
2
LastNameOnly
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
LastNameFirstName
Full
Full
All
Always
,
Always
,
Always
, &
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
1
Always
, et al.
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}/{1}
Always
Always
,
Reference
true
OriginalPublication
false
D
Always
im Druck
true
false
PreviousAndNextElementsHaveData
/
YearResolved
false
yyyy
Always
im Druck
true
true
false
{0} [kursiv]
Always
Always
.
Reference
true
Title
false
false
false
false
true
false
false
false
false
false
false
[Mit {0}]
Always
.
Always
.
Reference
true
AnyElementInComponentHasData
[Mit
Collaborators
false
-1
LastNameFirstNameCompact
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
AnyElementInComponentHasData
]
false
{0}: {1}
Always
Always
.
Reference
true
SpecificField1
false
PreviousAndNextElementsHaveData
:
PlaceOfPublication
false
false
-1
-1
Always
, et al.
Always
,
false
[Themenheft]
Always
Always
Reference
true
Always
[Themenheft]
false
{0} (Regie)
Always
.
Always
,
Reference
true
Editors
false
-1
LastNameFirstName
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
PreviousElementHasData
(Regie)
false
{0} (Redaktion)
Always
.
Always
,
Reference
true
Collaborators
false
-1
LastNameFirstName
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
PreviousElementHasData
(Redaktion)
false
{0} (Komponist)
Always
.
Always
,
Reference
true
Authors
false
-1
LastNameFirstName
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
(Komponist)
Always
(Komponisten)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0} (Interpret)
Always
.
Always
,
Reference
true
Collaborators
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
(Interpret)
Always
(Interpreten)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0} (Dirigent)
Always
.
Always
,
Reference
true
Editors
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
(Dirigent)
Always
(Dirigenten)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0} (Orchester)
Always
.
Always
.
Reference
true
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
PreviousElementHasData
(Orchester)
false
{0} (Anmelder)
Always
.
Always
.
Reference
true
SpecificField2
false
PreviousElementHasData
(Anmelder)
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
#region Treat Volume of Series/Bandnr. der Reihe fields
//we treat only numeric field elemements that output the Volume field
var numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Volume).ToList();
foreach (NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region Volume field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "vol. ";
element.PluralPrefix.Text = "vol. ";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "Bd. ";
element.PluralPrefix.Text = "Bd. ";
}
break;
case Language.Other:
{
element.SingularPrefix.Text = "Bd. ";
element.PluralPrefix.Text = "Bd. ";
}
break;
}
}
#endregion Volume field contains just a number
#region Volume field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
case Language.Other:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
}
}
#endregion Volume field contains text
}
#endregion
#region Treat Edition/Auflage fields
//we treat only numeric field elemements that output the Edition field
numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Edition).ToList();
foreach (NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region Edition field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.UseNumericAbbreviations = true;
element.DefaultNumericAbbreviation.Text = "th";
element.DefaultNumericAbbreviation.FontStyle = FontStyle.Neutral; // or: Superscript
element.SpecialNumericAbbreviations.Text = "1|st|2|nd|3|rd";
element.SpecialNumericAbbreviations.FontStyle = FontStyle.Neutral; // or: Superscript
//to avoid the Superscript propagating any further, we set the font style to neutral
element.SingularSuffix.Text = " ed.";
element.SingularSuffix.FontStyle = FontStyle.Neutral;
element.PluralSuffix.Text = " ed.";
element.PluralSuffix.FontStyle = FontStyle.Neutral;
}
break;
default:
case Language.German:
{
element.SingularSuffix.Text = ". Aufl.";
element.PluralSuffix.Text = ". Aufl.";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = ". Aufl.";
element.PluralSuffix.Text = ". Aufl.";
}
break;
}
}
#endregion Edition field contains just a number
#region Edition field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
}
}
#endregion Edition field contains text
}
#endregion
#region Treat NumberOfVolumes/Anzahl der Bände fields
numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.NumberOfVolumes).ToList();
foreach(NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region NumberOfVolumes field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.SingularSuffix.Text = " vol.";
element.PluralSuffix.Text = " vols.";
}
break;
default:
case Language.German:
{
element.SingularSuffix.Text = " Band";
element.PluralSuffix.Text = " Bände";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = " Band";
element.PluralSuffix.Text = " Bände";
}
break;
}
}
#endregion NumberOfVolumes field contains just a number
#region NumberOfVolumes field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
case Language.Other:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
}
}
#endregion NumberOfVolumes field contains text
}
#endregion
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
Kombi COT001 + CED003 + NumberOfVolumes
({0}, Bd. {1}, {2}. Aufl., {3}) [DE/EN/other]
Always
.
Always
Reference
true
AnyElementInComponentHasData
(
SeriesTitle
false
true
Name
NextElementHasData
,
Volume
false
Always
th
Always
Bd.
Always
Always
Bd.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
. Aufl.
Always
Always
. Aufl.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
NumberOfVolumes
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Bände
Always
Always
Band
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
{0}: Bd. {1}
Always
.
Always
.
Reference
true
SeriesTitle
false
true
Name
NextElementHasData
:
NextElementHasData
Bd.
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
{0} (Mitarbeiter)
Always
.
Always
,
Reference
true
Collaborators
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
;
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
true
von|v.|von der|v. d.
false
Always
,
Always
(Mitarbeiter)
Always
(Mitarbeiter)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}: {1}
Always
Always
.
Reference
true
SeriesTitle
false
true
Name
PreviousAndNextElementsHaveData
:
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
(Band {0}, {1})
Always
.
Always
Reference
true
AnyElementInComponentHasData
(
NextElementHasData
Band
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
PageRange
false
Arabic
true
FullRange
Always
Sp.
Always
–
Always
false
StartPageOnly
Always
Sp.
Always
Always
false
FullRange
Always
Sp.
Always
Always
Arabic
true
FullRange
Always
Nr.
Always
–
Always
false
StartPageOnly
Always
Nr.
Always
Always
false
FullRange
Always
Nr.
Always
Always
Arabic
true
FullRange
Always
S.
Always
–
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
§§
Always
–
Always
true
StartPageOnly
Always
§
Always
Always
false
FullRange
Always
§§
Always
Always
Arabic
true
FullRange
Always
Rn.
Always
–
Always
false
FullRange
Always
Rn.
Always
Always
false
FullRange
Always
Rn.
Always
Always
AnyElementInComponentHasData
)
false
[{0}]
Always
Always
Reference
true
NextElementHasData
[
StorageMedium
false
PreviousElementHasData
]
false
(Version {0})
Always
Always
Reference
true
NextElementHasData
(Version
SpecificField4
false
PreviousElementHasData
)
false
[Computer software]
Always
.
Always
Reference
true
Always
[Computer software]
false
{0}
Always
Always
.
Reference
true
IndexInBibliography
false
Always
Arabic
Always
Always
LetterLowerCase
Always
Always
false
{0}
Always
Always
.
Reference
true
FirstFootnoteCitationNumber
false
false
false
false
{0}
Always
Always
.
Reference
true
CitationKey
false
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
//Should only the primary authors be considered in checking last names for ambiguity?
bool checkAmbiguityForPrimaryAuthorsOnly = true;
//When a first and/or middle name is added for disambiguation, should that be before or after the last name?
PersonNameOrder nameOrderForAmbiguityResolution = PersonNameOrder.FirstNameLastName;
//In case of ambiguous last names, should the first attempt to disambigutate be the addition of full first names or just the initials?
NameFormat firstNameFormatForAmbiguityResolution = NameFormat.Abbreviated;
//NameFormat.Full John Mike
//NameFormat.Abbreviated J. M.
//NameFormat.AbbreviatedNoPeriod J M
//NameFormat.AbbreviatedCompact J.M.
//NameFormat.Compact JM
handled = false;
if (citation == null || citation.Reference == null) return null;
if (componentPart == null || componentPart.Elements == null || !componentPart.Elements.Any()) return null;
CitationManager citationManager = citation.CitationManager;
if (citationManager == null) return null;
PlaceholderCitation placeholderCitation = citation as PlaceholderCitation;
if (placeholderCitation == null) return null;
if (placeholderCitation.YearOnly) return null;
PersonFieldElement personFieldElement = componentPart.Elements[0] as PersonFieldElement;
if (personFieldElement == null) return null;
if (personFieldElement.SuppressOutput) return null;
IEnumerable persons = personFieldElement.GetPersonsCited(citation);
if (persons == null || !persons.Any()) return null;
Guid firstPersonId = persons.First().Id;
#region BeforeFormatPerson: Resolve last name ambiguity
BeforeFormatPersonEventArgs bfp;
personFieldElement.PersonFormatter.BeforeFormatPerson +=
(sender, e) =>
{
bfp = (BeforeFormatPersonEventArgs)e;
if (bfp.Person == null) return;
if (checkAmbiguityForPrimaryAuthorsOnly && bfp.Index > 1) return;
bool isLastNameAmbiguous = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.IsFirstCitedPersonLastnameAmbiguous(bfp.Person.LastName) :
citationManager.IsCitedPersonLastNameAmbiguous(bfp.Person.LastName);
if (!isLastNameAmbiguous) return;
NameIdentity nameIdentity = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.GetFirstPersonNameIdentity(bfp.Person) :
citationManager.GetPersonNameIdentity(bfp.Person);
/* PERSON A PERSON B
NameIdentity.None Müller, Gerd Jakob Meier, Konrad Martin
NameIdentity.LastName Müller, Gerd Jakob Müller, Konrad Martin
NameIdentity.LastNameFirstNameInitial Müller, Gerd Jakob Müller, Gustav Martin
NameIdentity.LastNameFirstNameFull Müller, Gerd Jakob Müller, Gerd Martin
NameIdentity.LastNameFirstNameFullMiddleNameInitial Müller, Gerd Jakob Müller, Gerd Johann
NameIdentity.LastNameFirstNameFullMiddleNameFull Müller, Gerd Jakob Müller, Gerd Jakob [der Ältere]
*/
switch (nameIdentity)
{
case NameIdentity.None:
default:
{
return;
}
case NameIdentity.LastName:
{
bfp.FirstNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameInitial:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFullMiddleNameInitial:
case NameIdentity.LastNameFirstNameFullMiddleNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
}
bfp.NameOrder = nameOrderForAmbiguityResolution;
};
#endregion
#region BeforeFormatOrganization: Show abbreviation only if organization has been mentioned before
if (persons.Any(p => p.IsOrganization))
{
BeforeFormatOrganizationEventArgs bfo;
personFieldElement.PersonFormatter.BeforeFormatOrganization +=
(sender, e) =>
{
bfo = (BeforeFormatOrganizationEventArgs)e;
if (bfo.Organization == null) return;
if (!citationManager.HasPersonBeenCitedBefore(citation, bfo.Organization)) return;
bfo.NameOrder = OrganizationNameOrder.AbbreviationOnly;
bfo.TextBeforeAbbreviation = null;
bfo.TextAfterAbbreviation = null;
};
}
#endregion
return null;
}
}
}]]>
true
Abbreviate organization that has been mentioned before AND add initials if there are other authors with the same last name
& {0} [et al]
Always
Always
Reference
true
AuthorsOrEditorsOrOrganizations
false
-1
LastNameOnly
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
2
1
Always
et al.
false
true
false
true
AbbreviationOnly
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
false
false
{0}
Always
Always
.
Reference
true
SeriesTitleEditors
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
//Should only the primary authors be considered in checking last names for ambiguity?
bool checkAmbiguityForPrimaryAuthorsOnly = true;
//When a first and/or middle name is added for disambiguation, should that be before or after the last name?
PersonNameOrder nameOrderForAmbiguityResolution = PersonNameOrder.FirstNameLastName;
//In case of ambiguous last names, should the first attempt to disambigutate be the addition of full first names or just the initials?
NameFormat firstNameFormatForAmbiguityResolution = NameFormat.Abbreviated;
//NameFormat.Full John Mike
//NameFormat.Abbreviated J. M.
//NameFormat.AbbreviatedNoPeriod J M
//NameFormat.AbbreviatedCompact J.M.
//NameFormat.Compact JM
handled = false;
if (citation == null || citation.Reference == null) return null;
if (componentPart == null || componentPart.Elements == null || !componentPart.Elements.Any()) return null;
CitationManager citationManager = citation.CitationManager;
if (citationManager == null) return null;
PlaceholderCitation placeholderCitation = citation as PlaceholderCitation;
if (placeholderCitation == null) return null;
if (placeholderCitation.YearOnly) return null;
PersonFieldElement personFieldElement = componentPart.Elements[0] as PersonFieldElement;
if (personFieldElement == null) return null;
if (personFieldElement.SuppressOutput) return null;
IEnumerable persons = personFieldElement.GetPersonsCited(citation);
if (persons == null || !persons.Any()) return null;
Guid firstPersonId = persons.First().Id;
#region BeforeFormatPerson: Resolve last name ambiguity
BeforeFormatPersonEventArgs bfp;
personFieldElement.PersonFormatter.BeforeFormatPerson +=
(sender, e) =>
{
bfp = (BeforeFormatPersonEventArgs)e;
if (bfp.Person == null) return;
if (checkAmbiguityForPrimaryAuthorsOnly && bfp.Index > 0) return;
bool isLastNameAmbiguous = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.IsFirstCitedPersonLastnameAmbiguous(bfp.Person.LastName) :
citationManager.IsCitedPersonLastNameAmbiguous(bfp.Person.LastName);
if (!isLastNameAmbiguous) return;
NameIdentity nameIdentity = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.GetFirstPersonNameIdentity(bfp.Person) :
citationManager.GetPersonNameIdentity(bfp.Person);
/* PERSON A PERSON B
NameIdentity.None Müller, Gerd Jakob Meier, Konrad Martin
NameIdentity.LastName Müller, Gerd Jakob Müller, Konrad Martin
NameIdentity.LastNameFirstNameInitial Müller, Gerd Jakob Müller, Gustav Martin
NameIdentity.LastNameFirstNameFull Müller, Gerd Jakob Müller, Gerd Martin
NameIdentity.LastNameFirstNameFullMiddleNameInitial Müller, Gerd Jakob Müller, Gerd Johann
NameIdentity.LastNameFirstNameFullMiddleNameFull Müller, Gerd Jakob Müller, Gerd Jakob [der Ältere]
*/
switch (nameIdentity)
{
case NameIdentity.None:
default:
{
return;
}
case NameIdentity.LastName:
{
bfp.FirstNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameInitial:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFullMiddleNameInitial:
case NameIdentity.LastNameFirstNameFullMiddleNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
}
bfp.NameOrder = nameOrderForAmbiguityResolution;
};
#endregion
#region BeforeFormatOrganization: Show abbreviation only if organization has been mentioned before
if (persons.Any(p => p.IsOrganization))
{
BeforeFormatOrganizationEventArgs bfo;
personFieldElement.PersonFormatter.BeforeFormatOrganization +=
(sender, e) =>
{
bfo = (BeforeFormatOrganizationEventArgs)e;
if (bfo.Organization == null) return;
if (!citationManager.HasPersonBeenCitedBefore(citation, bfo.Organization)) return;
bfo.NameOrder = OrganizationNameOrder.AbbreviationOnly;
bfo.TextBeforeAbbreviation = null;
bfo.TextAfterAbbreviation = null;
};
}
#endregion
return null;
}
}
}]]>
true
Abbreviate organization that has been mentioned before AND add initials if there are other authors with the same last name
{0} [alle, &]
Always
Always
Reference
true
AuthorsOrEditorsOrOrganizations
false
-1
LastNameOnly
Full
Full
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
true
Always
&
true
5
1
Always
et al.
false
true
false
true
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
[
AttributeHasData
PreviousElementHasData
]
AttributeHasData
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
//Should only the primary authors be considered in checking last names for ambiguity?
bool checkAmbiguityForPrimaryAuthorsOnly = true;
//When a first and/or middle name is added for disambiguation, should that be before or after the last name?
PersonNameOrder nameOrderForAmbiguityResolution = PersonNameOrder.FirstNameLastName;
//In case of ambiguous last names, should the first attempt to disambigutate be the addition of full first names or just the initials?
NameFormat firstNameFormatForAmbiguityResolution = NameFormat.Abbreviated;
//NameFormat.Full John Mike
//NameFormat.Abbreviated J. M.
//NameFormat.AbbreviatedNoPeriod J M
//NameFormat.AbbreviatedCompact J.M.
//NameFormat.Compact JM
handled = false;
if (citation == null || citation.Reference == null) return null;
if (componentPart == null || componentPart.Elements == null || !componentPart.Elements.Any()) return null;
CitationManager citationManager = citation.CitationManager;
if (citationManager == null) return null;
PlaceholderCitation placeholderCitation = citation as PlaceholderCitation;
if (placeholderCitation == null) return null;
if (placeholderCitation.YearOnly) return null;
PersonFieldElement personFieldElement = componentPart.Elements[0] as PersonFieldElement;
if (personFieldElement == null) return null;
if (personFieldElement.SuppressOutput) return null;
IEnumerable persons = personFieldElement.GetPersonsCited(citation);
if (persons == null || !persons.Any()) return null;
Guid firstPersonId = persons.First().Id;
#region BeforeFormatPerson: Resolve last name ambiguity
BeforeFormatPersonEventArgs bfp;
personFieldElement.PersonFormatter.BeforeFormatPerson +=
(sender, e) =>
{
bfp = (BeforeFormatPersonEventArgs)e;
if (bfp.Person == null) return;
if (checkAmbiguityForPrimaryAuthorsOnly && bfp.Index > 1) return;
bool isLastNameAmbiguous = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.IsFirstCitedPersonLastnameAmbiguous(bfp.Person.LastName) :
citationManager.IsCitedPersonLastNameAmbiguous(bfp.Person.LastName);
if (!isLastNameAmbiguous) return;
NameIdentity nameIdentity = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.GetFirstPersonNameIdentity(bfp.Person) :
citationManager.GetPersonNameIdentity(bfp.Person);
/* PERSON A PERSON B
NameIdentity.None Müller, Gerd Jakob Meier, Konrad Martin
NameIdentity.LastName Müller, Gerd Jakob Müller, Konrad Martin
NameIdentity.LastNameFirstNameInitial Müller, Gerd Jakob Müller, Gustav Martin
NameIdentity.LastNameFirstNameFull Müller, Gerd Jakob Müller, Gerd Martin
NameIdentity.LastNameFirstNameFullMiddleNameInitial Müller, Gerd Jakob Müller, Gerd Johann
NameIdentity.LastNameFirstNameFullMiddleNameFull Müller, Gerd Jakob Müller, Gerd Jakob [der Ältere]
*/
switch (nameIdentity)
{
case NameIdentity.None:
default:
{
return;
}
case NameIdentity.LastName:
{
bfp.FirstNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameInitial:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFullMiddleNameInitial:
case NameIdentity.LastNameFirstNameFullMiddleNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
}
bfp.NameOrder = nameOrderForAmbiguityResolution;
};
#endregion
#region BeforeFormatOrganization: Show abbreviation only if organization has been mentioned before
if (persons.Any(p => p.IsOrganization))
{
BeforeFormatOrganizationEventArgs bfo;
personFieldElement.PersonFormatter.BeforeFormatOrganization +=
(sender, e) =>
{
bfo = (BeforeFormatOrganizationEventArgs)e;
if (bfo.Organization == null) return;
if (!citationManager.HasPersonBeenCitedBefore(citation, bfo.Organization)) return;
bfo.NameOrder = OrganizationNameOrder.AbbreviationOnly;
bfo.TextBeforeAbbreviation = null;
bfo.TextAfterAbbreviation = null;
};
}
#endregion
return null;
}
}
}]]>
true
Abbreviate organization that has been mentioned before AND add initials if there are other authors with the same last name
{0} [und]
Always
Always
Reference
true
AuthorsOrEditorsOrOrganizations
false
-1
LastNameOnly
Full
Full
All
Always
,
Always
und
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
5
1
Always
et al.
false
true
false
true
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
[
AttributeHasData
PreviousElementHasData
]
AttributeHasData
false
false
({0}/{1}, {2})
Always
Always
Reference
true
AnyElementInComponentHasData
(
OriginalPublication
false
D
Always
im Druck
true
false
PreviousAndNextElementsHaveData
/
YearResolved
false
yyyy
Always
im Druck
true
true
PreviousAndNextElementsHaveData
,
QuotationPageRange
false
Arabic
true
FullRange
Always
Sp.
Always
–
Always
false
StartPageOnly
Always
Sp.
Always
Always
false
FullRange
Always
Sp.
Always
Always
Arabic
true
FullRange
Always
Nr.
Always
–
Always
false
StartPageOnly
Always
Nr.
Always
Always
false
FullRange
Always
Nr.
Always
Always
Arabic
true
FullRange
Always
S.
Always
-
Always
false
StartPageOnly
Always
S.
Always
Always
false
FullRange
Always
S.
Always
Always
Arabic
true
FullRange
Always
§§
Always
–
Always
true
StartPageOnly
Always
§
Always
Always
false
FullRange
Always
§§
Always
Always
Arabic
true
FullRange
Always
Rn.
Always
–
Always
false
FullRange
Always
Rn.
Always
Always
false
FullRange
Always
Rn.
Always
Always
AnyElementInComponentHasData
)
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
//Should only the primary authors be considered in checking last names for ambiguity?
bool checkAmbiguityForPrimaryAuthorsOnly = true;
//When a first and/or middle name is added for disambiguation, should that be before or after the last name?
PersonNameOrder nameOrderForAmbiguityResolution = PersonNameOrder.FirstNameLastName;
//In case of ambiguous last names, should the first attempt to disambigutate be the addition of full first names or just the initials?
NameFormat firstNameFormatForAmbiguityResolution = NameFormat.Abbreviated;
//NameFormat.Full John Mike
//NameFormat.Abbreviated J. M.
//NameFormat.AbbreviatedNoPeriod J M
//NameFormat.AbbreviatedCompact J.M.
//NameFormat.Compact JM
handled = false;
if (citation == null || citation.Reference == null) return null;
if (componentPart == null || componentPart.Elements == null || !componentPart.Elements.Any()) return null;
CitationManager citationManager = citation.CitationManager;
if (citationManager == null) return null;
PlaceholderCitation placeholderCitation = citation as PlaceholderCitation;
if (placeholderCitation == null) return null;
if (placeholderCitation.YearOnly) return null;
PersonFieldElement personFieldElement = componentPart.Elements[0] as PersonFieldElement;
if (personFieldElement == null) return null;
if (personFieldElement.SuppressOutput) return null;
IEnumerable persons = personFieldElement.GetPersonsCited(citation);
if (persons == null || !persons.Any()) return null;
Guid firstPersonId = persons.First().Id;
#region BeforeFormatPerson: Resolve last name ambiguity
BeforeFormatPersonEventArgs bfp;
personFieldElement.PersonFormatter.BeforeFormatPerson +=
(sender, e) =>
{
bfp = (BeforeFormatPersonEventArgs)e;
if (bfp.Person == null) return;
if (checkAmbiguityForPrimaryAuthorsOnly && bfp.Index > 1) return;
bool isLastNameAmbiguous = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.IsFirstCitedPersonLastnameAmbiguous(bfp.Person.LastName) :
citationManager.IsCitedPersonLastNameAmbiguous(bfp.Person.LastName);
if (!isLastNameAmbiguous) return;
NameIdentity nameIdentity = checkAmbiguityForPrimaryAuthorsOnly ?
citationManager.GetFirstPersonNameIdentity(bfp.Person) :
citationManager.GetPersonNameIdentity(bfp.Person);
/* PERSON A PERSON B
NameIdentity.None Müller, Gerd Jakob Meier, Konrad Martin
NameIdentity.LastName Müller, Gerd Jakob Müller, Konrad Martin
NameIdentity.LastNameFirstNameInitial Müller, Gerd Jakob Müller, Gustav Martin
NameIdentity.LastNameFirstNameFull Müller, Gerd Jakob Müller, Gerd Martin
NameIdentity.LastNameFirstNameFullMiddleNameInitial Müller, Gerd Jakob Müller, Gerd Johann
NameIdentity.LastNameFirstNameFullMiddleNameFull Müller, Gerd Jakob Müller, Gerd Jakob [der Ältere]
*/
switch (nameIdentity)
{
case NameIdentity.None:
default:
{
return;
}
case NameIdentity.LastName:
{
bfp.FirstNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameInitial:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = firstNameFormatForAmbiguityResolution;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
case NameIdentity.LastNameFirstNameFullMiddleNameInitial:
case NameIdentity.LastNameFirstNameFullMiddleNameFull:
{
bfp.FirstNameFormat = NameFormat.Full;
bfp.MiddleNameFormat = NameFormat.Full;
bfp.MiddleNameUsage = MiddleNameUsage.All;
break;
}
}
bfp.NameOrder = nameOrderForAmbiguityResolution;
};
#endregion
#region BeforeFormatOrganization: Show abbreviation only if organization has been mentioned before
if (persons.Any(p => p.IsOrganization))
{
BeforeFormatOrganizationEventArgs bfo;
personFieldElement.PersonFormatter.BeforeFormatOrganization +=
(sender, e) =>
{
bfo = (BeforeFormatOrganizationEventArgs)e;
if (bfo.Organization == null) return;
if (!citationManager.HasPersonBeenCitedBefore(citation, bfo.Organization)) return;
bfo.NameOrder = OrganizationNameOrder.AbbreviationOnly;
bfo.TextBeforeAbbreviation = null;
bfo.TextAfterAbbreviation = null;
};
}
#endregion
return null;
}
}
}]]>
true
Abbreviate organization that has been mentioned before AND add initials if there are other authors with the same last name
{0} [und et al]
Always
Always
Reference
true
AuthorsOrEditorsOrOrganizations
false
-1
LastNameOnly
Full
Full
All
Always
,
Always
und
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
2
1
Always
et al.
false
false
false
true
AbbreviationOnly
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
false
false
({0} [year, month])
Always
Always
Reference
true
NextElementHasData
(
Date
false
yyyy, MMMM
Always
im Druck
true
true
PreviousElementHasData
)
false
. {0}
Always
Always
.
Reference
true
TitleSupplement
false
false
, {0}
Always
Always
,
Reference
true
PlaceOfPublication
false
true
1
1
Always
Always
,
false
. {0}: {1}
Always
.
Always
.
Reference
true
PlaceOfPublication
false
true
1
1
Always
Always
,
PreviousAndNextElementsHaveData
:
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find date time field elements
//we treat only numeric field elemements that output the Edition field
var dateTimeFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.AccessDate).ToList();
if (dateTimeFieldElements == null || !dateTimeFieldElements.Any()) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (DateTimeFieldElement element in dateTimeFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
switch (language)
{
case Language.English:
{
//add prefix
LiteralElement newElement = new LiteralElement(componentPart, "Accessed ");
componentPart.Elements.InsertIElementBefore(element, newElement);
element.Format = "dd.MM.yyyy";
//add suffix
newElement = new LiteralElement(componentPart, "");
componentPart.Elements.InsertIElementAfter(element, newElement);
}
break;
default:
case Language.German:
{
//add prefix
LiteralElement newElement = new LiteralElement(componentPart, "Zugriff am ");
componentPart.Elements.InsertIElementBefore(element, newElement);
element.Format = "dd.MM.yyyy";
//add suffix
newElement = new LiteralElement(componentPart, "");
componentPart.Elements.InsertIElementAfter(element, newElement);
}
break;
case Language.Other:
{
//add prefix
LiteralElement newElement = new LiteralElement(componentPart, "Zugriff am ");
componentPart.Elements.InsertIElementBefore(element, newElement);
element.Format = "dd.MM.yyyy";
//add suffix
newElement = new LiteralElement(componentPart, "");
componentPart.Elements.InsertIElementAfter(element, newElement);
}
break;
}
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
CDA008 Add language specific prefix + suffix to access date - DGPs
. Zugriff am / Accessed {0}
Always
Always
.
Reference
true
AccessDate
false
dd.MM.yyy
Always
in press
true
true
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
//V1.1 If field has year information only, without month and day, only the year will be output here (instead of January, 1st of that year)
//CultureInfo targetCulture = new CultureInfo("fr"); //"neutrale" Kultur
CultureInfo targetCulture = CultureInfo.CreateSpecificCulture("en-US"); //spezifische Kultur
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
if (componentPart.Elements == null || componentPart.Elements.Count == 0) return null;
IEnumerable dateTimeFieldElements = componentPart.Elements.OfType();
if (dateTimeFieldElements == null || dateTimeFieldElements.Count() != 1) return null;
DateTimeFieldElement dateTimeFieldElement = dateTimeFieldElements.ElementAt(0);
if (dateTimeFieldElement == null) return null;
var propertyId = dateTimeFieldElement.PropertyId;
var dateTimeStringValue = citation.Reference.GetValue(propertyId) as string;
if (string.IsNullOrEmpty(dateTimeStringValue)) return null;
//das folgende geht nicht, da DateTimeFieldFormatter leider "internal" ist
//TextUnitCollection textUnits = DateTimeFieldFormatter.Format(citation, dateTimeFieldElement, dateTimeStringValue);
List segments = GetSegments(dateTimeStringValue);
List literalElements = new List();
TextUnitCollection debug = new TextUnitCollection();
int counter = 1;
foreach (Segment segment in segments)
{
switch (segment.type)
{
case SegmentType.Text:
{
var literalElement = new LiteralElement(componentPart, segment.text);
literalElement.FontStyle = dateTimeFieldElement.FontStyle;
literalElements.Add(literalElement);
}
break;
case SegmentType.DateTime:
{
string newDateString;
if (!segment.ContainsMonthInformation && !segment.ContainsDayInformation)
{
newDateString = segment.dateTime.ToString("yyyy", targetCulture);
}
else
{
newDateString = segment.dateTime.ToString(dateTimeFieldElement.Format, targetCulture);
}
var literalElement = new LiteralElement(componentPart, newDateString);
literalElement.FontStyle = dateTimeFieldElement.FontStyle;
literalElements.Add(literalElement);
}
break;
}
}
//replace the DateTimeFieldElement by the LiteralElements
componentPart.Elements.ReplaceItem(dateTimeFieldElement, literalElements);
//and Citavi handles the rest, therefore we say handled = false && return null
handled = false;
return null;
}
private struct Segment
{
public string text;
public SegmentType type;
public DateTime dateTime;
public bool ContainsDayInformation;
public bool ContainsMonthInformation;
}
private enum SegmentType
{
Text,
DateTime
}
private List GetSegments(string completeString)
{
List segments = new List();
if (string.IsNullOrEmpty(completeString)) return segments;
List dateTimeMatches = DateTimeInformation.Matches(completeString);
if (dateTimeMatches.Count == 0)
{
segments.Add(new Segment() { text = completeString, type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
return segments;
}
int currentPosition = 0;
foreach (DateTimeMatch dateTimeMatch in dateTimeMatches)
{
int matchPosition = dateTimeMatch.Match.Index;
int matchLength = dateTimeMatch.Match.Length;
if (matchPosition > currentPosition)
{
//we add a simple string segment
segments.Add(new Segment() { text = completeString.Substring(currentPosition, matchPosition - currentPosition), type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
currentPosition = matchPosition + matchLength;
}
//we add the found date string segment
segments.Add(new Segment() {
text = completeString.Substring(matchPosition, matchLength),
type = SegmentType.DateTime,
dateTime = dateTimeMatch.DateTime,
ContainsDayInformation = !dateTimeMatch.MissingDayWasAutoCompleted,
ContainsMonthInformation = !dateTimeMatch.MissingMonthWasAutoCompleted
});
currentPosition = matchPosition + matchLength;
}
if (currentPosition <= completeString.Length - 1)
{
//we add a remaining string segment
segments.Add(new Segment() { text = completeString.Substring(currentPosition, completeString.Length - currentPosition), type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
}
return segments;
}
}
}]]>
true
Output month name in English v1.1
({0}) [with day and month, en]
Always
Always
.
Reference
true
NextElementHasData
(
YearResolved
false
yyyy, d. MMMM
Always
im Druck
true
true
AnyElementInComponentHasData
)
false
({0}) [yyyy, d. MMMM]
Always
,
Always
Reference
true
NextElementHasData
(
Date
false
yyyy, d. MMMM
Always
im Druck
true
true
PreviousElementHasData
)
false
({0}, Bd. {1}, {2} Aufl., {3})
Always
Always
Reference
true
AnyElementInComponentHasData
(
SeriesTitle
false
true
Name
NextElementHasData
,
Volume
false
Always
th
Always
Bd.
Always
Always
Bd.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
. Aufl.
Always
Always
. Aufl.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
NumberOfVolumes
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Bände
Always
Always
Band
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
. {0}
Always
Always
.
Reference
true
PageRange
false
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
false
{0} [first name last name]
Always
Always
.
Reference
true
Authors
false
-1
FirstNameLastName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
persönl. Mitteilung, {0}
Always
Always
,
Reference
true
NextElementHasData
persönl. Mitteilung,
Date
false
d
Always
im Druck
false
true
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
//return handled = true if this macro generates the output (as a IEnumerable); the standard output will be suppressed
//return handled = false if you want Citavi to produce the standard output;
//you can still manipulate the component part and its elements before letting Citavi generate the output with handled = false
//CultureInfo targetCulture = new CultureInfo("fr"); //"neutrale" Kultur
//CultureInfo targetCulture = CultureInfo.CreateSpecificCulture("en-US"); //spezifische Kultur
CultureInfo targetCulture = CultureInfo.CreateSpecificCulture("de-de"); //spezifische Kultur
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
if (componentPart.Elements == null || componentPart.Elements.Count == 0) return null;
IEnumerable dateTimeFieldElements = componentPart.Elements.OfType();
if (dateTimeFieldElements == null || dateTimeFieldElements.Count() != 1) return null;
DateTimeFieldElement dateTimeFieldElement = dateTimeFieldElements.ElementAt(0);
if (dateTimeFieldElement == null) return null;
var propertyId = dateTimeFieldElement.PropertyId;
var dateTimeStringValue = citation.Reference.GetValue(propertyId) as string;
if (string.IsNullOrEmpty(dateTimeStringValue)) return null;
//das folgende geht nicht, da DateTimeFieldFormatter leider "internal" ist
//TextUnitCollection textUnits = DateTimeFieldFormatter.Format(citation, dateTimeFieldElement, dateTimeStringValue);
List segments = GetSegments(dateTimeStringValue);
List literalElements = new List();
TextUnitCollection debug = new TextUnitCollection();
int counter = 1;
foreach(Segment segment in segments)
{
switch (segment.type)
{
case SegmentType.Text:
{
var literalElement = new LiteralElement(componentPart, segment.text);
literalElement.FontStyle = dateTimeFieldElement.FontStyle;
literalElements.Add(literalElement);
}
break;
case SegmentType.DateTime:
{
var newDateString = segment.dateTime.ToString(dateTimeFieldElement.Format, targetCulture);
var literalElement = new LiteralElement(componentPart, newDateString);
literalElement.FontStyle = dateTimeFieldElement.FontStyle;
literalElements.Add(literalElement);
}
break;
}
}
//replace the DateTimeFieldElement by the LiteralElements
componentPart.Elements.ReplaceItem(dateTimeFieldElement, literalElements);
//and Citavi handles the rest, therefore we say handled = false && return null
handled = false;
return null;
}
private struct Segment
{
public string text;
public SegmentType type;
public DateTime dateTime;
}
private enum SegmentType
{
Text,
DateTime
}
private List GetSegments(string completeString)
{
List segments = new List();
if (string.IsNullOrEmpty(completeString)) return segments;
List dateTimeMatches = DateTimeInformation.Matches(completeString);
if (dateTimeMatches.Count == 0)
{
segments.Add(new Segment() { text = completeString, type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
return segments;
}
int currentPosition = 0;
foreach(DateTimeMatch dateTimeMatch in dateTimeMatches)
{
int matchPosition = dateTimeMatch.Match.Index;
int matchLength = dateTimeMatch.Match.Length;
if (matchPosition > currentPosition)
{
//we add a simple string segment
segments.Add(new Segment() { text = completeString.Substring(currentPosition, matchPosition - currentPosition), type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
currentPosition = matchPosition + matchLength;
}
//we add the found date string segment
segments.Add(new Segment() { text = completeString.Substring(matchPosition, matchLength), type = SegmentType.DateTime, dateTime = dateTimeMatch.DateTime });
currentPosition = matchPosition + matchLength;
}
if (currentPosition <= completeString.Length - 1)
{
//we add a remaining string segment
segments.Add(new Segment() { text = completeString.Substring(currentPosition, completeString.Length - currentPosition), type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
}
return segments;
}
}
}]]>
false
({0}) [with month]
Always
Always
.
Reference
true
NextElementHasData
(
YearResolved
false
yyyy, MMMM
Always
im Druck
true
true
AnyElementInComponentHasData
)
false
, {0}/{1}
Always
Always
,
Reference
true
OriginalPublication
false
D
Always
im Druck
true
false
PreviousAndNextElementsHaveData
/
YearResolved
false
yyyy
Always
im Druck
true
true
false
({0}/{1})
Always
Always
Reference
true
AnyElementInComponentHasData
(
OriginalPublication
false
D
Always
im Druck
true
false
PreviousAndNextElementsHaveData
/
YearResolved
false
yyyy
Always
im Druck
true
true
AnyElementInComponentHasData
)
false
({0}) [dd.MM.yyyy]
Always
Always
.
Reference
true
NextElementHasData
(
YearResolved
false
d
Always
im Druck
true
true
PreviousElementHasData
)
false
, pp. {0}
Always
Always
,
Reference
true
PageRange
false
Arabic
true
FullRange
Always
col.
Always
–
Always
false
StartPageOnly
Always
Sp.
Always
Always
false
FullRange
Always
Sp.
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Nr.
Always
Always
false
FullRange
Always
Nr.
Always
Always
Arabic
true
FullRange
Always
pp.
Always
–
Always
true
StartPageOnly
Always
p.
Always
Always
false
FullRange
Always
pp.
Always
Always
Arabic
true
FullRange
Always
§§
Always
–
Always
true
StartPageOnly
Always
§
Always
Always
false
FullRange
Always
§§
Always
Always
Arabic
true
FullRange
Always
no.
Always
–
Always
false
FullRange
Always
Rn.
Always
Always
false
FullRange
Always
Rn.
Always
Always
false
({0}, vol. {1}, {2} ed., {3}) [EN] [Monographie] [neutral]
Always
.
Always
Reference
true
AnyElementInComponentHasData
(
SeriesTitle
false
true
Name
NextElementHasData
,
Volume
false
Always
th
Always
vol.
Always
Always
vol.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
Edition
false
Always
th
Always
Always
ed.
Always
Always
ed.
Always
1|st|2|nd|3|rd
Always
Always
true
NextElementHasData
,
NumberOfVolumes
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
vols.
Always
Always
vol.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
{0} [Eds]
Always
,
Always
Reference
true
Editors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
6
Always
et al.
false
true
false
false
Always
,
Always
(Ed.)
Always
(Eds.)
NameOnly
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
({0}, Bd. {1}, {2} ed., {3}) [EN] [Sammelwerk] [hochgestellt]
Always
Always
Reference
true
AnyElementInComponentHasData
(
SeriesTitle
false
true
Name
NextElementHasData
,
Volume
false
Always
th
Always
vol.
Always
Always
vol.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
ed.
Always
Always
ed.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
true
NextElementHasData
,
NumberOfVolumes
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
vols.
Always
Always
vol.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
. Accessed {0}
Always
Always
.
Reference
true
NextElementHasData
Accessed
AccessDate
false
dd.MM.yyy
Always
in press
false
true
false
({0} ed.)
Always
Always
Reference
true
NextElementHasData
(
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
ed.
Always
Always
ed.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
true
PreviousElementHasData
)
false
({0}, eds)
Always
Always
Reference
true
NextElementHasData
(
Editors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
8
6
Always
, et al.
false
false
false
false
Always
,
Always
, ed.
Always
, eds.
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
AnyElementInComponentHasData
)
false
, vol. {0}
Always
Always
,
Reference
true
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
Always
vol.
Always
Always
vol.
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
DOI:/{0}
Always
Always
.
Reference
true
Always
DOI:
Doi
false
PreviousElementHasData
##
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
//V1.1 If field has year information only, without month and day, only the year will be output here (instead of January, 1st of that year)
//V1.2 Lines 107ff language specific output
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
if (componentPart.Elements == null || componentPart.Elements.Count == 0) return null;
#region Find field elements of type DateTime
IEnumerable dateTimeFieldElements = componentPart.Elements.OfType();
if (dateTimeFieldElements == null || dateTimeFieldElements.Count() != 1) return null;
DateTimeFieldElement dateTimeFieldElement = dateTimeFieldElements.ElementAt(0);
if (dateTimeFieldElement == null) return null;
#endregion
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
var propertyId = dateTimeFieldElement.PropertyId;
var dateTimeStringValue = reference.GetValue(propertyId) as string;
if (string.IsNullOrEmpty(dateTimeStringValue)) return null;
//das folgende geht nicht, da DateTimeFieldFormatter leider "internal" ist
//TextUnitCollection textUnits = DateTimeFieldFormatter.Format(citation, dateTimeFieldElement, dateTimeStringValue);
List segments = GetSegments(dateTimeStringValue);
List literalElements = new List();
TextUnitCollection debug = new TextUnitCollection();
//int counter = 1;
foreach (Segment segment in segments)
{
switch (segment.type)
{
case SegmentType.Text:
{
var literalElement = new LiteralElement(componentPart, segment.text);
literalElement.FontStyle = dateTimeFieldElement.FontStyle;
literalElements.Add(literalElement);
}
break;
case SegmentType.DateTime:
{
string newDateString;
#region YEAR information only
if (!segment.ContainsMonthInformation && !segment.ContainsDayInformation)
{
switch (language)
{
default:
case (Language.English):
{
newDateString = segment.dateTime.ToString("yyyy", new CultureInfo("en-US")); //or "en-UK"
}
break;
case (Language.German):
{
newDateString = segment.dateTime.ToString("yyyy", new CultureInfo("de-DE")); // or "de-CH" or "de-AT"
}
break;
case (Language.Other):
{
newDateString = segment.dateTime.ToString("yyyy", new CultureInfo("en-US"));
}
break;
}
}
#endregion
#region YEAR and MONTH
else if (!segment.ContainsDayInformation)
{
switch (language)
{
default:
case (Language.English):
{
newDateString = segment.dateTime.ToString("yyyy, MMMM", new CultureInfo("en-US")); //or "en-UK"
}
break;
case (Language.German):
{
newDateString = segment.dateTime.ToString("yyyy, MMMM", new CultureInfo("de-DE")); // or "de-CH" or "de-AT"
}
break;
case (Language.Other):
{
newDateString = segment.dateTime.ToString("yyyy, MMMM", new CultureInfo("de-DE"));
}
break;
}
}
#endregion
#region YEAR and MONTH and DAY
else
{
switch (language)
{
default:
case (Language.English):
{
newDateString = segment.dateTime.ToString("yyyy, d. MMMM", new CultureInfo("en-US")); //or "en-UK"
}
break;
case (Language.German):
{
newDateString = segment.dateTime.ToString("yyyy, d. MMMM", new CultureInfo("de-DE")); // or "de-CH" or "de-AT"
}
break;
case (Language.Other):
{
newDateString = segment.dateTime.ToString("yyyy, d. MMMM", new CultureInfo("de-DE"));
}
break;
}
}
#endregion
var literalElement = new LiteralElement(componentPart, newDateString);
literalElement.FontStyle = dateTimeFieldElement.FontStyle;
literalElements.Add(literalElement);
}
break;
}
}
//replace the DateTimeFieldElement by the LiteralElements
componentPart.Elements.ReplaceItem(dateTimeFieldElement, literalElements);
//and Citavi handles the rest, therefore we say handled = false && return null
handled = false;
return null;
}
private enum Language
{
English,
German,
Other
}
private struct Segment
{
public string text;
public SegmentType type;
public DateTime dateTime;
public bool ContainsDayInformation;
public bool ContainsMonthInformation;
}
private enum SegmentType
{
Text,
DateTime
}
private List GetSegments(string completeString)
{
List segments = new List();
if (string.IsNullOrEmpty(completeString)) return segments;
List dateTimeMatches = DateTimeInformation.Matches(completeString);
if (dateTimeMatches.Count == 0)
{
segments.Add(new Segment() { text = completeString, type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
return segments;
}
int currentPosition = 0;
foreach (DateTimeMatch dateTimeMatch in dateTimeMatches)
{
int matchPosition = dateTimeMatch.Match.Index;
int matchLength = dateTimeMatch.Match.Length;
if (matchPosition > currentPosition)
{
//we add a simple string segment
segments.Add(new Segment() { text = completeString.Substring(currentPosition, matchPosition - currentPosition), type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
currentPosition = matchPosition + matchLength;
}
//we add the found date string segment
segments.Add(new Segment() {
text = completeString.Substring(matchPosition, matchLength),
type = SegmentType.DateTime,
dateTime = dateTimeMatch.DateTime,
ContainsDayInformation = !dateTimeMatch.MissingDayWasAutoCompleted,
ContainsMonthInformation = !dateTimeMatch.MissingMonthWasAutoCompleted
});
currentPosition = matchPosition + matchLength;
}
if (currentPosition <= completeString.Length - 1)
{
//we add a remaining string segment
segments.Add(new Segment() { text = completeString.Substring(currentPosition, completeString.Length - currentPosition), type = SegmentType.Text, dateTime = SwissAcademic.Environment.NullDate });
}
return segments;
}
}
}]]>
true
CDA005 mit Sprache
({0}) [with day and month, DE/EN/other]
Always
Always
Reference
true
Always
(
YearResolved
false
yyyy, d. MMMM
Always
im Druck
true
true
Always
)
false
. {0}
Always
Always
.
Reference
true
PlaceOfPublication
false
true
1
1
Always
Always
,
false
{0}
Always
Always
.
Reference
true
Translators
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
Always
AttributeHasData
Always
AttributeHasData
Always
(
AttributeHasData
Always
)
AttributeHasData
false
false
{0}
Always
Always
.
Reference
true
EditionNumberResolved
false
Always
th
Always
Always
Always
Always
Always
1|st|2|nd|3|rd
Always
Always
false
false
{0}, {1}
Always
Always
.
Reference
true
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
Always
AttributeHasData
Always
AttributeHasData
Always
(
AttributeHasData
Always
)
AttributeHasData
false
PreviousAndNextElementsHaveData
,
PlaceOfPublication
false
false
5
4
Always
, et al.
Always
,
false
Interview durch {0}
Always
Always
.
Reference
true
Authors
false
-1
FirstNameLastName
Full
Full
All
Always
,
Always
,
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
Interview durch
Always
Interview durch
NameAbbreviation
Always
Always
Always
(
Always
)
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (componentPart == null) return null;
if (componentPart.Elements == null) return null;
if (citation == null || citation.Reference == null) return null;
if (componentPart.Scope == ComponentPartScope.ParentReference && citation.Reference.ParentReference == null) return null;
//We limit this code to ReferenceType "JournalArticle/Zeitschriftenaufsatz" only!
if (citation.Reference.ReferenceType != ReferenceType.JournalArticle) return null;
if (citation.Reference.Periodical == null) return null;
//volume
NumericFieldElement volumeFieldElement = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Volume).FirstOrDefault();
if (volumeFieldElement == null) return null;
//issue number
NumericFieldElement issueNumberFieldElement = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Number).FirstOrDefault();
if (issueNumberFieldElement == null) return null;
int indexOfIssueNumberFieldElement = componentPart.Elements.IndexOf(issueNumberFieldElement);
LiteralElement beforeIssueNumber = indexOfIssueNumberFieldElement > 0 ? componentPart.Elements.ElementAtOrDefault(indexOfIssueNumberFieldElement - 1) as LiteralElement : null;
LiteralElement afterIssueNumber = componentPart.Elements.ElementAtOrDefault(indexOfIssueNumberFieldElement + 1) as LiteralElement;
if (citation.Reference.Periodical.Pagination == Pagination.Annually)
{
if (afterIssueNumber != null) componentPart.Elements.Remove(afterIssueNumber);
componentPart.Elements.Remove(issueNumberFieldElement);
if (beforeIssueNumber != null) componentPart.Elements.Remove(beforeIssueNumber);
return null;
}
return null;
}
}
}]]>
true
Nr. nur dann, wenn ohne Pagination oder heftweise Paginierung
{0}({1})
Always
Always
,
Reference
true
Volume
false
Always
th
false
false
false
true
false
false
false
false
false
Always
Always
Always
Always
Always
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
(
Number
false
Always
th
Always
Always
Always
Always
Always
1|st|2|nd|3|rd
Always
Always
false
PreviousElementHasData
)
false
. Retrieved from {0}
Always
Always
.
Reference
true
NextElementHasData
Retrieved from
OnlineAddress
false
false
false
false
false
PreviousElementHasData
##
false
+++
Always
Always
.
Reference
true
Always
+++
false
. Zugriff am {0} [Kopie]
Always
Always
.
Reference
true
NextElementHasData
Zugriff am
AccessDate
false
dd.MM.yyy
Always
in press
true
true
false
. Verfügbar unter {0} [Kopie]
Always
Always
.
Reference
true
NextElementHasData
Verfügbar unter
OnlineAddress
false
false
false
false
false
PreviousElementHasData
##
false
({0}) [with day and month, de]
Always
Always
.
Reference
true
NextElementHasData
(
YearResolved
false
yyyy, d. MMMM
Always
im Druck
true
true
AnyElementInComponentHasData
)
false
({0}, Hrsg.)
Always
Always
Reference
true
NextElementHasData
(
Editors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
8
6
Always
, et al.
false
false
false
false
Always
,
Always
, Hrsg.
Always
, Hrsg.
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
AnyElementInComponentHasData
)
false
({0}, Bd. {1}, {2}. Aufl., {3}) [DE] [Monographie]
Always
.
Always
Reference
true
AnyElementInComponentHasData
(
SeriesTitle
false
true
Name
NextElementHasData
,
Volume
false
Always
th
Always
Bd.
Always
Always
Bd.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
. Aufl.
Always
Always
. Aufl.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
,
NumberOfVolumes
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Bände
Always
Always
Band
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
{0} [DE]
Always
Always
Reference
true
Editors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
6
Always
et al.
false
true
false
false
Always
,
Always
(Hrsg.)
Always
(Hrsg.)
NameOnly
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
, Bd. {0} [DE]
Always
Always
,
Reference
true
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Bd.
Always
Always
Bd.
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
ebd.
Always
Always
.
Reference
true
Always
ebd.
false
{0}
Always
.
Always
ParentReference
true
AccessDate
false
D
Always
in press
true
false
false
{0}
Always
.
Always
ParentReference
true
Additions
false
false
{0}
Always
Always
ParentReference
true
Authors
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
Always
ParentReference
true
Collaborators
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
.
Always
ParentReference
true
Date
false
D
Always
in press
true
false
false
{0}
Always
.
Always
ParentReference
true
Date2
false
D
Always
in press
true
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find numeric field elements
//we treat only numeric field elemements that output the Edition field
var numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Edition).ToList();
if (numericFieldElements == null || !numericFieldElements.Any()) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region Edition field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.UseNumericAbbreviations = true;
element.DefaultNumericAbbreviation.Text = "th";
element.DefaultNumericAbbreviation.FontStyle = FontStyle.Neutral; // or: Superscript
element.SpecialNumericAbbreviations.Text = "1|st|2|nd|3|rd";
element.SpecialNumericAbbreviations.FontStyle = FontStyle.Neutral; // or: Superscript
//to avoid the Superscript propagating any further, we set the font style to neutral
element.SingularSuffix.Text = " ed.";
element.SingularSuffix.FontStyle = FontStyle.Neutral;
element.PluralSuffix.Text = " ed.";
element.PluralSuffix.FontStyle = FontStyle.Neutral;
}
break;
default:
case Language.German:
{
element.SingularSuffix.Text = ". Aufl.";
element.PluralSuffix.Text = ". Aufl.";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = ". Aufl.";
element.PluralSuffix.Text = ". Aufl.";
}
break;
}
}
#endregion Edition field contains just a number
#region Edition field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
}
}
#endregion Edition field contains text
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
CED003 Add language specific prefix + suffix to edition - DGPs: neutral statt hochgestellt
, {0} [DE/EN/other]
Always
Always
,
ParentReference
true
Edition
false
Always
th
Always
Always
. Aufl.
Always
Always
. Aufl.
Always
1|st|2|nd|3|rd
Always
Always
false
false
In {0}
Always
.
Always
ParentReference
true
Always
In
Editors
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
.
Always
ParentReference
true
CustomField1
false
false
{0}
Always
.
Always
ParentReference
true
CustomField2
false
false
{0}
Always
.
Always
ParentReference
true
CustomField3
false
false
{0}
Always
.
Always
ParentReference
true
CustomField4
false
false
{0}
Always
Always
.
ParentReference
true
Organizations
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
.
Always
ParentReference
true
Isbn
false
false
. {0} [italic]
Always
Always
.
ParentReference
true
Periodical
false
true
false
false
false
true
false
false
false
false
false
Name
false
{0}
Always
.
Always
ParentReference
true
Language
false
false
{0}
Always
.
Always
ParentReference
true
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
{0}
Always
.
Always
ParentReference
true
PageCount
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
{0}
Always
.
Always
ParentReference
true
NumberOfVolumes
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
{0}
Always
.
Always
ParentReference
true
OnlineAddress
false
false
false
false
false
false
{0}
Always
.
Always
ParentReference
true
OriginalPublication
false
D
Always
im Druck
true
false
false
{0}
Always
Always
ParentReference
true
OthersInvolved
false
-1
LastNameFirstName
Full
Full
All
Always
;
Always
;
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
{0}
Always
.
Always
ParentReference
true
PageRange
false
Arabic
true
FullRange
Always
Always
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
–
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
Always
false
StartPageOnly
Always
Always
Always
false
FullRange
Always
Always
Always
Arabic
true
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
false
FullRange
Always
Always
Always
false
{0}
Always
.
Always
ParentReference
true
ParallelTitle
false
false
{0}
Always
.
Always
.
ParentReference
true
PlaceOfPublication
false
false
-1
-1
Always
, et al.
Always
,
false
{0}
Always
.
Always
ParentReference
true
Price
false
false
{0}
Always
.
Always
:
ParentReference
true
Publishers
false
false
{0}
Always
Always
ParentReference
true
SeriesTitle
false
true
Name
false
{0}
Always
.
Always
ParentReference
true
ShortTitle
false
false
, {0}
Always
.
Always
,
ParentReference
true
SpecificField1
false
false
{0}
Always
.
Always
ParentReference
true
SpecificField2
false
false
{0}
Always
.
Always
ParentReference
true
SpecificField3
false
false
{0}
Always
.
Always
ParentReference
true
SpecificField4
false
false
{0}
Always
.
Always
ParentReference
true
SpecificField5
false
false
{0}
Always
.
Always
ParentReference
true
SpecificField6
false
false
Vortrag anlässlich {0}
Always
.
Always
.
ParentReference
true
NextElementHasData
Vortrag anlässlich
SpecificField7
false
false
{0}
Always
.
Always
ParentReference
true
StorageMedium
false
false
, {0}
Always
Always
,
ParentReference
true
Title
false
false
. {0}
Always
Always
.
ParentReference
true
Subtitle
false
false
{0}
Always
.
Always
ParentReference
true
TitleInOtherLanguages
false
false
. {0}
Always
Always
.
ParentReference
true
TitleSupplement
false
false
{0}
Always
.
Always
ParentReference
true
TranslatedTitle
false
false
{0}
Always
.
Always
ParentReference
true
UniformTitle
false
false
{0}
Always
;
Always
ParentReference
true
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
In Titel. Untertitel
Always
.
Always
.
ParentReference
true
NextElementHasData
In
Title
false
false
false
false
true
false
false
false
false
false
NextElementHasData
false
false
false
true
false
false
false
false
false
.
Subtitle
false
false
false
false
true
false
false
false
false
false
false
Herausgeber
Always
.
Always
ParentReference
true
Editors
false
-1
LastNameFirstName
Abbreviated
Abbreviated
All
Always
,
Always
,
false
false
false
false
Always
,
Always
Always
Always
.
false
false
false
false
false
Always
,
Always
, Ed.
Always
, Eds.
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
Jahr
Always
.
Always
ParentReference
true
Year
false
D
Always
in press
true
false
false
, {0}. {1} [kursiv]
Always
Always
,
ParentReference
true
Title
false
false
false
false
true
false
false
false
false
false
PreviousAndNextElementsHaveData
.
Subtitle
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (componentPart == null) return null;
if (!componentPart.Elements.Any()) return null;
Reference reference = citation.Reference;
if (reference == null) return null;
Reference parentReference = reference.ParentReference;
string language = string.Empty;
if (componentPart.Scope == ComponentPartScope.Reference)
{
language = reference.Language.ToUpperInvariant();
}
else if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (parentReference == null) return null;
language = parentReference.Language.ToUpperInvariant();
}
if (string.IsNullOrEmpty(language)) return null;
PersonFieldElement editorFieldElement = componentPart.Elements.OfType().Where(field => field.PropertyId == ReferencePropertyId.Editors).FirstOrDefault() as PersonFieldElement;
if (editorFieldElement == null) return null;
#region German
if (language.Contains("DE"))
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = " (Hrsg.)";
editorFieldElement.GroupSuffixPlural.Text = " (Hrsg.)";
return null;
}
#endregion
#region English
if (language.Contains("EN"))
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = " (ed.)";
editorFieldElement.GroupSuffixPlural.Text = " (eds.)";
return null;
}
#endregion
#region Other
else
{
editorFieldElement.GroupPrefixSingular.Text = "";
editorFieldElement.GroupPrefixPlural.Text = "";
editorFieldElement.GroupSuffixSingular.Text = " (Hrsg.)";
editorFieldElement.GroupSuffixPlural.Text = " (Hrsg.)";
return null;
}
#endregion
return null;
}
}
}]]>
true
CPS019 Different prefix or suffix depending on language of reference - DGPs-Version: (Hrsg.)/(eds.)
. In {0} (Hg.) [DE/EN/other]
Always
Always
.
ParentReference
true
Always
In
Editors
false
-1
FirstNameLastName
Full
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
6
Always
et al.
false
true
false
false
Always
,
Always
(Hrsg.)
Always
(Hrsg.)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
. {0}: {1}
Always
Always
.
ParentReference
true
PlaceOfPublication
false
true
1
1
Always
Always
,
PreviousAndNextElementsHaveData
:
Publishers
false
false
{0}: Bd. {1} [kursiv]
Always
.
Always
.
ParentReference
true
SeriesTitle
false
true
false
false
false
true
false
false
false
false
false
Name
PreviousElementHasData
:
NextElementHasData
false
false
false
true
false
false
false
false
false
Bd.
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
false
false
false
true
false
false
false
false
false
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
{0}: Bd. {1}
Always
Always
.
ParentReference
true
SeriesTitle
false
true
Name
PreviousElementHasData
:
NextElementHasData
Bd.
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
false
({0})
Always
.
Always
ParentReference
true
AnyElementInComponentHasData
(
TitleSupplement
false
AnyElementInComponentHasData
)
false
({0})
Always
Always
ParentReference
true
AnyElementInComponentHasData
(
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
. Aufl.
Always
Always
. Aufl.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
AnyElementInComponentHasData
)
false
[Sonderheft]
Always
.
Always
ParentReference
true
Always
[Sonderheft]
false
. {0}({1})
Always
Always
.
ParentReference
true
Volume
false
Always
false
false
false
false
false
false
false
true
false
th
false
false
false
true
false
false
false
false
false
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
NextElementHasData
(
Number
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
Always
Always
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
false
PreviousElementHasData
)
false
In
Always
Always
.
ParentReference
true
Always
In
false
[{0}]
Always
.
Always
ParentReference
true
NextElementHasData
[
StorageMedium
false
PreviousElementHasData
]
false
{0}
Always
Always
.
ParentReference
true
IndexInBibliography
false
Always
Arabic
Always
Always
LetterLowerCase
Always
Always
false
{0}
Always
Always
.
ParentReference
true
FirstFootnoteCitationNumber
false
false
false
false
GetTextUnits(ComponentPart componentPart, Template template, Citation citation, out bool handled)
{
handled = false;
if (citation == null) return null;
if (citation.Reference == null) return null;
if (componentPart == null) return null;
#region Find numeric field elements
//we treat only numeric field elemements that output the Volume field
var numericFieldElements = componentPart.Elements.OfType().Where(element => element.PropertyId == ReferencePropertyId.Volume).ToList();
if (numericFieldElements == null || numericFieldElements.Count() == 0) return null;
#endregion Find numeric field elements
#region Determine reference to look at
Reference reference;
if (componentPart.Scope == ComponentPartScope.ParentReference)
{
if (citation.Reference.ParentReference == null) return null;
reference = citation.Reference.ParentReference as Reference;
}
else
{
reference = citation.Reference as Reference;
}
if (reference == null) return null;
#endregion Determine reference to look at
#region Determine reference language
Language language;
if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("en").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.English;
}
else if (String.Equals(reference.LanguageCode, CultureInfo.GetCultureInfo("de").TwoLetterISOLanguageName, StringComparison.OrdinalIgnoreCase))
{
language = Language.German;
}
else
{
language = Language.Other;
}
#endregion Determine reference language
foreach (NumericFieldElement element in numericFieldElements)
{
var property = element.PropertyId;
var value = (string)reference.GetValue(property);
if (string.IsNullOrEmpty(value)) continue;
int number;
bool isNumeric = int.TryParse(value, out number);
#region Volume field contains just a number
if (isNumeric)
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "vol. ";
element.PluralPrefix.Text = "vol. ";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "Bd. ";
element.PluralPrefix.Text = "Bd. ";
}
break;
case Language.Other:
{
element.SingularPrefix.Text = "Bd. ";
element.PluralPrefix.Text = "Bd. ";
}
break;
}
}
#endregion Volume field contains just a number
#region Volume field contains text
else
{
switch (language)
{
case Language.English:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
default:
case Language.German:
{
element.SingularPrefix.Text = "";
element.PluralPrefix.Text = "";
}
break;
case Language.Other:
{
element.SingularSuffix.Text = "";
element.PluralSuffix.Text = "";
}
break;
}
}
#endregion Volume field contains text
}
return null;
}
private enum Language
{
English,
German,
Other
}
}
}]]>
true
COT001 Add prefix "no." or "Nr." and a suffix if needed to volume field depending on language of reference - DGPs-Version (Bd./vol.)
, Bd. {0} [DE/EN/other]
Always
Always
,
ParentReference
true
Volume
false
Always
th
Always
Bd.
Always
Always
Bd.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
false
In {0} {1} [kursiv]
Always
.
Always
,
ParentReference
true
NextElementHasData
In
Title
false
false
false
false
true
false
false
false
false
false
NextElementHasData
.
Subtitle
false
false
({0})
Always
.
Always
ParentReference
true
NextElementHasData
(
SpecificField4
false
PreviousElementHasData
)
false
({0}) with day and month
Always
Always
.
ParentReference
true
NextElementHasData
(
YearResolved
false
yyyy, dd. MMMM
Always
In press
true
true
PreviousElementHasData
)
false
. In {0} (Eds.)
Always
Always
.
ParentReference
true
Always
In
Editors
false
-1
FirstNameLastName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
6
Always
et al.
false
true
false
false
Always
,
Always
(Ed.)
Always
(Eds.)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
, vol. {0}
Always
Always
,
ParentReference
true
Volume
false
Always
th
Always
vol.
Always
Always
vol.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
false
, {0} th ed.
Always
Always
,
ParentReference
true
EditionNumberResolved
false
Always
th
Always
Always
ed.
Always
Always
ed.
Always
1|st|2|nd|3|rd
Always
Always
true
false
, {0} ed.
Always
Always
,
ParentReference
true
Edition
false
Always
false
false
false
false
false
false
false
true
false
th
Always
Always
ed.
Always
Always
ed.
Always
false
false
false
false
false
false
false
true
false
1|st|2|nd|3|rd
Always
Always
true
false
, {0}. {1} [recte]
Always
Always
,
ParentReference
true
Title
false
PreviousAndNextElementsHaveData
.
Subtitle
false
false
. In {0} (Hg.) [DE]
Always
Always
.
ParentReference
true
Always
In
Editors
false
-1
FirstNameLastName
Abbreviated
Abbreviated
All
Always
,
Always
&
false
false
false
false
Always
,
Always
Always
Always
.
false
false
true
6
6
Always
et al.
false
true
false
false
Always
,
Always
(Hrsg.)
Always
(Hrsg.)
NameAbbreviation
NextElementHasData
AttributeHasData
PreviousElementHasData
AttributeHasData
NextElementHasData
(
AttributeHasData
PreviousElementHasData
)
AttributeHasData
false
false
, Bd. {0} [DE]
Always
Always
,
ParentReference
true
Volume
false
Always
th
Always
Bd.
Always
Always
Bd.
Always
Always
1|st|2|nd|3|rd
Always
Always
false
false
, {0} [DE]
Always
Always
,
ParentReference
true
Edition
false
Always
th
Always
Always
. Aufl.
Always
Always
. Aufl.
Always
1|st|2|nd|3|rd
Always
Always
false
false
false
Literaturverzeichnis
.
680
true
None
Arabic
1
0
;
true
0
APA
Alphanumeric
0 (positive): x should go after y, x is greater than y
< 0 (negative): x should go before y, x is less than
*/
//First we make sure we are comparing BibliographyCitations only
var xBibliographyCitation = x as BibliographyCitation;
var yBibliographyCitation = y as BibliographyCitation;
if (xBibliographyCitation == null || yBibliographyCitation == null) return 0;
var xReference = xBibliographyCitation.Reference;
var yReference = yBibliographyCitation.Reference;
if (xReference == null || yReference == null) return 0;
//(1) Some comparers are predefined as static members of the CitationComparer class, see IntelliSense
var defaultCitationComparer = CitationComparer.AuthorYearTitleOrNoAuthorThenTitleYearAscending;
return defaultCitationComparer.Compare(x, y);
}
}
}]]>
OrderOfAppearance
LetterLowerCase
false
)
false
Completed
None
JournalArticle
true
DoiAvailable
AuthorsMissing
AuthorsMissing
DoiAvailable
Completed
None
Book
true
DoiAvailable
AuthorsMissing
DoiAvailable
AuthorsMissing
OrganizationsMissing
AuthorsMissing
OrganizationsMissing
DoiAvailable
AuthorsMissing
Completed
None
BookEdited
true
DoiAvailable
EditorsMissing
EditorsMissing
DoiAvailable
Completed
BookEdited
Contribution
true
DoiAvailable
ReferenceLanguageIsEnglish
DoiAvailable
ReferenceLanguageIsEnglish
AuthorsMissing
AuthorsMissing
DoiAvailable
ReferenceLanguageIsEnglish
AuthorsMissing
ReferenceLanguageIsEnglish
DoiAvailable
AuthorsMissing
Completed
UnpublishedWork
Contribution
true
Completed
CollectedWorks
Contribution
true
ReferenceLanguageIsEnglish
AuthorsMissing
ReferenceLanguageIsEnglish
AuthorsMissing
Completed
ConferenceProceedings
Contribution
true
12f6e2a0-f110-4f93-9d48-dc822df798e3
Completed
SpecialIssue
Contribution
true
Completed
None
InternetDocument
true
AuthorsMissing
OrganizationsMissing
AuthorsMissing
Completed
None
Thesis
true
DoiAvailable
Completed
None
NewspaperArticle
true
AuthorsMissing
Completed
None
UnpublishedWork
true
ReferenceLanguageIsEnglish
AuthorsMissing
ReferenceLanguageIsEnglish
AuthorsMissing
OrganizationsMissing
ReferenceLanguageIsEnglish
OrganizationsMissing
OrganizationsMissing
AuthorsMissing
ReferenceLanguageIsEnglish
OrganizationsMissing
AuthorsMissing
OrganizationsMissing
EditorsMissing
AuthorsMissing
Completed
None
Unknown
true
AuthorsMissing
EditorsMissing
AuthorsMissing
OrganizationsMissing
EditorsMissing
AuthorsMissing
Completed
None
ArchiveMaterial
false
AuthorsMissing
Completed
BookEdited
ArchiveMaterial
false
Completed
None
AudioBook
true
Completed
None
AudioOrVideoDocument
true
None
None
RadioPlay
false
Completed
None
CollectedWorks
true
Completed
None
ComputerProgram
true
Completed
None
ConferenceProceedings
true
Completed
None
CourtDecision
false
Completed
None
InterviewMaterial
true
Completed
None
Map
false
AuthorsMissing
Completed
None
Movie
true
Completed
None
MusicTrack
false
Completed
MusicAlbum
MusicTrack
false
AuthorsMissing
Completed
None
NewsAgencyReport
false
Completed
None
Patent
true
Completed
None
PersonalCommunication
true
Completed
None
PressRelease
false
OrganizationsMissing
AuthorsMissing
OrganizationsMissing
Completed
None
Broadcast
false
Completed
None
File
true
Completed
None
MusicAlbum
false
AuthorsMissing
Completed
None
Standard
false
Completed
None
StatuteOrRegulation
false
Completed
BookEdited
StatuteOrRegulation
false
Completed
None
Manuscript
true
Completed
None
Lecture
true
Completed
None
LegalCommentary
true
Completed
LegalCommentary
ContributionInLegalCommentary
false
Completed
None
SpecialIssue
false
true
true
,
;
AuthorThenYearAscendingThenTitle
false
None
Unknown
None
JournalArticle
false
None
Unknown
None
Book
false
None
Unknown
None
BookEdited
false
None
Unknown
BookEdited
Contribution
false
None
Unknown
UnpublishedWork
Contribution
false
None
ContributionBookEdited
CollectedWorks
Contribution
false
None
Unknown
ConferenceProceedings
Contribution
false
None
Unknown
SpecialIssue
Contribution
false
None
Unknown
None
InternetDocument
false
None
Unknown
None
Thesis
false
None
Unknown
None
NewspaperArticle
false
None
Unknown
None
UnpublishedWork
false
None
None
Unknown
false
OriginalPublicationContainsData
RepeatingFootnote
None
Unknown
None
ArchiveMaterial
false
None
Unknown
BookEdited
ArchiveMaterial
false
None
Unknown
None
AudioBook
false
None
Unknown
None
AudioOrVideoDocument
false
None
None
RadioPlay
false
None
Unknown
None
CollectedWorks
false
None
Unknown
None
ComputerProgram
false
None
Unknown
None
ConferenceProceedings
false
None
None
CourtDecision
false
None
None
InterviewMaterial
false
None
Unknown
None
Map
false
None
Unknown
None
Movie
false
None
Unknown
None
MusicTrack
false
None
Unknown
MusicAlbum
MusicTrack
false
None
Unknown
None
NewsAgencyReport
false
None
Unknown
None
Patent
false
None
Unknown
None
PersonalCommunication
false
None
Unknown
None
PressRelease
false
None
Unknown
None
Broadcast
false
None
None
File
false
None
Unknown
None
MusicAlbum
false
None
None
Standard
false
None
Unknown
None
StatuteOrRegulation
false
None
BookEdited
StatuteOrRegulation
false
None
Unknown
None
Manuscript
false
None
Unknown
None
Lecture
false
None
None
LegalCommentary
false
EditorsMissing
None
Unknown
LegalCommentary
ContributionInLegalCommentary
false
None
Unknown
None
SpecialIssue
false
false
false
true
,
;
;
;
true
3
–
true
3
–
AlwaysButOncePerRange
true
FirstAuthorOnlyThenYearAscendingThenTitle
false
None
Unknown
None
JournalArticle
false
None
Unknown
None
Book
false
None
Unknown
None
BookEdited
false
None
Unknown
BookEdited
Contribution
false
None
Unknown
UnpublishedWork
Contribution
false
None
ContributionBookEdited
CollectedWorks
Contribution
false
None
Unknown
ConferenceProceedings
Contribution
false
None
Unknown
SpecialIssue
Contribution
false
None
Unknown
None
InternetDocument
false
None
Unknown
None
Thesis
false
None
Unknown
None
NewspaperArticle
false
None
Unknown
None
UnpublishedWork
false
None
None
Unknown
false
OriginalPublicationContainsData
true
RepeatingInTextCitation
true
ef369d2b-c697-42e7-99f6-dbe313ef1d6e
true
RepeatingInTextCitation
SamePageInPublicationAsPrevious
ef369d2b-c697-42e7-99f6-dbe313ef1d6e
OrganizationsMissing
EditorsMissing
AuthorsMissing
PlaceholderCitationFormatOption1
Nachweis mit "Option 1" | Titel wurde bereits in einem vorherigen Kurznachweis genannt
PlaceholderCitationFormatOption1
RepeatingInTextCitation
PreviousReferenceIsNotPartOfMultipleCitation
SamePageInPublicationAsPrevious
SameReferenceAsPrevious
None
Unknown
None
ArchiveMaterial
false
None
Unknown
BookEdited
ArchiveMaterial
false
None
Unknown
None
AudioBook
false
None
Unknown
None
AudioOrVideoDocument
false
None
None
RadioPlay
false
None
Unknown
None
CollectedWorks
false
None
Unknown
None
ComputerProgram
false
None
Unknown
None
ConferenceProceedings
false
None
None
CourtDecision
false
None
None
InterviewMaterial
false
None
Unknown
None
Map
false
None
Unknown
None
Movie
false
None
Unknown
None
MusicTrack
false
None
Unknown
MusicAlbum
MusicTrack
false
None
Unknown
None
NewsAgencyReport
false
None
Unknown
None
Patent
false
None
None
PersonalCommunication
false
None
Unknown
None
PressRelease
false
None
Unknown
None
Broadcast
false
None
None
File
false
None
Unknown
None
MusicAlbum
false
None
None
Standard
false
None
Unknown
None
StatuteOrRegulation
false
None
BookEdited
StatuteOrRegulation
false
None
Unknown
None
Manuscript
false
None
Unknown
None
Lecture
false
None
None
LegalCommentary
false
EditorsMissing
None
Unknown
LegalCommentary
ContributionInLegalCommentary
false
None
Unknown
None
SpecialIssue
false