<commit_before>package com.nedap.archie.rm.composition;

import com.nedap.archie.rm.archetyped.Locatable;
import com.nedap.archie.rm.datatypes.CodePhrase;
import com.nedap.archie.rm.generic.PartyProxy;
import com.nedap.archie.rm.datavalues.DvCodedText;

import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by pieter.bos on 03/11/15.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "COMPOSITION", propOrder = {
        "language",
        "territory",
        "category",
        "composer",
        "context",
        "content"
})
@XmlRootElement(name="composition")
public class Composition extends Locatable {

    private CodePhrase language;
    private CodePhrase territory;
    private DvCodedText category;

    private PartyProxy composer;

    @Nullable
    private EventContext context;

    private List<ContentItem> content = new ArrayList<>();

    public CodePhrase getLanguage() {
        return language;
    }

    public void setLanguage(CodePhrase language) {
        this.language = language;
    }

    public void setLanguage(String codePhrase) {
        this.language = new CodePhrase(codePhrase);
    }

    public CodePhrase getTerritory() {
        return territory;
    }

    public void setTerritory(CodePhrase territory) {
        this.territory = territory;
    }

    public void setTerritory(String codePhrase) {
        this.territory = new CodePhrase(codePhrase);
    }

    public DvCodedText getCategory() {
        return category;
    }

    public void setCategory(DvCodedText category) {
        this.category = category;
    }

    public void setCategory(String codePhrase) {
        this.category = new DvCodedText();
        category.setDefiningCode(new CodePhrase(codePhrase));
    }

    public PartyProxy getComposer() {
        return composer;
    }

    public void setComposer(PartyProxy composer) {
        this.composer = composer;
    }

    @Nullable
    public EventContext getContext() {
        return context;
    }

    public void setContext(@Nullable EventContext context) {
        this.context = context;
    }

    public List<ContentItem> getContent() {
        return content;
    }

    public void setContent(List<ContentItem> content) {
        this.content = content;
        for(ContentItem item:content) {
            setThisAsParent(item, "item");
        }
    }

    public void addContent(ContentItem item) {
        this.content.add(item);
        setThisAsParent(item, "item");
    }


}<commit_msg>Fix path for composition content<commit_after>package com.nedap.archie.rm.composition;

import com.nedap.archie.rm.archetyped.Locatable;
import com.nedap.archie.rm.datatypes.CodePhrase;
import com.nedap.archie.rm.generic.PartyProxy;
import com.nedap.archie.rm.datavalues.DvCodedText;

import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by pieter.bos on 03/11/15.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "COMPOSITION", propOrder = {
        "language",
        "territory",
        "category",
        "composer",
        "context",
        "content"
})
@XmlRootElement(name="composition")
public class Composition extends Locatable {

    private CodePhrase language;
    private CodePhrase territory;
    private DvCodedText category;

    private PartyProxy composer;

    @Nullable
    private EventContext context;

    private List<ContentItem> content = new ArrayList<>();

    public CodePhrase getLanguage() {
        return language;
    }

    public void setLanguage(CodePhrase language) {
        this.language = language;
    }

    public void setLanguage(String codePhrase) {
        this.language = new CodePhrase(codePhrase);
    }

    public CodePhrase getTerritory() {
        return territory;
    }

    public void setTerritory(CodePhrase territory) {
        this.territory = territory;
    }

    public void setTerritory(String codePhrase) {
        this.territory = new CodePhrase(codePhrase);
    }

    public DvCodedText getCategory() {
        return category;
    }

    public void setCategory(DvCodedText category) {
        this.category = category;
    }

    public void setCategory(String codePhrase) {
        this.category = new DvCodedText();
        category.setDefiningCode(new CodePhrase(codePhrase));
    }

    public PartyProxy getComposer() {
        return composer;
    }

    public void setComposer(PartyProxy composer) {
        this.composer = composer;
    }

    @Nullable
    public EventContext getContext() {
        return context;
    }

    public void setContext(@Nullable EventContext context) {
        this.context = context;
    }

    public List<ContentItem> getContent() {
        return content;
    }

    public void setContent(List<ContentItem> content) {
        this.content = content;
        setThisAsParent(content, "content");
    }

    public void addContent(ContentItem item) {
        this.content.add(item);
        setThisAsParent(item, "content");
    }


}
{'fraction_non_alphanumeric': 0.09524686809137804, 'fraction_numerical': 0.002210759027266028, 'mean_word_length': 2.9772893772893774, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1692591', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1551, 'n_words': 338}