Examples of ConceptConfig


Examples of org.dmlite.model.config.ConceptConfig

     
      final App app = viewContext.getApp();
     
      IEntities entities = modelContext.getEntities();

      ConceptConfig conceptConfig = entity.getConceptConfig();
      String conceptCode = conceptConfig.getCode();

      // Neighbor display links
      List<NeighborNameLabelLinkPair> neighborNameLabelLinkPairs = new ArrayList<NeighborNameLabelLinkPair>();
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("child")) {
          String neighborConcept = neighborConfig.getDestination();
          ConceptConfig neighborConceptConfig = neighborConfig
              .getContextConceptConfig().getContextModelConfig()
              .getConceptConfig(neighborConcept);

          final String neighborDisplayType = neighborConceptConfig
              .getDisplayType();
          NeighborNameLabelLinkPair neighborNameLabelLinkPair = new NeighborNameLabelLinkPair();
          String neighborKey = conceptCode + "."
              + neighborConfig.getCode();
          String neighborName = getLocalizer().getString(neighborKey,
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

    try {
      final App app = viewContext.getApp();
     
      final IOrderedEntities entities = modelContext.getOrderedEntities();
      final IEntity entity = modelContext.getEntity();   
      ConceptConfig conceptConfig = entity.getConceptConfig();

      Link firstLink = new Link("first") {
        static final long serialVersionUID = 200581L;

        public void onClick() {
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

      ListView childPropertyDisplayListListView = app.getViewMeta()
          .getListView("ChildPropertyDisplayListListView",
              childModelContext, childViewContext);
      add(childPropertyDisplayListListView);
      ConceptConfig childConceptConfig = childEntities.getConceptConfig();
      if (!app.isConceptDisplayAllowed(getAppSession(),
          childConceptConfig)) {
        childPropertyDisplayListListView.setVisible(false);
      }
    } catch (Exception e) {
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

    try {
      IEntity entity = (IEntity) item.getModelObject();

      final App app = viewContext.getApp();

      ConceptConfig conceptConfig = entity.getConceptConfig();

      final ModelContext entityModelContext = new ModelContext(
          modelContext);
      entityModelContext.setEntity(entity);

      ModelContext parentModelContext = new ModelContext(modelContext);
      ViewContext parentViewContext = new ViewContext(viewContext);

      List<Panel> propertyValuePanels = new ArrayList<Panel>();

      // Properties absorbed from parents.
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("parent")
            && neighborConfig.getMax().equals("1")
            && neighborConfig.isAbsorb()) {
          ConceptConfig parentConceptConfig = neighborConfig
              .getNeighborDestinationConceptConfig();
          if (parentConceptConfig != null) {
            PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
                .getPropertiesConfig();
            for (IEntity parentPropertyConfigEntity : parentConceptPropertiesConfig) {
              PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
              if (parentConceptPropertyConfig.isEssential()) {
                IEntity parentEntity = entity
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

    IDomainModel domainModel = getDomainModel();
    if (domainModel != null) {
      if (domainModel.isInitialized()) {
        validation = !oidExists(entity);
        if (validation) {
          ConceptConfig conceptConfig = entity.getConceptConfig();
          if (conceptConfig != null) {
            validation = validMaxCardinality(1);
            if (validation) {
              ModelMeta modelMeta = domainModel.getModelMeta();
              PropertiesConfig propertiesConfig = conceptConfig
                  .getPropertiesConfig();
              for (IEntity config : propertiesConfig) {
                PropertyConfig propertyConfig = (PropertyConfig) config;
                String propertyCode = propertyConfig.getCode();
                Object property = entity
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

  protected boolean postAdd(T entity) {
    boolean validation = true;
    IDomainModel domainModel = getDomainModel();
    if (domainModel != null) {
      if (domainModel.isInitialized()) {
        ConceptConfig conceptConfig = entity.getConceptConfig();
        if (conceptConfig != null) {
          ModelMeta modelMeta = domainModel.getModelMeta();
          if (!conceptConfig.getIdConfig().isEmpty()) {
            validation = modelMeta.uniqueId(this, entity)
                && validation;
          }
        }
      }
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

   *            update entity
   * @return <code>true</code> if the update precondition is satisfied
   */
  protected boolean preUpdate(T entity, T updateEntity) {
    boolean validation = true;
    ConceptConfig conceptConfig = updateEntity.getConceptConfig();
    if (conceptConfig != null) {
      PropertiesConfig propertiesConfig = conceptConfig
          .getPropertiesConfig();
      IDomainModel domainModel = getDomainModel();
      if (domainModel != null) {
        ModelMeta modelMeta = domainModel.getModelMeta();
        for (PropertyConfig config : propertiesConfig) {
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

  protected boolean postUpdate(T entity, T updateEntity) {
    boolean validation = true;
    IDomainModel domainModel = getDomainModel();
    if (domainModel != null) {
      if (domainModel.isInitialized()) {
        ConceptConfig conceptConfig = entity.getConceptConfig();
        if (conceptConfig != null) {
          ModelMeta modelMeta = domainModel.getModelMeta();
          if (!conceptConfig.getIdConfig().isEmpty()) {
            validation = modelMeta.uniqueId(this, entity,
                updateEntity)
                && validation;
          }
        }
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

    super(viewContext.getWicketId());
    try {
      App app = viewContext.getApp();
     
      IEntities lookupEntities = modelContext.getLookupEntities();
      ConceptConfig lookupConceptConfig = lookupEntities
          .getConceptConfig();

      String conceptsKey = lookupConceptConfig.getEntitiesCode();
      String conceptsName = getLocalizer().getString(conceptsKey, this);
      add(new Label("conceptsName", conceptsName));

      List<String> conceptEssentialPropertyNames = new ArrayList<String>();
      List<String> conceptEssentiaPropertyCodes = lookupEntities
          .getConceptConfig().getConceptCodeEssentialPropertyCodes();
      String conceptPropertyName;
      for (String conceptPropertyKey : conceptEssentiaPropertyCodes) {
        conceptPropertyName = getLocalizer().getString(
            conceptPropertyKey, this);
        conceptEssentialPropertyNames.add(conceptPropertyName);
      }

      List<String> parentEssentialPropertyNames = new ArrayList<String>();
      List<String> parentEssentialPropertyCodes = lookupEntities
          .getConceptConfig().getParentCodeEssentialPropertyCodes();
      String parentPropertyName;
      for (String parentPropertyKey : parentEssentialPropertyCodes) {
        parentPropertyName = getLocalizer().getString(
            parentPropertyKey, this);
        parentEssentialPropertyNames.add(parentPropertyName);
      }

      List<String> essentialPropertyNames = conceptEssentialPropertyNames;
      if (parentEssentialPropertyNames.size() > 0) {
        essentialPropertyNames.addAll(parentEssentialPropertyNames);
      }
      add(new PropertyNameLabelListView("propertyNameLabelListView",
          essentialPropertyNames));

      List<String> childNeighborNames = lookupConceptConfig
          .getChildNeighborNames();
      add(new NeighborEmptyNameLabelListView(
          "neighborEmptyNameLabelListViewHead", childNeighborNames));

      ModelContext lookupModelContext = new ModelContext(modelContext);
View Full Code Here

Examples of org.dmlite.model.config.ConceptConfig

    super(viewContext.getWicketId());
    try {
      App app = viewContext.getApp();
     
      IEntities entities = modelContext.getEntities();
      ConceptConfig conceptConfig = entities.getConceptConfig();

      // Table title
      String conceptsKey = conceptConfig.getEntitiesCode();
      String conceptsName = getLocalizer().getString(conceptsKey, this);
      add(new Label("conceptsName", conceptsName));

      // Absorbed parent essential property names
      List<String> parentEssentialPropertyNames = new ArrayList<String>();
      List<String> parentEssentialPropertyCodes = entities
          .getConceptConfig().getParentCodeEssentialPropertyCodes();

      String parentPropertyName;
      for (String parentPropertyKey : parentEssentialPropertyCodes) {
        parentPropertyName = getLocalizer().getString(
            parentPropertyKey, this);
        parentEssentialPropertyNames.add(parentPropertyName);
      }

      // Concept essential property names
      List<String> conceptEssentialPropertyNames = new ArrayList<String>();
      List<String> conceptEssentiaPropertyCodes = entities
          .getConceptConfig().getConceptCodeEssentialPropertyCodes();
      String conceptPropertyName;
      for (String conceptPropertyKey : conceptEssentiaPropertyCodes) {
        conceptPropertyName = getLocalizer().getString(
            conceptPropertyKey, this);
        conceptEssentialPropertyNames.add(conceptPropertyName);
      }

      List<String> essentialPropertyNames = parentEssentialPropertyNames;
      essentialPropertyNames.addAll(conceptEssentialPropertyNames);
      add(new PropertyNameLabelListView("propertyNameLabelListView",
          essentialPropertyNames));

      // Neighbor empty labels
      List<String> childNeighborNames = conceptConfig
          .getChildNeighborNames();
      add(new NeighborEmptyNameLabelListView(
          "neighborEmptyNameLabelListViewHead", childNeighborNames));

      ModelContext entityDisplayTableListModelContext = new ModelContext(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.