Skip to content

Commit

Permalink
added working code
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Apr 5, 2013
1 parent f46b626 commit fc5b93c
Show file tree
Hide file tree
Showing 47 changed files with 25,434 additions and 0 deletions.
Binary file added 3rdParty/ICSharpCode.SharpZipLib.dll
Binary file not shown.
Binary file added 3rdParty/SBWCSharp.dll
Binary file not shown.
32 changes: 32 additions & 0 deletions CombineArchive.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibCombine", "LibCombine\LibCombine.csproj", "{FA52A855-38B5-4110-9C69-D62FC7D9EF7B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CombineCLI", "CombineCLI\CombineCLI.csproj", "{1CA41C80-EE9C-4C32-B7F0-621801257429}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsCombineArchive", "FormsCombineArchive\FormsCombineArchive.csproj", "{A2D55519-57E2-497A-912F-3D857823E4B9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FA52A855-38B5-4110-9C69-D62FC7D9EF7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA52A855-38B5-4110-9C69-D62FC7D9EF7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA52A855-38B5-4110-9C69-D62FC7D9EF7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA52A855-38B5-4110-9C69-D62FC7D9EF7B}.Release|Any CPU.Build.0 = Release|Any CPU
{1CA41C80-EE9C-4C32-B7F0-621801257429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1CA41C80-EE9C-4C32-B7F0-621801257429}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CA41C80-EE9C-4C32-B7F0-621801257429}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1CA41C80-EE9C-4C32-B7F0-621801257429}.Release|Any CPU.Build.0 = Release|Any CPU
{A2D55519-57E2-497A-912F-3D857823E4B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2D55519-57E2-497A-912F-3D857823E4B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2D55519-57E2-497A-912F-3D857823E4B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2D55519-57E2-497A-912F-3D857823E4B9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions CombineCLI/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
64 changes: 64 additions & 0 deletions CombineCLI/CombineCLI.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1CA41C80-EE9C-4C32-B7F0-621801257429}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CombineCLI</RootNamespace>
<AssemblyName>CombineCLI</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LibCombine\LibCombine.csproj">
<Project>{fa52a855-38b5-4110-9c69-d62fc7d9ef7b}</Project>
<Name>LibCombine</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Empty file added CombineCLI/ListDescendant.cs
Empty file.
Empty file added CombineCLI/ListDescendant1.cs
Empty file.
66 changes: 66 additions & 0 deletions CombineCLI/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LibCombine;

namespace CombineCLI
{
class Program
{
static void Main(string[] args)
{

var archive =
CombineArchive.FromFile(@"C:\Users\fbergmann\Desktop\isola_oscillations_sed.sed.omex");

Console.WriteLine("Num SEDML files: {0}", archive.GetNumFilesWithFormat("SEDML"));
Console.WriteLine("Num SBML files: {0}", archive.GetNumFilesWithFormat("sbml"));
Console.WriteLine("Num SBML files: {0}", archive.GetNumFilesWithFormat("sbml"));

archive.SaveTo(@"C:\Users\fbergmann\Desktop\isola.omex");


var newArchive = new CombineArchive
{
BaseDir = @"C:\Users\fbergmann\Documents\SBML Models\",
Descriptions = new List<OmexDescription> {
new OmexDescription
{
About = "./BorisEJB.xml",
Description = "original JDesigner model for Kholodenko2000 - MAPK feedback",
Creators =
new List<VCard>
{
new VCard
{
FamilyName = "Bergmann",
GivenName = "Frank",
Email = "[email protected]",
Organization = "California Institute of Technology"
}
},
Created = DateTime.Parse("2013-04-04 16:00+1")
}
},
Entries = new List<Entry> {
new Entry { Location = "./BorisEJB.xml", Format = Entry.KnownFormats["sbml"] },
new Entry { Location = "./paper/Kholodenko2000.pdf", Format = Entry.KnownFormats["pdf"] },
new Entry { Location = "http://www.ebi.ac.uk/biomodels-main/BIOMD0000000010", Format = Entry.KnownFormats["sbml"] },
}
};

newArchive.SaveTo(@"C:\Users\fbergmann\Desktop\Boris.omex");

var omex = CombineArchive.FromFile(@"C:\Users\fbergmann\Desktop\Boris.omex");

if (omex.HasEntriesWithFormat("pdf"))
omex.GetEntriesWithFormat("PDF").First().OpenLocation();


Console.ReadKey();
}
}
}

36 changes: 36 additions & 0 deletions CombineCLI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CombineCLI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CombineCLI")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3b02161b-f2ef-4781-8775-8f83d6f29c9d")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
177 changes: 177 additions & 0 deletions FormsCombineArchive/AboutBox.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fc5b93c

Please sign in to comment.