-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from symptum/dev
Editor v0.0.2
- Loading branch information
Showing
87 changed files
with
4,077 additions
and
1,806 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Symptum Community | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Collections.ObjectModel; | ||
using Symptum.Core.Management.Resources; | ||
|
||
namespace Symptum.Core.Helpers; | ||
|
||
public static class ObservableCollectionHelper | ||
{ | ||
private static Dictionary<NavigableResource, ObservableCollection<IResource>> collections = []; | ||
|
||
public static void ObserveCollection(this NavigableResource navigableResource, ObservableCollection<IResource> collection) | ||
{ | ||
if (collection == null) return; | ||
collection.CollectionChanged += Collection_CollectionChanged; | ||
collections[navigableResource] = collection; | ||
} | ||
|
||
private static void Collection_CollectionChanged(object? sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace Symptum.Core.Helpers | ||
namespace Symptum.Core.Helpers; | ||
|
||
public class ParserHelper | ||
{ | ||
public class ParserHelper | ||
{ | ||
public static readonly string QuestionIdDelimiter = "_"; | ||
public static readonly string QuestionIdDelimiter = "_"; | ||
|
||
public static readonly string ListDelimiter = ";"; | ||
public static readonly string ListDelimiter = ";"; | ||
|
||
public static readonly string BookLocationDelimiter = "#"; | ||
} | ||
} | ||
public static readonly string BookReferenceDelimiter = "#"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Symptum.Core; | ||
|
||
// Will be used for classes which function as Identifiers. Eg: Question Entries, Reference Values | ||
// Will be helpful for navigation, bookmarking, etc. | ||
public interface IUniqueId | ||
{ | ||
static abstract IUniqueId? Parse(string? idText); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
namespace Symptum.Core.Management.Deployment | ||
using Symptum.Core.Management.Resources; | ||
|
||
namespace Symptum.Core.Management.Deployment; | ||
|
||
public interface IPackage | ||
{ | ||
public interface IPackage | ||
{ | ||
public string Name { get; set; } | ||
string Title { get; set; } | ||
|
||
string Description { get; set; } | ||
|
||
public string Description { get; set; } | ||
Version Version { get; set; } | ||
|
||
public Version Version { get; set; } | ||
IList<AuthorInfo>? Authors { get; set; } | ||
|
||
public string Authors { get; set; } | ||
IList<IResource>? Contents { get; set; } | ||
|
||
public object Content { get; set; } | ||
IList<IResource>? Dependencies { get; set; } | ||
|
||
public string Dependencies { get; set; } | ||
IList<string>? DependencyIds { get; set; } | ||
|
||
public IList<string> Tags { get; set; } | ||
} | ||
} | ||
IList<string>? Tags { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Symptum.Core.Management.Navigation; | ||
|
||
public interface INavigable | ||
{ | ||
//Uri Uri { get; set; } | ||
|
||
//bool IsNavigationHandled { get; set; } | ||
|
||
//Type PageType { get; set; } | ||
|
||
//NavigationType NavigationType { get; set; } | ||
} |
This file was deleted.
Oops, something went wrong.
11 changes: 5 additions & 6 deletions
11
src/Symptum.Core/Management/Navigation/NavigationManager.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
namespace Symptum.Core.Management.Navigation | ||
namespace Symptum.Core.Management.Navigation; | ||
|
||
public class NavigationManager | ||
{ | ||
public class NavigationManager | ||
{ | ||
public NavigationManager() | ||
{ } | ||
} | ||
public NavigationManager() | ||
{ } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace Symptum.Core.Management.Navigation | ||
namespace Symptum.Core.Management.Navigation; | ||
|
||
public enum NavigationType | ||
{ | ||
public enum NavigationType | ||
{ | ||
MarkdownContent, | ||
ListOfContents, | ||
QuestionBank, | ||
TopLevel, | ||
SubLevel | ||
} | ||
TopLevel, | ||
SubLevel, | ||
QuestionBank, | ||
ListOfContents, | ||
MarkdownContent | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Symptum.Core.Management.Resources; | ||
|
||
public struct AuthorInfo | ||
{ | ||
string Name { get; set; } | ||
|
||
string Email { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Symptum.Core.Management.Resources; | ||
|
||
public enum ContentFileType | ||
{ | ||
Markdown, | ||
Csv, | ||
Image | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Symptum.Core.Management.Resources; | ||
|
||
public interface IContent | ||
{ | ||
public string Title { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
public string Authors { get; set; } | ||
|
||
public ContentFileType ContentFileType { get; set; } | ||
|
||
public DateOnly DateModified { get; set; } | ||
|
||
public IList<string> References { get; set; } | ||
|
||
public IList<string> Tags { get; set; } | ||
|
||
public IList<string> SeeAlso { get; set; } | ||
|
||
public string Dependencies { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace Symptum.Core.Management.Resources; | ||
|
||
public interface IResource | ||
{ | ||
// Will be used mostly for navigation, will be overlapping with Id in most cases but Id will be different in case of cross linking and embedding | ||
// Eg: Micro/Pedia/CM.ImmunizationSchedule will be different Ids but Uri will be same : mi/sm/notes/immunology/immunizationschedule | ||
Uri Uri { get; set; } // symptum://subjects/an/sm/notes/abdomen/liver; symptum://subjects/an/qbank/1/abdomen#S_AN_12.3.4 | ||
|
||
// Will be used for dependency & resource file resolution and naming of packages | ||
string Id { get; set; } // AUTOGEN: {Parent.Id}.{Title} -> Subjects.Anatomy.StudyMaterials.Notes.Abdomen.Liver | ||
|
||
string Title { get; set; } // Liver | ||
|
||
IResource? ParentResource { get; } // Id: Subjects.Anatomy.StudyMaterials.Notes.Abdomen | ||
|
||
IList<IResource>? ChildrenResources { get; } // null if end resource | ||
|
||
IList<IResource>? Dependencies { get; set; } | ||
|
||
IList<string>? DependencyIds { get; set; } | ||
|
||
void InitializeResource(IResource? parent); | ||
|
||
bool CanHandleChildResourceType(Type childResourceType); | ||
|
||
bool CanAddChildResourceType(Type childResourceType); | ||
|
||
void AddChildResource(IResource childResource); | ||
|
||
void RemoveChildResource(IResource childResource); | ||
|
||
//IResource GetIResourceFromRelativeUri(Uri relativeUri); | ||
|
||
//IResource GetIResourceFromRelativeId(string relativeId); | ||
} |
Oops, something went wrong.