Package org.dmlite.model.config

Examples of org.dmlite.model.config.ConceptConfig


   *            entity
   */
  public IEntity getInternalParent(IEntity entity) {
    IEntity parent = null;
    try {
      ConceptConfig conceptConfig = entity.getConceptConfig();
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity config : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) config;
        if (neighborConfig.getType().equals("parent")
            && (neighborConfig.isInternal())) {
View Full Code Here


   *            entities
   */
  public IEntity getInternalParent(IEntities entities) {
    IEntity parent = null;
    try {
      ConceptConfig conceptConfig = entities.getConceptConfig();
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity config : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) config;
        if (neighborConfig.getType().equals("parent")
            && (neighborConfig.isInternal())) {
View Full Code Here

   *            neighbor configuration
   */
  public NeighborConfig findOppositeNeighborConfig(
      NeighborConfig neighborConfig) {
    NeighborConfig oppositeNeighborConfig = null;
    ConceptConfig oppositeConceptConfig = neighborConfig
        .getNeighborDestinationConceptConfig();
    for (IEntity config : oppositeConceptConfig.getNeighborsConfig()) {
      NeighborConfig oppositeConfig = (NeighborConfig) config;
      if (oppositeConfig.getDestination().equals(
          neighborConfig.getContextConceptConfig().getCode())) {
        oppositeNeighborConfig = oppositeConfig;
        break;
View Full Code Here

   *            source entities
   */
  public void setParents(IEntities destinationEntities,
      IEntities sourceEntities) {
    try {
      ConceptConfig conceptConfig = sourceEntities.getConceptConfig();
      if (conceptConfig != null) {
        NeighborsConfig neighborsConfig = conceptConfig
            .getNeighborsConfig();
        for (IEntity config : neighborsConfig) {
          NeighborConfig neighborConfig = (NeighborConfig) config;
          if (neighborConfig.getType().equals("parent")) {
            String getParentMethodName = "get"
View Full Code Here

   * @param entity
   *            entity
   */
  public void setParents(IEntity entity, IEntities entities) {
    try {
      ConceptConfig conceptConfig = entity.getConceptConfig();
      if (conceptConfig != null) {
        NeighborsConfig neighborsConfig = conceptConfig
            .getNeighborsConfig();
        for (IEntity config : neighborsConfig) {
          NeighborConfig neighborConfig = (NeighborConfig) config;
          if (neighborConfig.getType().equals("parent")) {
            String getParentMethodName = "get"
View Full Code Here

              getObject);
        } else {
          String destination = neighborConfig.getDestination();
          ModelConfig modelConfig = neighborConfig
              .getContextConceptConfig().getContextModelConfig();
          ConceptConfig neighborConcept = modelConfig
              .getConceptConfig(destination);
          Class paramClass;
          if (neighborConfig.getMax().equals("1")) {
            paramClass = Reflector.getClass(neighborConcept
                .getEntityClass());
          } else {
            paramClass = Reflector.getClass(neighborConcept
                .getEntitiesClass());
          }
          Reflector.executeMethodWithNull(entityLeft, setMethodName,
              paramClass);
        }
View Full Code Here

    for (IEntity config : neighborsConfig) {
      NeighborConfig neighborConfig = (NeighborConfig) config;
      if (neighborConfig.getType().equals("child")
          && neighborConfig.isInternal()) {
        String neigborProperty = neighborConfig.getSmallCode();
        ConceptConfig neighborChildConceptConfig = (ConceptConfig) domainModel
            .getModelConfig().getConceptsConfig().getConceptConfig(
                neighborConfig.getDestination());
        if (neighborChildConceptConfig != null) {
          if (neighborConfig.getMax().equals("1")) {
            IEntity property = (IEntity) Reflector.getField(entity,
View Full Code Here

    try {
      IEntity entity = (IEntity) item.getModelObject();
     
      App app = viewContext.getApp();

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

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

      List<PropertyNameLabelValuePanelPair> propertyNameLabelValuePanelPairs = new ArrayList<PropertyNameLabelValuePanelPair>();

      // 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) {
            if (conceptCode.equals(neighborConfig
                .getContextConceptConfig().getCode())
                && parentConceptConfig.getDisplayType().equals(
                    "slide")) {
              // Do not absorb the context parent properties when
              // the parent is displayed as a slide.
              continue;
            }
            PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
                .getPropertiesConfig();
            for (IEntity parentPropertyConfigEntity : parentConceptPropertiesConfig) {
              PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
              if (parentConceptPropertyConfig.isEssential()) {
                IEntity parentEntity = entity
View Full Code Here

     * Submits a user action.
     */
    protected void onSubmit() {
      IEntities entities = modelContext.getEntities();
      IEntity entity = modelContext.getEntity();
      ConceptConfig conceptConfig = entities.getConceptConfig();
      App app = viewContext.getApp();

      try {
        if (app.isConceptUpdateAllowed(getAppSession(),
            conceptConfig, entity, "remove")) {
View Full Code Here

      final ViewContext viewContext) {
    super(modelContext, viewContext);
    try {
      App app = viewContext.getApp();
     
      ConceptConfig conceptConfig = modelContext.getEntities()
          .getConceptConfig();
      String entityCode = conceptConfig.getCode();
      String propertyCode = modelContext.getPropertyConfig().getCode();
      String entityPropertyKey = entityCode + "." + propertyCode;
      String entityPropertyTitle = getLocalizer().getString(
          entityPropertyKey, this);
      Label entityPropertyTitleLabel = new Label("entityPropertyTitle",
View Full Code Here

TOP

Related Classes of org.dmlite.model.config.ConceptConfig

Copyright © 2018 www.massapicom. 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.