private static bool HasContactData(MetadataEntityInformationUnit entityInformationUnit) { return(!string.IsNullOrEmpty(entityInformationUnit.ContactPerson) || !string.IsNullOrEmpty(entityInformationUnit.Address) || !string.IsNullOrEmpty(entityInformationUnit.Telephone) || !string.IsNullOrEmpty(entityInformationUnit.Email)); }
private static GuiMetaDataModel MapToGuiMetadataEntity( MetadataEntityInformationUnit metadataEntityInformationUnit) { return(new GuiMetaDataModel( metadataEntityInformationUnit.Entity, metadataEntityInformationUnit.ContactPerson, metadataEntityInformationUnit.Telephone, metadataEntityInformationUnit.Email )); }
private static void LoadEntityInformationUnits(List <MetadataEntityInformationUnit> entityInfoUnits, metsTypeMetsHdrAgent[] metsEntityAgents) { MetadataEntityInformationUnit entityInfoUnit = null; foreach (metsTypeMetsHdrAgent metsEntityAgent in metsEntityAgents) { if (metsEntityAgent.TYPE == metsTypeMetsHdrAgentTYPE.ORGANIZATION) { entityInfoUnit = new MetadataEntityInformationUnit { Entity = metsEntityAgent.name }; entityInfoUnits.Add(entityInfoUnit); } // Attaches contact info to last seen organization: if (metsEntityAgent.TYPE == metsTypeMetsHdrAgentTYPE.INDIVIDUAL && entityInfoUnit != null) { if (!string.IsNullOrEmpty(metsEntityAgent.name)) { entityInfoUnit.ContactPerson = metsEntityAgent.name; } string address = metsEntityAgent.note?.FirstOrDefault(LooksLikeAddress); if (!string.IsNullOrEmpty(address)) { entityInfoUnit.Address = address; } string phoneNumber = metsEntityAgent.note?.FirstOrDefault(LooksLikePhoneNumber); if (!string.IsNullOrEmpty(phoneNumber)) { entityInfoUnit.Telephone = phoneNumber; } string emailAddress = metsEntityAgent.note?.FirstOrDefault(LooksLikeEmailAddress); if (!string.IsNullOrEmpty(emailAddress)) { entityInfoUnit.Email = emailAddress; } } } }
public static GuiMetaDataModel MapToProducer(MetadataEntityInformationUnit producer) { return(MapToGuiMetadataEntity(producer)); }
public static GuiMetaDataModel MapToTransferer(MetadataEntityInformationUnit transferrer) { return(MapToGuiMetadataEntity(transferrer)); }
private static bool HasEntity(MetadataEntityInformationUnit entityInformationUnit) { return(!string.IsNullOrEmpty(entityInformationUnit.Entity)); }
public static GuiMetaDataModel MapToCreator(MetadataEntityInformationUnit creator) { return(MapToGuiMetadataEntity(creator)); }