package ecologylab.bigsemantics.metadata.builtins.declarations;
/**
* Automatically generated by MetaMetadataJavaTranslator
*
* DO NOT modify this code manually: All your changes may get lost!
*
* Copyright (2016) Interface Ecology Lab.
*/
import ecologylab.bigsemantics.metadata.Metadata;
import ecologylab.bigsemantics.metadata.builtins.MetadataBuiltinsTypesScope;
import ecologylab.bigsemantics.metadata.mm_name;
import ecologylab.bigsemantics.metadata.scalar.MetadataParsedURL;
import ecologylab.bigsemantics.metametadata.MetaMetadataCompositeField;
import ecologylab.bigsemantics.namesandnums.SemanticsNames;
import ecologylab.net.ParsedURL;
import ecologylab.serialization.annotations.simpl_collection;
import ecologylab.serialization.annotations.simpl_inherit;
import ecologylab.serialization.annotations.simpl_scalar;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
*The Primitive Document Class. Even images should extend this.
*/
@simpl_inherit
public class DocumentDeclaration extends Metadata
{
/**
*The document's actual location.
*/
@simpl_scalar
private MetadataParsedURL location;
/**
*Relative location of a local copy of the document.
*/
@simpl_scalar
private MetadataParsedURL localLocation;
@simpl_collection("additional_location")
@mm_name("additional_locations")
private List<MetadataParsedURL> additionalLocations;
public DocumentDeclaration()
{ super(); }
public DocumentDeclaration(MetaMetadataCompositeField mmd) {
super(mmd);
}
public MetadataParsedURL location()
{
MetadataParsedURL result = this.location;
if (result == null)
{
result = new MetadataParsedURL();
this.location = result;
}
return result;
}
public ParsedURL getLocation()
{
return this.location == null ? null : location().getValue();
}
public MetadataParsedURL getLocationMetadata()
{
return location;
}
public void setLocation(ParsedURL location)
{
if (location != null)
this.location().setValue(location);
}
public void setLocationMetadata(MetadataParsedURL location)
{
this.location = location;
}
public MetadataParsedURL localLocation()
{
MetadataParsedURL result = this.localLocation;
if (result == null)
{
result = new MetadataParsedURL();
this.localLocation = result;
}
return result;
}
public ParsedURL getLocalLocation()
{
return this.localLocation == null ? null : localLocation().getValue();
}
public MetadataParsedURL getLocalLocationMetadata()
{
return localLocation;
}
public void setLocalLocation(ParsedURL localLocation)
{
if (localLocation != null)
this.localLocation().setValue(localLocation);
}
public void setLocalLocationMetadata(MetadataParsedURL localLocation)
{
this.localLocation = localLocation;
}
public List<MetadataParsedURL> getAdditionalLocations()
{
return additionalLocations;
}
// lazy evaluation:
public List<MetadataParsedURL> additionalLocations()
{
if (additionalLocations == null)
additionalLocations = new ArrayList<MetadataParsedURL>();
return additionalLocations;
}
// addTo:
public void addToAdditionalLocations(MetadataParsedURL element)
{
additionalLocations().add(element);
}
// size:
public int additionalLocationsSize()
{
return additionalLocations == null ? 0 : additionalLocations.size();
}
public void setAdditionalLocations(List<MetadataParsedURL> additionalLocations)
{
this.additionalLocations = additionalLocations;
}
}