Examples of FeatureInfo


Examples of org.apache.karaf.cellar.features.FeatureInfo

            // get the features distributed map
            Map<FeatureInfo, Boolean> distributedFeatures = clusterManager.getMap(Constants.FEATURES + Configurations.SEPARATOR + groupName);

            // check if the feature exist
            FeatureInfo feature = null;
            for (FeatureInfo info : distributedFeatures.keySet()) {
                if (version == null) {
                    if (info.getName().equals(name)) {
                        feature = info;
                        break;
View Full Code Here

Examples of org.apache.karaf.cellar.features.FeatureInfo

            // get the features distributed map
            Map<FeatureInfo, Boolean> distributedFeatures = clusterManager.getMap(Constants.FEATURES + Configurations.SEPARATOR + groupName);

            // check if the feature exist
            FeatureInfo feature = null;
            for (FeatureInfo info : distributedFeatures.keySet()) {
                if (version == null) {
                    if (info.getName().equals(name)) {
                        feature = info;
                        break;
View Full Code Here

Examples of org.apache.karaf.cellar.features.FeatureInfo

                // update the distributed list
                distributedRepositories.add(url);

                // update the distributed feature map
                for (Feature feature : repository.getFeatures()) {
                    FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                    distributedFeatures.put(info, false);
                }

                // unregister the repository if it's not local registered
                if (!localRegistered)
View Full Code Here

Examples of org.apache.karaf.cellar.features.FeatureInfo

            // update the list
            distributedRepositories.remove(url);

            // update the distributed feature map
            for (Feature feature : repository.getFeatures()) {
                FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                distributedFeatures.remove(info);
            }

            // unregister the repository if it's not local registered
            if (!localRegistered)
View Full Code Here

Examples of org.apache.karaf.cellar.features.FeatureInfo

        ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
            Group group = groupManager.findGroupByName(groupName);
            if (group == null || group.getNodes().isEmpty()) {
                FeatureInfo info = new FeatureInfo(feature, version);
                Map<FeatureInfo, Boolean> features = clusterManager.getMap(Constants.FEATURES + Configurations.SEPARATOR + groupName);
                //1st check the existing configuration
                if (version == null || (version.trim().length() < 1)) {
                    for (FeatureInfo f : features.keySet()) {
                        if (f.getName().equals(feature)) {
                            version = f.getVersion();
                            info.setVersion(version);
                        }
                    }
                }

                //2nd check the Features Service.
                try {
                    for (Feature f : featuresService.listFeatures()) {
                        if (f.getName().equals(feature)) {
                            version = f.getVersion();
                            info.setVersion(version);
                        }
                    }
                } catch (Exception e) {
                    LOGGER.error("Error while browsing features", e);
                }

                if (info.getVersion() != null && (info.getVersion().trim().length() > 0)) {
                    features.put(info, status);
                    result = Boolean.TRUE;
                }
            }
        } finally {
View Full Code Here

Examples of org.apache.karaf.cellar.features.FeatureInfo

                    // update the distributed list
                    distributedRepositories.add(url);

                    // update the distributed feature map
                    for (Feature feature : repository.getFeatures()) {
                        FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                        distributedFeatures.put(info, false);
                    }

                    // unregister the repository if it's not local registered
                    if (!localRegistered)
View Full Code Here

Examples of org.apache.karaf.cellar.features.FeatureInfo

                // update the list
                distributedRepositories.remove(url);

                // update the distributed feature map
                for (Feature feature : repository.getFeatures()) {
                    FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                    distributedFeatures.remove(info);
                }

                // unregister the repository if it's not local registered
                if (!localRegistered)
View Full Code Here

Examples of org.geomajas.configuration.FeatureInfo

    } else {
      throw new LayerException(ExceptionCode.FEATURE_MODEL_PROBLEM, "Feature "
          + vectorLayerInfo.getFeatureInfo().getDataSourceName() + " has no valid geometry attribute");
    }

    FeatureInfo featureInfo = vectorLayerInfo.getFeatureInfo();
    attributeInfoMap.put(featureInfo.getIdentifier().getName(), featureInfo.getIdentifier());
    for (AttributeInfo info : featureInfo.getAttributes()) {
      addAttribute(null, info);
    }
    entityMapper = new BeanEntityMapper();
  }
View Full Code Here

Examples of org.geomajas.configuration.FeatureInfo

    if (null != prefix) {
      name = prefix + SEPARATOR + name;
    }
    attributeInfoMap.put(name, info);
    if (info instanceof AssociationAttributeInfo) {
      FeatureInfo association = ((AssociationAttributeInfo) info).getFeature();
      attributeInfoMap.put(name + SEPARATOR + association.getIdentifier().getName(), association.getIdentifier());
      for (AttributeInfo assInfo : association.getAttributes()) {
        addAttribute(name, assInfo);
      }
    }
  }
View Full Code Here

Examples of org.geomajas.configuration.FeatureInfo

  @Before
  public void setUp() throws Exception {
    ClassLoader classloader = Thread.currentThread().getContextClassLoader();
    classloader.getResource(SHAPE_FILE);

    FeatureInfo ft = new FeatureInfo();
    ft.setDataSourceName("filtertest");

    PrimitiveAttributeInfo ia = new PrimitiveAttributeInfo();
    ia.setLabel("id");
    ia.setName("Id");
    ia.setType(PrimitiveType.STRING);
    ft.setIdentifier(ia);

    GeometryAttributeInfo ga = new GeometryAttributeInfo();
    ga.setName("the_geom");
    ga.setEditable(false);
    ft.setGeometryType(ga);

    List<AttributeInfo> attr = new ArrayList<AttributeInfo>();
    PrimitiveAttributeInfo pa = new PrimitiveAttributeInfo();
    pa.setLabel("textAttr");
    pa.setName("textAttr");
    pa.setEditable(false);
    pa.setIdentifying(true);
    pa.setType(PrimitiveType.STRING);

    attr.add(pa);

    PrimitiveAttributeInfo pa2 = new PrimitiveAttributeInfo();
    pa2.setLabel("numberAttr");
    pa2.setName("numberAttr");
    pa2.setEditable(false);
    pa2.setIdentifying(true);
    pa2.setType(PrimitiveType.INTEGER);

    attr.add(pa2);
    ft.setAttributes(attr);

    VectorLayerInfo layerInfo = new VectorLayerInfo();
    layerInfo.setFeatureInfo(ft);
    layerInfo.setCrs("EPSG:4326");
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.