package ecologylab.bigsemantics.generated.library;

/**
 * Automatically generated by MetaMetadataJavaTranslator
 *
 * DO NOT modify this code manually: All your changes may get lost!
 *
 * Copyright (2017) Interface Ecology Lab.
 */

import ecologylab.bigsemantics.generated.library.creativeWork.FondationArticle;
import ecologylab.bigsemantics.metadata.builtins.MetadataBuiltinsTypesScope;
import ecologylab.bigsemantics.metadata.builtins.RichDocument;
import ecologylab.bigsemantics.metadata.mm_name;
import ecologylab.bigsemantics.metadata.scalar.MetadataString;
import ecologylab.bigsemantics.metametadata.MetaMetadataCompositeField;
import ecologylab.bigsemantics.namesandnums.SemanticsNames;
import ecologylab.serialization.annotations.simpl_collection;
import ecologylab.serialization.annotations.simpl_inherit;
import ecologylab.serialization.annotations.simpl_scalar;
import java.lang.String;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@simpl_inherit
public class FondationTag extends RichDocument
{
	@simpl_scalar
	private MetadataString preDescription;

	@simpl_scalar
	private MetadataString midDescription;

	@simpl_scalar
	private MetadataString postDescription;

	@simpl_collection("fondation_article")
	@mm_name("search_results")
	private List<FondationArticle> searchResults;

	public FondationTag()
	{ super(); }

	public FondationTag(MetaMetadataCompositeField mmd) {
		super(mmd);
	}


	public MetadataString	preDescription()
	{
		MetadataString	result = this.preDescription;
		if (result == null)
		{
			result = new MetadataString();
			this.preDescription = result;
		}
		return result;
	}

	public String getPreDescription()
	{
		return this.preDescription == null ? null : preDescription().getValue();
	}

	public MetadataString getPreDescriptionMetadata()
	{
		return preDescription;
	}

	public void setPreDescription(String preDescription)
	{
		if (preDescription != null)
			this.preDescription().setValue(preDescription);
	}

	public void setPreDescriptionMetadata(MetadataString preDescription)
	{
		this.preDescription = preDescription;
	}

	public MetadataString	midDescription()
	{
		MetadataString	result = this.midDescription;
		if (result == null)
		{
			result = new MetadataString();
			this.midDescription = result;
		}
		return result;
	}

	public String getMidDescription()
	{
		return this.midDescription == null ? null : midDescription().getValue();
	}

	public MetadataString getMidDescriptionMetadata()
	{
		return midDescription;
	}

	public void setMidDescription(String midDescription)
	{
		if (midDescription != null)
			this.midDescription().setValue(midDescription);
	}

	public void setMidDescriptionMetadata(MetadataString midDescription)
	{
		this.midDescription = midDescription;
	}

	public MetadataString	postDescription()
	{
		MetadataString	result = this.postDescription;
		if (result == null)
		{
			result = new MetadataString();
			this.postDescription = result;
		}
		return result;
	}

	public String getPostDescription()
	{
		return this.postDescription == null ? null : postDescription().getValue();
	}

	public MetadataString getPostDescriptionMetadata()
	{
		return postDescription;
	}

	public void setPostDescription(String postDescription)
	{
		if (postDescription != null)
			this.postDescription().setValue(postDescription);
	}

	public void setPostDescriptionMetadata(MetadataString postDescription)
	{
		this.postDescription = postDescription;
	}

	public List<FondationArticle> getSearchResults()
	{
		return searchResults;
	}

  // lazy evaluation:
  public List<FondationArticle> searchResults()
  {
    if (searchResults == null)
      searchResults = new ArrayList<FondationArticle>();
    return searchResults;
  }

  // addTo:
  public void addToSearchResults(FondationArticle element)
  {
    searchResults().add(element);
  }

  // size:
  public int searchResultsSize()
  {
    return searchResults == null ? 0 : searchResults.size();
  }

	public void setSearchResults(List<FondationArticle> searchResults)
	{
		this.searchResults = searchResults;
	}
}
