本文整理汇总了C#中SobekCM.Core.BriefItem.BriefItemInfo类的典型用法代码示例。如果您正苦于以下问题:C# BriefItemInfo类的具体用法?C# BriefItemInfo怎么用?C# BriefItemInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BriefItemInfo类属于SobekCM.Core.BriefItem命名空间,在下文中一共展示了BriefItemInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// Add the IDENTIFIERS
if (Original.Bib_Info.Identifiers_Count > 0)
{
foreach (Identifier_Info thisIdentifier in Original.Bib_Info.Identifiers)
{
// Add this identifier
if (!String.IsNullOrWhiteSpace(thisIdentifier.Type))
{
New.Add_Description("Resource Identifier", thisIdentifier.Identifier).Authority = thisIdentifier.Type;
// Special code for accession number
if (thisIdentifier.Type.IndexOf("ACCESSION", StringComparison.OrdinalIgnoreCase) >= 0)
New.Add_Description("Accession Number", thisIdentifier.Identifier).Authority = thisIdentifier.Type;
}
else
{
New.Add_Description("Resource Identifier", thisIdentifier.Identifier);
}
}
}
return true;
}
示例2: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// Add each language
if (Original.Bib_Info.Languages_Count > 0)
{
foreach (Language_Info thisLanguage in Original.Bib_Info.Languages)
{
if (!String.IsNullOrWhiteSpace(thisLanguage.Language_Text))
{
string language_text = thisLanguage.Language_Text;
string from_possible_code = thisLanguage.Get_Language_By_Code(language_text);
if (from_possible_code.Length > 0)
language_text = from_possible_code;
New.Add_Description("Language", language_text);
}
else
{
if (!String.IsNullOrWhiteSpace(thisLanguage.Language_ISO_Code))
{
string language_text = thisLanguage.Get_Language_By_Code(thisLanguage.Language_ISO_Code);
if (language_text.Length > 0)
{
New.Add_Description("Language", language_text);
}
}
}
}
}
return true;
}
示例3: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// Add the SOURCE INSTITUTION information
if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Source.Statement))
{
// Add the source institution
BriefItem_DescTermValue sourceValue = New.Add_Description("Source Institution", Original.Bib_Info.Source.Statement);
// Was the code present, and active?
if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Source.Code))
{
if ((Engine_ApplicationCache_Gateway.Codes != null) && (Engine_ApplicationCache_Gateway.Codes.isValidCode("i" + Original.Bib_Info.Source.Code)))
{
Item_Aggregation_Related_Aggregations sourceAggr = Engine_ApplicationCache_Gateway.Codes["i" + Original.Bib_Info.Source.Code];
if (sourceAggr.Active)
{
sourceValue.Add_URI("[%BASEURL%]" + "i" + Original.Bib_Info.Source.Code + "[%URLOPTS%]");
}
// Was there an external link on this agggreation?
if (!String.IsNullOrWhiteSpace(sourceAggr.External_Link))
{
sourceValue.Add_URI(sourceAggr.External_Link);
}
}
}
}
return true;
}
示例4: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// Add all the origination information, primarily dates )
if (Original.Bib_Info.Origin_Info != null)
{
// Add the creation date
if ((!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.Date_Created)) && (Original.Bib_Info.Origin_Info.Date_Created.Trim() != "-1"))
{
New.Add_Description("Creation Date", Original.Bib_Info.Origin_Info.Date_Created);
}
// Add the publication date, looking under DATE ISSUED, or under MARC DATE ISSUED
if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.Date_Issued))
{
if (Original.Bib_Info.Origin_Info.Date_Issued.Trim() != "-1")
{
New.Add_Description("Publication Date", Original.Bib_Info.Origin_Info.Date_Issued);
}
}
else if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.MARC_DateIssued))
{
New.Add_Description("Publication Date", Original.Bib_Info.Origin_Info.MARC_DateIssued);
}
// Add the copyright date
if ((!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.Date_Copyrighted)) && (Original.Bib_Info.Origin_Info.Date_Copyrighted.Trim() != "-1"))
{
New.Add_Description("Copyright Date", Original.Bib_Info.Origin_Info.Date_Copyrighted);
}
}
return true;
}
示例5: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// If the original item was DARK, don't add any file information
if (Original.Behaviors.Dark_Flag) return true;
// Step through each of the nodes within the images first
List<BriefItem_FileGrouping> images = new List<BriefItem_FileGrouping>();
List<BriefItem_FileGrouping> downloads = new List<BriefItem_FileGrouping>();
List<BriefItem_TocElement> images_toc = new List<BriefItem_TocElement>();
List<BriefItem_TocElement> downloads_toc = new List<BriefItem_TocElement>();
// Do the images (i.e., physical tree) first
collect_nodes(Original.Divisions.Physical_Tree, images, images_toc);
// If there were groupings and TOCs assigned, add them
if (images.Count > 0)
New.Images = images;
if (images_toc.Count > 0)
New.Images_TOC = images_toc;
// Collect the downloads next
collect_nodes(Original.Divisions.Download_Tree, downloads, downloads_toc);
// If there were groupings and TOCs assigned, add them
if (downloads.Count > 0)
New.Downloads = downloads;
if (downloads_toc.Count > 0)
New.Downloads_TOC = downloads_toc;
// No exception
return true;
}
示例6: TEI_ItemViewer
/// <summary> Constructor for a new instance of the TEI_ItemViewer class, used to display a
/// TEI file for a given digital resource </summary>
/// <param name="BriefItem"> Digital resource object </param>
/// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
/// <param name="CurrentRequest"> Information about the current request </param>
public TEI_ItemViewer(BriefItemInfo BriefItem, User_Object CurrentUser, Navigation_Object CurrentRequest)
{
// Save the arguments for use later
this.BriefItem = BriefItem;
this.CurrentUser = CurrentUser;
this.CurrentRequest = CurrentRequest;
// Set the behavior properties to the empy behaviors ( in the base class )
Behaviors = EmptyBehaviors;
// Get the TEI files to use
tei_file = BriefItem.Behaviors.Get_Setting("TEI.Source_File");
xslt_file = BriefItem.Behaviors.Get_Setting("TEI.XSLT");
css_file = BriefItem.Behaviors.Get_Setting("TEI.CSS");
// Ensure the XSLT file really exists
if (!File.Exists(xslt_file))
{
// This may just not have the path on it
if ((xslt_file.IndexOf("/") < 0) && (xslt_file.IndexOf("\\") < 0))
{
xslt_file = Path.Combine(UI_ApplicationCache_Gateway.Settings.Servers.Application_Server_Network, "plugins\\tei\\xslt", xslt_file);
}
}
string tei_file_network = SobekFileSystem.Resource_Network_Uri(BriefItem, tei_file);
XSLT_Transformer_ReturnArgs returnArgs = XSLT_Transformer.Transform(tei_file_network, xslt_file);
tei_string_to_display = String.Empty;
if (returnArgs.Successful)
{
tei_string_to_display = returnArgs.TransformedString;
// FInd the head information
int head_start = tei_string_to_display.IndexOf("<head", StringComparison.OrdinalIgnoreCase);
int head_end = tei_string_to_display.IndexOf("</head>", StringComparison.OrdinalIgnoreCase);
if ((head_start > 0) && (head_end > 0))
{
head_info = tei_string_to_display.Substring(head_start, head_end - head_start);
int end_bracket = head_info.IndexOf(">");
head_info = head_info.Substring(end_bracket + 1);
}
// Trim down to the body
int body_start = tei_string_to_display.IndexOf("<body", StringComparison.OrdinalIgnoreCase);
int body_end = tei_string_to_display.IndexOf("</body>", StringComparison.OrdinalIgnoreCase);
if ((body_start > 0) && (body_end > 0))
{
tei_string_to_display = tei_string_to_display.Substring(body_start, body_end - body_start);
int end_bracket = tei_string_to_display.IndexOf(">");
tei_string_to_display = tei_string_to_display.Substring(end_bracket + 1);
}
}
else
{
tei_string_to_display = "Error during XSLT transform of TEI<br /><br />" + returnArgs.ErrorMessage;
}
}
示例7: GetFiles
/// <summary> Gets the list of all the files associated with this digital resource </summary>
/// <param name="DigitalResource"> The digital resource object </param>
/// <returns> List of the file information for this digital resource, or NULL if this does not exist somehow </returns>
public List<SobekFileSystem_FileInfo> GetFiles(BriefItemInfo DigitalResource)
{
string directory = Resource_Network_Uri(DigitalResource);
try
{
if (Directory.Exists(directory))
{
FileInfo[] files = (new DirectoryInfo(directory)).GetFiles();
List<SobekFileSystem_FileInfo> returnValue = new List<SobekFileSystem_FileInfo>();
foreach (FileInfo thisFile in files)
{
SobekFileSystem_FileInfo returnFile = new SobekFileSystem_FileInfo
{
Name = thisFile.Name,
LastWriteTime = thisFile.LastWriteTime,
Extension = thisFile.Extension,
Length = thisFile.Length
};
returnValue.Add(returnFile);
}
return returnValue;
}
}
catch (Exception ee)
{
return null;
}
return null;
}
示例8: Create
/// <summary> Create the BriefItemInfo from a full METS-based SobekCM_Item object,
/// using the default mapping set </summary>
/// <param name="Original"> Original METS-based object to use </param>
/// <param name="MappingSetId"> Name of the mapping set to use (if there are more than one)</param>
/// <param name="Tracer"> Custom tracer to record general process flow </param>
/// <returns> Completely built BriefItemInfo object from the METS-based SobekCM_Item object </returns>
public static BriefItemInfo Create(SobekCM_Item Original, string MappingSetId, Custom_Tracer Tracer )
{
// Try to get the brief mapping set
List<IBriefItemMapper> mappingSet = get_mapping_set(MappingSetId);
// Create the mostly empty new brief item
Tracer.Add_Trace("BriefItem_Factory.Create", "Create the mostly empty new brief item");
BriefItemInfo newItem = new BriefItemInfo
{
BibID = Original.BibID,
VID = Original.VID,
Title = Original.Bib_Info.Main_Title.Title
};
// Build the new item using the selected mapping set
Tracer.Add_Trace("BriefItem_Factory.Create", "Use the set of mappers to map data to the brief item");
foreach (IBriefItemMapper thisMapper in mappingSet)
{
Tracer.Add_Trace("BriefItem_Factory.Create", "...." + thisMapper.GetType().ToString().Replace("SobekCM.Engine_Library.Items.BriefItems.Mappers.",""));
thisMapper.MapToBriefItem(Original, newItem);
}
Tracer.Add_Trace("BriefItem_Factory.Create", "Finished using all instatiated and configued mappers");
return newItem;
}
示例9: Text_Search_ItemViewer
/// <summary> Constructor for a new instance of the Text_Search_ItemViewer class, which allows the full text of an
/// individual resource to be searched and individual matching pages are displayed with page thumbnails </summary>
/// <param name="BriefItem"> Digital resource object </param>
/// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
/// <param name="CurrentRequest"> Information about the current request </param>
/// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
public Text_Search_ItemViewer(BriefItemInfo BriefItem, User_Object CurrentUser, Navigation_Object CurrentRequest, Custom_Tracer Tracer )
{
Tracer.Add_Trace("Text_Search_ItemViewer.Constructor");
// Save the arguments for use later
this.BriefItem = BriefItem;
this.CurrentUser = CurrentUser;
this.CurrentRequest = CurrentRequest;
// Set the behavior properties to the empy behaviors ( in the base class )
Behaviors = EmptyBehaviors;
if (!String.IsNullOrWhiteSpace(CurrentRequest.Text_Search))
{
List<string> terms = new List<string>();
List<string> web_fields = new List<string>();
// Split the terms correctly
SobekCM_Assistant.Split_Clean_Search_Terms_Fields(CurrentRequest.Text_Search, "ZZ", Search_Type_Enum.Basic, terms, web_fields, null, Search_Precision_Type_Enum.Contains, '|');
Tracer.Add_Trace("Text_Search_ItemViewer.Constructor", "Performing Solr/Lucene search");
int page = CurrentRequest.SubPage.HasValue ? Math.Max(CurrentRequest.SubPage.Value, ((ushort)1)) : 1;
results = Solr_Page_Results.Search(BriefItem.BibID, BriefItem.VID, terms, 20, page, false);
Tracer.Add_Trace("Text_Search_ItemViewer.Constructor", "Completed Solr/Lucene search in " + results.QueryTime + "ms");
}
}
示例10: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// Add the aggregations
if ((Original.Behaviors.Aggregation_Count > 0) && (Engine_ApplicationCache_Gateway.Codes != null))
{
foreach (Aggregation_Info thisAggr in Original.Behaviors.Aggregations)
{
// Look for the aggregation in the current aggregation codes
Item_Aggregation_Related_Aggregations aggrObj = Engine_ApplicationCache_Gateway.Codes[thisAggr.Code];
// If the aggregation is NULL, as it may have been deleted, skip it
if (aggrObj == null) continue;
// If active, add with the URL, otherwise just add the short name
if (aggrObj.Active)
{
New.Add_Description("Aggregations", aggrObj.ShortName).Add_URI("[%BASEURL%]" + aggrObj.Code + "[%URLOPTS%]");
}
else
{
New.Add_Description("Aggregations", aggrObj.ShortName);
}
}
}
return true;
}
示例11: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// Add the publisher, and place of publications
if (Original.Bib_Info.Publishers_Count > 0)
{
// Keep track of place of publications alreadyadded
Dictionary<string, string> pub_places = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
// Step through each publisher
foreach (Publisher_Info thisPublisher in Original.Bib_Info.Publishers)
{
// Add the name
New.Add_Description("Publisher", thisPublisher.Name);
// Add the places of publication
foreach (Origin_Info_Place thisPubPlace in thisPublisher.Places)
{
if (!pub_places.ContainsKey(thisPubPlace.Place_Text))
{
New.Add_Description("Place of Publication", thisPubPlace.Place_Text);
pub_places.Add(thisPubPlace.Place_Text, thisPubPlace.Place_Text);
}
}
}
}
return true;
}
示例12: JPEG_ItemViewer
/// <summary> Constructor for a new instance of the JPEG_ItemViewer class, used to display JPEGs linked to
/// pages in a digital resource </summary>
/// <param name="BriefItem"> Digital resource object </param>
/// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
/// <param name="CurrentRequest"> Information about the current request </param>
/// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
/// <param name="JPEG_ViewerCode"> JPEG viewer code, as determined by configuration files </param>
/// <param name="FileExtensions"> File extensions that this viewer allows, as determined by configuration files </param>
public JPEG_ItemViewer(BriefItemInfo BriefItem, User_Object CurrentUser, Navigation_Object CurrentRequest, Custom_Tracer Tracer, string JPEG_ViewerCode, string[] FileExtensions)
{
// Add the trace
if ( Tracer != null )
Tracer.Add_Trace("JPEG_ItemViewer.Constructor");
// Save the arguments for use later
this.BriefItem = BriefItem;
this.CurrentUser = CurrentUser;
this.CurrentRequest = CurrentRequest;
// Set the behavior properties
Behaviors = EmptyBehaviors;
// Is the JPEG2000 viewer included in this item?
bool zoomableViewerIncluded = BriefItem.UI.Includes_Viewer_Type("JPEG2000");
string[] jpeg2000_extensions = null;
if (zoomableViewerIncluded)
{
iItemViewerPrototyper jp2Prototyper = ItemViewer_Factory.Get_Viewer_By_ViewType("JPEG2000");
if (jp2Prototyper == null)
zoomableViewerIncluded = false;
else
{
zoomableViewerCode = jp2Prototyper.ViewerCode;
jpeg2000_extensions = jp2Prototyper.FileExtensions;
}
}
// Set some default values
width = 500;
height = -1;
includeLinkToZoomable = false;
// Determine the page
page = 1;
if (!String.IsNullOrEmpty(CurrentRequest.ViewerCode))
{
int tempPageParse;
if (Int32.TryParse(CurrentRequest.ViewerCode.Replace(JPEG_ViewerCode.Replace("#",""), ""), out tempPageParse))
page = tempPageParse;
}
// Just a quick range check
if (page > BriefItem.Images.Count)
page = 1;
// Try to set the file information here
if ((!set_file_information(FileExtensions, zoomableViewerIncluded, jpeg2000_extensions)) && (page != 1))
{
// If there was an error, just set to the first page
page = 1;
set_file_information(FileExtensions, zoomableViewerIncluded, jpeg2000_extensions);
}
// Since this is a paging viewer, set the viewer code
if (String.IsNullOrEmpty(CurrentRequest.ViewerCode))
CurrentRequest.ViewerCode = JPEG_ViewerCode.Replace("#", page.ToString());
}
示例13: MapToBriefItem
/// <summary> Map one or more data elements from the original METS-based object to the
/// BriefItem object </summary>
/// <param name="Original"> Original METS-based object </param>
/// <param name="New"> New object to populate some data from the original </param>
/// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
{
// Try to get the VRA Core metadata
VRACore_Info vraInfo = Original.Get_Metadata_Module(GlobalVar.VRACORE_METADATA_MODULE_KEY) as VRACore_Info;
// Add the learning object metadata if it exists
if ((vraInfo != null) && (vraInfo.hasData))
{
// Collect the state/edition information
if (vraInfo.State_Edition_Count > 0)
{
New.Add_Description("State / Edition", vraInfo.State_Editions);
}
// Collect and display all the material information
if (vraInfo.Material_Count > 0)
{
foreach (VRACore_Materials_Info materials in vraInfo.Materials)
{
New.Add_Description("Materials", materials.Materials);
}
}
// Collect and display all the measurements information
if (vraInfo.Measurement_Count > 0)
{
foreach (VRACore_Measurement_Info measurement in vraInfo.Measurements)
{
New.Add_Description("Measurements", measurement.Measurements);
}
}
// Display all cultural context information
if (vraInfo.Cultural_Context_Count > 0)
{
New.Add_Description("Cultural Context", vraInfo.Cultural_Contexts );
}
// Display all style/period information
if (vraInfo.Style_Period_Count > 0)
{
New.Add_Description("Style/Period", vraInfo.Style_Periods);
}
// Display all technique information
if (vraInfo.Technique_Count > 0)
{
New.Add_Description("Technique", vraInfo.Techniques);
}
// Add the inscriptions
if (vraInfo.Inscription_Count > 0)
{
New.Add_Description("Inscription", vraInfo.Inscriptions);
}
}
return true;
}
示例14: Send_Email
/// <summary> Creates and sends the email when a user 'shares' a single digital resource </summary>
/// <param name="Recepient_List"> Recepient list for this email </param>
/// <param name="CcList"> CC list for this email </param>
/// <param name="Comments"> Sender's comments to be included in the email </param>
/// <param name="User_Name"> Name of the user that sent this email </param>
/// <param name="SobekCM_Instance_Name"> Name of the current SobekCM instance (i.e., UDC, dLOC, etc..)</param>
/// <param name="Item"> Digital resource to email </param>
/// <param name="HTML_Format"> Tells if this should be sent as HMTL, otherwise it will be plain text </param>
/// <param name="URL"> Direct URL for this item </param>
/// <param name="UserID"> Primary key for the user that is sendig the email </param>
/// <returns> TRUE if successful, otherwise FALSE </returns>
public static bool Send_Email( string Recepient_List, string CcList, string Comments, string User_Name, string SobekCM_Instance_Name, BriefItemInfo Item, bool HTML_Format, string URL, int UserID )
{
if (HTML_Format)
{
return HTML_Send_Email(Recepient_List, CcList, Comments, User_Name, SobekCM_Instance_Name, Item, URL, UserID) || Text_Send_Email(Recepient_List, CcList, Comments, User_Name, SobekCM_Instance_Name, Item, URL, UserID);
}
return Text_Send_Email(Recepient_List, CcList, Comments, User_Name, SobekCM_Instance_Name, Item, URL, UserID);
}
示例15: Google_Coordinate_Entry_ItemViewer
/// <summary> Constructor for a new instance of the Google_Coordinate_Entry_ItemViewer class, used to edit the
/// coordinate information associated with this digital resource within an online google maps interface </summary>
/// <param name="BriefItem"> Digital resource object </param>
/// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
/// <param name="CurrentRequest"> Information about the current request </param>
/// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
public Google_Coordinate_Entry_ItemViewer(BriefItemInfo BriefItem, User_Object CurrentUser, Navigation_Object CurrentRequest, Custom_Tracer Tracer )
{
// Save the arguments for use later
this.BriefItem = BriefItem;
this.CurrentUser = CurrentUser;
this.CurrentRequest = CurrentRequest;
try
{
// Get the full SobekCM item
Tracer.Add_Trace("Google_Coordinate_Entry_ItemViewer.Constructor", "Try to pull this sobek complete item");
currentItem = SobekEngineClient.Items.Get_Sobek_Item(CurrentRequest.BibID, CurrentRequest.VID, Tracer);
if (currentItem == null)
{
Tracer.Add_Trace("Google_Coordinate_Entry_ItemViewer.Constructor", "Unable to build complete item");
CurrentRequest.Mode = Display_Mode_Enum.Error;
CurrentRequest.Error_Message = "Invalid Request : Unable to build complete item";
return;
}
//string resource_directory = UI_ApplicationCache_Gateway.Settings.Servers.Image_Server_Network + CurrentItem.Web.AssocFilePath;
//string current_mets = resource_directory + CurrentItem.METS_Header.ObjectID + ".mets.xml";
// If there is no user, send to the login
if (CurrentUser == null)
{
CurrentRequest.Mode = Display_Mode_Enum.My_Sobek;
CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Logon;
CurrentRequest.Return_URL = BriefItem.BibID + "/" + BriefItem.VID + "/mapedit";
UrlWriterHelper.Redirect(CurrentRequest);
return;
}
//holds actions from page
string action = HttpContext.Current.Request.Form["action"] ?? String.Empty;
string payload = HttpContext.Current.Request.Form["payload"] ?? String.Empty;
// See if there were hidden requests
if (!String.IsNullOrEmpty(action))
{
if (action == "save")
SaveContent(payload);
}
////create a backup of the mets
//string backup_directory = UI_ApplicationCache_Gateway.Settings.Servers.Image_Server_Network + Current_Item.Web.AssocFilePath + UI_ApplicationCache_Gateway.Settings.Resources.Backup_Files_Folder_Name;
//string backup_mets_name = backup_directory + "\\" + CurrentItem.METS_Header.ObjectID + "_" + DateTime.Now.Year + "_" + DateTime.Now.Month + "_" + DateTime.Now.Day + ".mets.bak";
//File.Copy(current_mets, backup_mets_name);
}
catch (Exception ee)
{
//Custom_Tracer.Add_Trace("MapEdit Start Failure");
throw new ApplicationException("MapEdit Start Failure\r\n" + ee.Message);
}
}