Package org.locationtech.geogig.api

Examples of org.locationtech.geogig.api.Node$FeatureNode


            Object node = tp.getLastPathComponent();

            if ((node == null) || (!(node instanceof FeatureNode)))return;

            FeatureNode featureNode = (FeatureNode)node;
           
            if (featureNode.getNodeType() != FeatureNode.NODE_TYPE_NORMAL)
          return;
           
            String featureId = featureNode.getFeature().getID();
            if (featureId == null)
          return;
            if (elementLocator != null){
          if (e.getClickCount() == 1)
              elementLocator.locateInCurrentView(featureId);
View Full Code Here


            Object node = tp.getLastPathComponent();

            if ((node == null) || (!(node instanceof FeatureNode)))return;

            FeatureNode featureNode = (FeatureNode)node;
           
            if (featureNode.getNodeType() != FeatureNode.NODE_TYPE_NORMAL)
          return;
           
            String featureId = featureNode.getFeature().getID();
            if (featureId == null)
          return;
            if (elementLocator != null){
                elementLocator.locateInCurrentView(featureId);
            }           
View Full Code Here

        AE.cleanChildData();
        boolean wasElement = false;
        for (DiagramElement DGelem : FDe.getDiagramElements()) {
          if (DGelem instanceof FeatureNode) {
            FeatureNode baseNode = (FeatureNode) DGelem;
            if (baseNode.getName().contentEquals(
                AE.getFeatureElement())) {
              wasElement = true;
              for (AbstractRelation abstractRel : baseNode
                  .getChildRelations()) {
                if (abstractRel instanceof MandatoryRelation) {

                  String mandatoryElementName = ((MandatoryRelation) abstractRel)
                      .getTargetFeatureNode().getName();
View Full Code Here

  /**
   * @generated
   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    FeatureNode newElement = Fd2Factory.eINSTANCE.createFeatureNode();

    Diagram owner = (Diagram) getElementToEdit();
    owner.getDiagramElements().add(newElement);

    doConfigure(newElement, monitor, info);
View Full Code Here

  /**
   * @generated
   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    FeatureNode newElement = Fd2Factory.eINSTANCE.createFeatureNode();

    Diagram owner = (Diagram) getElementToEdit();
    owner.getDiagramElements().add(newElement);

    doConfigure(newElement, monitor, info);
View Full Code Here

    }
    View containerView = (View) view.eContainer();
    if (!containerView.isSetElement()) {
      return Collections.EMPTY_LIST;
    }
    FeatureNode modelElement = (FeatureNode) containerView.getElement();
    List result = new LinkedList();
    for (Iterator it = modelElement.getChildRelations().iterator(); it
        .hasNext();) {
      AbstractRelation childElement = (AbstractRelation) it.next();
      int visualID = Fd2VisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == ExclusiveCaseRelationEditPart.VISUAL_ID) {
View Full Code Here

  /**
   * @generated
   */
  public static List getFeatureNode_2001ContainedLinks(View view) {
    FeatureNode modelElement = (FeatureNode) view.getElement();
    List result = new LinkedList();
    result
        .addAll(getContainedTypeModelFacetLinks_MandatoryRelation_4008(modelElement));
    result
        .addAll(getContainedTypeModelFacetLinks_OptionalRelation_4009(modelElement));
View Full Code Here

  /**
   * @generated
   */
  public static List getFeatureNode_2001IncomingLinks(View view) {
    FeatureNode modelElement = (FeatureNode) view.getElement();
    Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource()
        .getResourceSet().getResources());
    List result = new LinkedList();
    result.addAll(getIncomingTypeModelFacetLinks_MandatoryRelation_4008(
        modelElement, crossReferences));
View Full Code Here

  /**
   * @generated
   */
  public static List getFeatureNode_2001OutgoingLinks(View view) {
    FeatureNode modelElement = (FeatureNode) view.getElement();
    List result = new LinkedList();
    result
        .addAll(getContainedTypeModelFacetLinks_MandatoryRelation_4008(modelElement));
    result
        .addAll(getContainedTypeModelFacetLinks_OptionalRelation_4009(modelElement));
View Full Code Here

        if (DGelem instanceof FeatureNode) {

          complexity.setF(complexity.getF() + 1);
          complexity.setSubtrees(complexity.getSubtrees() + 1);

          FeatureNode baseNode = (FeatureNode) DGelem;
          int minCgCount = 0;
          for (AbstractRelation abstractRel : baseNode
              .getChildRelations()) {

            if (abstractRel instanceof MandatoryRelation) {
              complexity.setRand(complexity.getRand() + 1);

              FDTree iEl = new FDTree();
              iEl.setParent(baseNode.getName());
              iEl.setElement(((MandatoryRelation) abstractRel)
                  .getTargetFeatureNode().getName());
              tChilds.add(iEl);

            }
            if (abstractRel instanceof OptionalRelation) {
              complexity.setRor(complexity.getRor() + 1);

              FDTree iEl = new FDTree();
              iEl.setParent(baseNode.getName());
              iEl.setElement(((OptionalRelation) abstractRel)
                  .getTargetFeatureNode().getName());
              tChilds.add(iEl);
             
              if(minCgCount < 1)
                complexity.setMinCg(complexity.getMinCg() + 1);
             
              minCgCount++;
            }
            if (abstractRel instanceof ExclusiveCaseRelation) {
              for (BaseFeatureNode baseFN : ((ExclusiveCaseRelation) abstractRel)
                  .getTargetFeatureNodes()) {
                complexity.setRCase(complexity.getRCase() + 1);

                complexity
                    .setSubtrees(complexity.getSubtrees() - 1);

                FDTree iEl = new FDTree();
                iEl.setParent(baseNode.getName());
                iEl.setElement(baseFN.getName());
                tChilds.add(iEl);
              }
              complexity.setMinCg(complexity.getMinCg() + 1);
              complexity
                  .setSubtrees(complexity.getSubtrees() + 1);
            }
            if (abstractRel instanceof CaseOrRelation) {
              for (BaseFeatureNode baseFN : ((CaseOrRelation) abstractRel)
                  .getTargetFeatureNodes()) {
                complexity.setRopt(complexity.getRopt() + 1);

                FDTree iEl = new FDTree();
                iEl.setParent(baseNode.getName());
                iEl.setElement(baseFN.getName());
                tChilds.add(iEl);
               
              }
              complexity.setMinCg(complexity.getMinCg() + 1);
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.Node$FeatureNode

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.