Examples of FeatureModel


Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

  List<Feature> listFeature;
  if (isVirtualRoot) {
      listFeature =  FeatureModelHelper.getAllRoots(getFeatureModel(), getConstraintModel());     
  }
  else {
      FeatureModel featureModel = getFeatureModel();
      if (featureModel == null)
    listFeature = new ArrayList<Feature>();
      else
    listFeature = getFeatureModel().getChildrenFeatureByComposition(feature.getID());     
  }
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

  List<Feature> listFeature;
  if (isVirtualRoot) {
      listFeature =  FeatureModelHelper.getAllRoots(getFeatureModel(), getConstraintModel());     
  }
  else {
      FeatureModel featureModel = getFeatureModel();
      if (featureModel == null)
    listFeature = new ArrayList<Feature>();
      else
    listFeature = getFeatureModel().getChildrenFeatureByCharacterization(feature.getID());     
  }
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

      if(drawingViewContainer!=null){
        drawingViews = drawingViewContainer.getAllDrawingViews();
      }else{
        drawingViews = new DrawingView[0];
      }
      FeatureModel fm = (FeatureModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
            ConstraintModel cm = (ConstraintModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
            InteractionModel im = (InteractionModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
            //gh start
            CustomizationModel customizationModel = (CustomizationModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CUSTOMIZATION_MODEL_INTERFACE);
            //gh end
            String index =  fm.getName();
            index += " "+drawingViews.length;
            for(int i = 0 ;i<drawingViews.length ;i++){
              index += " " + drawingViews[i].getDrawing().getTitle();
            }
            if(fileModel == null){
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

    @Override
    public String toString() {
  if (isVirtualRoot){
            String name = "";
           
            FeatureModel fm = getFeatureModel();
            if(fm != null){
                name = fm.getName();
            }
           
      return "FM: " + name;
        }
  else if (nodeType.equals(FeatureNode.NODE_TYPE_NORMAL))
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

  List<Feature> listFeature;
  if (isVirtualRoot) {
      listFeature =  FeatureModelHelper.getAllRoots(getFeatureModel(), getConstraintModel());     
  }
  else {
      FeatureModel featureModel = getFeatureModel();
      if (featureModel == null)
    listFeature = new ArrayList<Feature>();
      else
    listFeature = getFeatureModel().getChildrenFeatureByComposition(feature.getID());     
  }
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

  List<Feature> listFeature;
  if (isVirtualRoot) {
      listFeature =  FeatureModelHelper.getAllRoots(getFeatureModel(), getConstraintModel());     
  }
  else {
      FeatureModel featureModel = getFeatureModel();
      if (featureModel == null)
    listFeature = new ArrayList<Feature>();
      else
    listFeature = getFeatureModel().getChildrenFeatureByCharacterization(feature.getID());     
  }
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

                else
                    drawingViews = new DrawingView[0];

                ByteArrayOutputStream bufferStream = new ByteArrayOutputStream();

                FeatureModel fm = (FeatureModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
                ConstraintModel cm = (ConstraintModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
                InteractionModel im = (InteractionModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
                //gh start
                CustomizationModel customizationModel = (CustomizationModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CUSTOMIZATION_MODEL_INTERFACE);
                //gh end

                //begin д����Ŀ�����ļ�
                StorableOutput textOutput = new StorableOutput(bufferStream);

                textOutput.writeString(fm.getName());
                textOutput.writeInt(drawingViews.length);
                for (int i = 0; i < drawingViews.length; i++) {
                    textOutput.writeString(drawingViews[i].getDrawing().getTitle());
                }
                textOutput.close();

                ZipEntry indexZipEntry = new ZipEntry("index.txt");
                zipOutStream.putNextEntry(indexZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д����Ŀ�����ļ�

                bufferStream.reset();


                //begin д������ģ�������ļ�
                FmdlParser parser = new FmdlParserPrototype();
                parser.saveFmdl(bufferStream, fm);
                ZipEntry fmZipEntry = new ZipEntry(fm.getName() + ".fm");
                zipOutStream.putNextEntry(fmZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д������ģ�������ļ�

                bufferStream.reset();

                //begin д��Լ��ģ�������ļ�
                parser.saveCmdl(bufferStream, cm, fm);
                ZipEntry cmZipEntry = new ZipEntry(fm.getName() + ".cm");
                zipOutStream.putNextEntry(cmZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д��Լ��ģ�������ļ�

                bufferStream.reset();

                //begin д�뽻��ģ�������ļ�
                parser.saveImdl(bufferStream, im, fm);
                ZipEntry imZipEntry = new ZipEntry(fm.getName() + ".im");
                zipOutStream.putNextEntry(imZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д�뽻��ģ�������ļ�
View Full Code Here

Examples of org.geomajas.layer.feature.FeatureModel

      InternalFeature oldFeature = context.getOptional(PipelineCode.OLD_FEATURE_KEY, InternalFeature.class);
      if (null != oldFeature) {
        // get original geometry from storage to assure not changed by transformation and available
        Object feature = layer.read(oldFeature.getId());
        context.put(PipelineCode.FEATURE_DATA_OBJECT_KEY, feature); // put in context to prevent getting twice
        FeatureModel featureModel = layer.getFeatureModel();
        Geometry oldGeometry = featureModel.getGeometry(feature);
        if (null != oldGeometry) {
          // invalidate
          recorder.record("layer", "Invalidate geometry for old version of feature");
          Envelope oldEnvelope = oldGeometry.getEnvelopeInternal();
          log.debug("invalidate old feature area {}", oldEnvelope);
View Full Code Here

Examples of org.geomajas.layer.feature.FeatureModel

    }
    return filteredAttributes;
  }

  private Map<String, Attribute> getAttributes(VectorLayer layer, Object featureBean) throws LayerException {
    FeatureModel featureModel = layer.getFeatureModel();
    FeatureInfo featureInfo = layer.getLayerInfo().getFeatureInfo();
    String geometryAttributeName = featureInfo.getGeometryType().getName();
    boolean lazy = layer instanceof VectorLayerLazyFeatureConversionSupport &&
        ((VectorLayerLazyFeatureConversionSupport) layer).useLazyFeatureConversion();

    Map<String, Attribute> attributes = new HashMap<String, Attribute>();
    for (AttributeInfo attribute : featureInfo.getAttributes()) {
      String name = attribute.getName();
      if (!name.equals(geometryAttributeName)) {
        Attribute value;
        if (lazy) {
          // need to use the correct lazy type to allow instanceof to work
          if (attribute instanceof AssociationAttributeInfo) {
            switch (((AssociationAttributeInfo) attribute).getType()) {
              case MANY_TO_ONE:
                value = new LazyManyToOneAttribute(featureModel, featureBean, name);
                break;
              case ONE_TO_MANY:
                value = new LazyOneToManyAttribute(featureModel, featureBean, name);
                break;
              default:
                throw new LayerException(ExceptionCode.UNEXPECTED_PROBLEM,
                    "Coding error, not all AssociationType options are covered");
            }
          } else {
            PrimitiveType type = ((PrimitiveAttributeInfo) attribute).getType();
            value = new LazyPrimitiveAttribute(type, featureModel, featureBean, name);
          }
        } else {
          value = featureModel.getAttribute(featureBean, name);
        }
        attributes.put(name, value);
      }
    }
    return attributes;
View Full Code Here

Examples of org.geomajas.layer.feature.FeatureModel

   *             oops
   */
  private InternalFeature convertFeature(Object feature, Geometry geometry, VectorLayer layer,
      CrsTransform transformation, List<StyleFilter> styles, LabelStyleInfo labelStyle, int featureIncludes)
      throws GeomajasException {
    FeatureModel featureModel = layer.getFeatureModel();
    InternalFeature res = new InternalFeatureImpl();
    res.setId(featureModel.getId(feature));
    res.setLayer(layer);
    res.setGeometry(geometry); // in layer coordinate space for security checks
    res = attributeService.getAttributes(layer, res, feature); // includes security checks

    if (null != res) {
      // add and clear data according to the feature includes
      // unfortunately the data needs to be there for the security tests and can only be removed later
      if ((featureIncludes & VectorLayerService.FEATURE_INCLUDE_LABEL) != 0) {
        String labelAttr = labelStyle.getLabelAttributeName();
        Attribute attribute = featureModel.getAttribute(feature, labelAttr);
        if (null != attribute && null != attribute.getValue()) {
          res.setLabel(attribute.getValue().toString());
        }
      }

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.