/// <summary>
        /// Static Constructor.
        /// </summary>
        static VisualRepresentation()
        {
            __ClassDefinitor = new ModelClassDefinitor <VisualRepresentation>("VisualRepresentation", UniqueElement.__ClassDefinitor, "Visual Representation",
                                                                              "Groups Visual Elements to conform the exposed representation of an Idea.");
            __ClassDefinitor.DeclareProperty(__DisplayingView);
            __ClassDefinitor.DeclareProperty(__IsShortcut);
            //- __ClassDefinitor.DeclareProperty(__SynonymIndex);
            __ClassDefinitor.DeclareProperty(__AreRelatedTargetsShown);
            __ClassDefinitor.DeclareProperty(__AreRelatedOriginsShown);

            __ClassDefinitor.DeclareCollection(__VisualParts);
            __ClassDefinitor.DeclareCollection(__CustomFormatValues);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Static Constructor.
        /// </summary>
        static VisualConnectorsFormat()
        {
            __ClassDefinitor = new ModelClassDefinitor <VisualConnectorsFormat>("VisualConnectorsFormat", VisualElementFormat.__ClassDefinitor, "Visual Connectors Format",
                                                                                "Specifies format for connectors of a represented Relationship, considering its plugs and decorators.");
            __ClassDefinitor.DeclareCollection(__HeadPlugs);
            __ClassDefinitor.DeclareCollection(__TailPlugs);

            __ClassDefinitor.DeclareProperty(__PathStyle);
            __ClassDefinitor.DeclareProperty(__PathCorner);

            __ClassDefinitor.DeclareProperty(__LabelLinkVariant);
            __ClassDefinitor.DeclareProperty(__LabelLinkDefinitor);
            __ClassDefinitor.DeclareProperty(__LabelLinkDescriptor);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Static Constructor.
 /// </summary>
 static Table()
 {
     __ClassDefinitor = new ModelClassDefinitor <Table>("Table", ContainedDetail.__ClassDefinitor, "Table",
                                                        "Stores structured information, containing one or multiple data records of the same type.");
     __ClassDefinitor.DeclareProperty(__AssignedDesignator);
     __ClassDefinitor.DeclareCollection(__Records);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Static Constructor.
 /// </summary>
 static Relationship()
 {
     __ClassDefinitor = new ModelClassDefinitor <Relationship>("Relationship", Idea.__ClassDefinitor, "Relationship",
                                                               "Association between multiple ideas, connected using link-roles, forming a nexus.");
     __ClassDefinitor.DeclareProperty(__RelationshipDefinitor);
     __ClassDefinitor.DeclareCollection(__Links);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Static Constructor.
 /// </summary>
 static TableRecord()
 {
     __ClassDefinitor = new ModelClassDefinitor <TableRecord>("TableRecord", null, "Table Record",
                                                              "Groups variable data items that conforms a data entity, composing a Table with others of the same kind.");
     __ClassDefinitor.DeclareProperty(__OwnerTable);
     __ClassDefinitor.DeclareCollection(__Values);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Static Constructor.
        /// </summary>
        static LinkRoleDefinition()
        {
            __ClassDefinitor = new ModelClassDefinitor <LinkRoleDefinition>("LinkRoleDefinition", MetaDefinition.__ClassDefinitor, "Link Role Definition",
                                                                            "Represents the definition of a Role Link.");
            __ClassDefinitor.DeclareCollection(__AllowedVariants);
            __ClassDefinitor.DeclareCollection(__AssociableIdeaDefs);

            __ClassDefinitor.DeclareProperty(__OwnerRelationshipDef);
            __ClassDefinitor.DeclareProperty(__RoleType);
            __ClassDefinitor.DeclareProperty(__MaxConnections);
            __ClassDefinitor.DeclareProperty(__RelatedIdeasAreOrdered);

            __AllowedVariants.ItemsSourceGetter = ((ctx) =>
            {
                if (ctx == null || ctx.EditEngine == null)
                {
                    return(null);
                }

                return(((CompositionEngine)ctx.EditEngine).TargetComposition.CompositeContentDomain.LinkRoleVariants);
            });

            __AssociableIdeaDefs.CanCollectionBeEmpty = true;
            __AssociableIdeaDefs.EmptyCollectionTitle = "All Idea Definitions are linkable.";
            __AssociableIdeaDefs.ItemsSourceGetter    = ((ctx) =>
            {
                if (ctx == null || ctx.EditEngine == null)
                {
                    return(null);
                }

                return(((CompositionEngine)ctx.EditEngine).TargetComposition.CompositeContentDomain.Definitions);
            });

            LinkRoleTypes = Enum.GetValues(typeof(ERoleType));
            __RoleType.ItemsSourceGetter = ((ctx) => LinkRoleDefinition.LinkRoleTypes);

            /* Alternative.... Plus: A generic converter must be used in order to bind properly,
             * LinkRoleTypes = General.GetEnumMembers<ERoleType>().ToArray();
             * __RoleType.ItemsSourceGetter = ((ctx, editor) => LinkRoleDefinition.LinkRoleTypes);
             * __RoleType.ItemsSourceSelectedValuePath = "Item1";
             * __RoleType.ItemsSourceDisplayMemberPath = "Item2"; */
        }
        /// <summary>
        /// Static constructor
        /// </summary>
        static FileGenerationConfiguration()
        {
            __ClassDefinitor = new ModelClassDefinitor <FileGenerationConfiguration>("FileGenerationConfiguration", null, "File Generation Configuration",
                                                                                     "Stores file generation parameters.");

            __ClassDefinitor.DeclareProperty(__TargetDirectory);
            __ClassDefinitor.DeclareProperty(__Language);
            __ClassDefinitor.DeclareProperty(__CreateCompositionRootDirectory);
            __ClassDefinitor.DeclareProperty(__UseIdeaTechNameForFileNaming);
            __ClassDefinitor.DeclareProperty(__UseTechNamesAsProgramIdentifiers);
            __ClassDefinitor.DeclareProperty(__CompositeContentSubdirSuffix);
            // __ClassDefinitor.DeclareProperty(__GenerateFilesForConcepts);
            __ClassDefinitor.DeclareProperty(__GenerateFilesForRelationships);
            // __ClassDefinitor.DeclareProperty(__CreateCompositesSubdirs);

            __ClassDefinitor.DeclareCollection(__ExcludedIdeasGlobalIds);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Static Constructor.
        /// </summary>
        static TableDefinition()
        {
            __ClassDefinitor = new ModelClassDefinitor <TableDefinition>("TableDefinition", MetaDefinition.__ClassDefinitor, "Table-Structure Definition",
                                                                         "Defines a Table-Structure type.");
            __ClassDefinitor.DeclareProperty(__OwnerDomain);
            __ClassDefinitor.DeclareCollection(__Categories);
            __ClassDefinitor.DeclareCollection(__StorageStructureFieldDefs);
            __ClassDefinitor.DeclareCollection(__FieldDefinitions);
            __ClassDefinitor.DeclareCollection(__UniqueKeyFieldDefs);
            __ClassDefinitor.DeclareCollection(__LabelFieldDefs);
            __ClassDefinitor.DeclareCollection(__DominantRefFieldDefs);

            __UniqueKeyFieldDefs.HasPendingImplementation   = true;
            __DominantRefFieldDefs.HasPendingImplementation = true;
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Static Constructor.
        /// </summary>
        static Composition()
        {
            __ClassDefinitor = new ModelClassDefinitor <Composition>("Composition", Concept.__ClassDefinitor, "Composition",
                                                                     "Semantic, informational and visual set of ideas, expressing knowledge about a subject. " +
                                                                     "This document or book is conformed by the hierarchical nesting of containers (logical documents based on a Composite Concept), starting from a root.");
            __ClassDefinitor.DeclareCollection(__UsedDomains);
            __ClassDefinitor.DeclareCollection(__RegisteredIdeas);

            __ClassDefinitor.DeclareProperty(__CompositionDefinitor);
            __ClassDefinitor.DeclareProperty(__ActiveView);
            __ClassDefinitor.DeclareProperty(__ViewsPrefix);
            __ClassDefinitor.DeclareProperty(__CentralizedStoreBoxSharedReferences);

            // Register filters for code-generation
            DotLiquid.Template.RegisterFilter(typeof(Instrumind.ThinkComposer.Composer.Generation.TemplateFilters));

            // Register classes exposed to code-generation
            var ExposedTypes = new List <Tuple <Type, bool, string[], string[]> >();

            // ExposedTypes.Add(ExposeForTemplateBasedExtraction(typeof(Object)));
            // ExposedTypes.Add(ExposeForTemplateBasedExtraction(typeof(Type)));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(typeof(ModelDefinition)));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(typeof(ImageSource)));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(typeof(MOwnership), true));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(typeof(MAssignment), true));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(typeof(StoreBoxBase), true));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(UniqueElement.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(SimpleElement.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(FormalElement.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(SimplePresentationElement.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(FormalPresentationElement.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Domain.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Composition.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(VersionCard.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(MetaDefinition.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(IdeaDefinition.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(ConceptDefinition.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(RelationshipDefinition.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(LinkRoleDefinition.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Idea.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Concept.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Relationship.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(TableDefinition.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(FieldDefinition.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(DetailDesignator.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(AttachmentDetailDesignator.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(TableDetailDesignator.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(LinkDetailDesignator.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(ContainedDetail.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Attachment.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Link.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(InternalLink.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(ResourceLink.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(Table.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(TableRecord.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(VisualRepresentation.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(ConceptVisualRepresentation.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(RelationshipVisualRepresentation.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(VisualElement.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(VisualSymbol.__ClassDefinitor));
            ExposedTypes.Add(ExposeForTemplateBasedExtraction(VisualConnector.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(MarkerAssignment.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(RoleBasedLink.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(View.__ClassDefinitor));

            ExposedTypes.Add(ExposeForTemplateBasedExtraction(VisualComplement.__ClassDefinitor, false, "Content"));

            // For Documentation generation:
            //T PrintAllExposedApi(ExposedTypes);

            /* IMPORTANT: THE EXPOSED CLASSES AND MEMEBERS MUST SUPPORT THE NEXT TEMPLATE...
             *  ====
             *  Class template for {{Name}}
             *
             *  {% for Detail in Details  %}
             *
             *  Detail: {{Detail}}
             *  Detail-Designation: {{Detail.Designation}}
             *  Detail-Designation.Name: {{Detail.Designation.Name}}
             *
             *  {% endfor -%}
             *  ====
             */
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Static Constructor.
        /// </summary>
        static FieldDefinition()
        {
            __ClassDefinitor = new ModelClassDefinitor <FieldDefinition>("FieldDefinition", MetaDefinition.__ClassDefinitor, "Field Definition",
                                                                         "Defines a table structure field.");
            __ClassDefinitor.DeclareProperty(__OwnerTableDef);
            __ClassDefinitor.DeclareProperty(__StorageIndex);
            __ClassDefinitor.DeclareCollection(__Categories);
            __ClassDefinitor.DeclareProperty(__FieldType);
            __ClassDefinitor.DeclareProperty(__IsRequired);
            __ClassDefinitor.DeclareProperty(__HideInDiagram);
            __ClassDefinitor.DeclareProperty(__InitialStoreValue);
            __ClassDefinitor.DeclareProperty(__DefaultEmptyValue);
            __ClassDefinitor.DeclareProperty(__MinValue);
            __ClassDefinitor.DeclareProperty(__MaxValue);
            __ClassDefinitor.DeclareProperty(__ValuesSource);
            __ClassDefinitor.DeclareProperty(__IdeaReferencingProperty);
            __ClassDefinitor.DeclareProperty(__ContainedTableDesignator);
            __ClassDefinitor.DeclareProperty(__ContainedTableIsSingleRecord);
            //? __ClassDefinitor.DeclareProperty(__RestrictToValuesSource);
            //? __ClassDefinitor.DeclareProperty(__UnitOfMeasure);
            //? __ClassDefinitor.DeclareProperty(__IsInternal);

            __FieldType.ItemsSourceGetter =
                ((ctx) =>
            {
                if (ctx == null || ctx.EditEngine == null)
                {
                    return(null);
                }

                var Result = ((CompositionEngine)ctx.EditEngine).TargetComposition.CompositeContentDomain.AvailableDataTypes;
                return(Result);
            });
            //? (was needed for ConceptDefinition.__AutomaticCreationConceptDef): __FieldType.ItemsSourceSelectedValuePath = "TechName";
            //? (was needed for ConceptDefinition.__AutomaticCreationConceptDef): __FieldType.ItemsSourceDisplayMemberPath = "Name";

            __ValuesSource.ItemsSourceGetter =
                ((ctx) =>
            {
                if (ctx == null || ctx.EditEngine == null)
                {
                    return(null);
                }

                var Result = Domain.Unassigned_BaseTable.IntoEnumerable()
                             .Concat(((CompositionEngine)ctx.EditEngine).TargetComposition.CompositeContentDomain.BaseTables);
                return(Result);
            });

            __IdeaReferencingProperty.ItemsSourceGetter =
                ((ctx) =>
            {
                if (ctx == null || ctx.EditEngine == null)
                {
                    return(null);
                }

                var Result = Domain.Unassigned_IdeaReferencingPropertyProperty.IntoEnumerable()
                             .Concat(FormalElement.__ClassDefinitor.Properties.Where(prop => prop.IsIdentificator));

                return(Result);
            });
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Static Constructor.
        /// </summary>
        static IdeaDefinition()
        {
            __ClassDefinitor = new ModelClassDefinitor <IdeaDefinition>("IdeaDefinition", MetaDefinition.__ClassDefinitor, "IdeaDefinition",
                                                                        "Common ancestor for Metadefinitions about Concepts and Relationships. It can have attached user-defined Information and Visualization assignments.");
            __ClassDefinitor.DeclareProperty(__OwnerDefinitor);
            __ClassDefinitor.DeclareProperty(__CompositeContentDomain);
            __ClassDefinitor.DeclareProperty(__Cluster);

            __ClassDefinitor.DeclareProperty(__IsComposable);
            __ClassDefinitor.DeclareProperty(__IsVersionable);
            __ClassDefinitor.DeclareProperty(__CanAutomaticallyCreateRelatedConcepts);
            __ClassDefinitor.DeclareProperty(__CanGroupIntersectingObjects);
            __ClassDefinitor.DeclareProperty(__CanAutomaticallyCreateGroupedConcepts);
            __ClassDefinitor.DeclareProperty(__AutomaticGroupedConceptDef);
            __ClassDefinitor.DeclareProperty(__HasGroupRegion);
            __ClassDefinitor.DeclareProperty(__HasGroupLine);
            __ClassDefinitor.DeclareProperty(__RepresentativeShape);
            __ClassDefinitor.DeclareProperty(__PreciseConnectByDefault);
            __ClassDefinitor.DeclareProperty(__DefaultSymbolFormat);
            __ClassDefinitor.DeclareProperty(__CustomFieldsTableDef);

            __ClassDefinitor.DeclareCollection(__ConceptDefinitions);
            __ClassDefinitor.DeclareCollection(__RelationshipDefinitions);
            __ClassDefinitor.DeclareCollection(__DetailDesignators);
            __ClassDefinitor.DeclareCollection(__TableDefinitions);
            __ClassDefinitor.DeclareCollection(__OutputTemplates);

            __Cluster.ItemsSourceGetter = ((ctx) =>
            {
                var IdeaDef = ctx as IdeaDefinition;
                if (IdeaDef == null)
                {
                    return(null);
                }

                var Result = (IdeaDef is ConceptDefinition
                                  ? ConceptDefinition.ConceptDef_Cluster_None.IntoList().Concat(IdeaDef.OwnerDomain.ConceptDefClusters)
                                  : RelationshipDefinition.RelationshipDef_Cluster_None.IntoList().Concat(IdeaDef.OwnerDomain.RelationshipDefClusters));

                return(Result);
            });
            // NOTE: __Cluster.ItemsSourceSelectedValuePath must not be assigned in order to use the whole item
            __Cluster.ItemsSourceDisplayMemberPath = FormalElement.__Name.TechName;

            __AutomaticGroupedConceptDef.ItemsSourceGetter = ((ctx) =>
            {
                var IdeaDef = ctx as IdeaDefinition;
                if (IdeaDef == null)
                {
                    return(null);
                }

                return(IdeaDef.OwnerDomain.ConceptDefinitions);
            });
            __AutomaticGroupedConceptDef.ItemsSourceSelectedValuePath = FormalElement.__TechName.TechName;
            __AutomaticGroupedConceptDef.ItemsSourceDisplayMemberPath = FormalElement.__Name.TechName;

            __RepresentativeShape.ItemsSourceGetter =
                ((ctx) =>
            {
                if (ctx == null || ctx.EditEngine == null)
                {
                    return(null);
                }

                var Result = ((CompositionEngine)ctx.EditEngine).TargetComposition.CompositeContentDomain.AvailableShapes.OrderBy(shp => shp.Name);
                return(Result);
            });
            __RepresentativeShape.ItemsSourceSelectedValuePath = SimpleElement.__TechName.TechName;
            __RepresentativeShape.ItemsSourceDisplayMemberPath = SimpleElement.__Name.TechName;
        }