protected CatalogSubject(SystemUri Uri, INodeCatalogSubject Parent = null) : this(new SystemResourceScheme(Uri.Scheme), Uri.Host, Uri.Path, Parent) { }
protected CatalogSubject(SystemResourceScheme Scheme, string host, string Name, INodeCatalogSubject Parent = null) { this.Parent = Parent; this.Scheme = Scheme; this.IsRoot = Parent == null; this.SymbolicHost = host; this.Name = IsRoot ? $"/{host}/{Name}" : Name; this.Lineage = DeriveLineage().ToList(); this.RelativeLocation = IsRoot ? this.Name : DeriveRelativeLocation(); this.Urn = DeriveUrn(); this.LineageSegments = Urn.NonSchemeComponents.Zip(RelativeLocation.Split('/'), (x, y) => (x, y)).ToList(); this.Segment = (Urn.ToString(), RelativeLocation.ToString()); }