Examples of FeatureType


Examples of org.apache.isis.core.metamodel.facetapi.FeatureType

        facets.add(new NamedFacetNone(facetedMethod));
        facets.add(new DescribedAsFacetNone(facetedMethod));
        facets.add(new HelpFacetNone(facetedMethod));

       
        final FeatureType featureType = facetedMethod.getFeatureType();
        if (featureType.isProperty()) {
            facets.add(new MaxLengthFacetUnlimited(facetedMethod));
            facets.add(new MultiLineFacetNone(true, facetedMethod));
        }
        if (featureType.isAction()) {
            facets.add(new ActionDefaultsFacetNone(facetedMethod));
            facets.add(new ActionChoicesFacetNone(facetedMethod));
        }
        if (featureType.isCollection()) {
            facets.add(new PagedFacetDefault(facetedMethod, getConfiguration().getInteger("isis.viewers.paged.parented", PAGE_SIZE_PARENTED_DEFAULT)));
        }

        FacetUtil.addFacets(facets);
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facetapi.FeatureType

        facets.add(new NamedFacetNone(facetHolder));
        facets.add(new DescribedAsFacetNone(facetHolder));
        facets.add(new HelpFacetNone(facetHolder));


        final FeatureType featureType = facetHolder.getFeatureType();
        if (featureType.isProperty()) {
            facets.add(new MaxLengthFacetUnlimited(facetHolder));
            facets.add(new MultiLineFacetNone(true, facetHolder));

            facets.add(newLabelAtFacetIfAny(facetHolder, "properties", "property", "props", "prop"));
        }
        if (featureType.isAction()) {
            facets.add(new ActionDefaultsFacetNone(facetHolder));
            facets.add(new ActionChoicesFacetNone(facetHolder));
        }
        if (featureType.isCollection()) {
            facets.add(new PagedFacetFromConfiguration(getPagedConfigSetting("parented", PAGE_SIZE_PARENTED_DEFAULT), facetHolder));
        }

        FacetUtil.addFacets(facets);
    }
View Full Code Here

Examples of org.geotools.feature.FeatureType

                    List residualProperties = new ArrayList(properties);
                    residualProperties.removeAll(extraGeometries);
                    residualProperties.add("nearest_distance");
                    residualProperties.add("nearest_bearing");
                    String[] residualNames = (String[]) residualProperties.toArray(new String[residualProperties.size()]);
                    FeatureType targetType = DataUtilities.createSubType(superFeatureType(meta.getFeatureType()), residualNames);
                    features = new FeatureBoundsFeatureCollection(features, targetType);
                }

                results.addFeatures(meta, features);
            }
View Full Code Here

Examples of org.geotools.feature.FeatureType

            throw new ServiceException(e, "problem with FeatureResults", request.getHandle());
        }
    }
   
    private FeatureType superFeatureType(FeatureType oldType) {
        FeatureType featureType = null;
        try {
            FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance(oldType.getTypeName());
            typeBuilder.setNamespace(oldType.getNamespace());

            //typeBuilder.setDefaultGeometry(oldType.getDefaultGeometry());
View Full Code Here

Examples of org.geotools.feature.FeatureType

        }
        return featureType;
    }
   
    private Feature superFeature(Feature oldFeature, Double distance, Double bearing) {
        FeatureType featureType = superFeatureType(oldFeature.getFeatureType());
        Object[] attbs = new Object[featureType.getAttributeCount()];
        for (int i = 0; i < oldFeature.getFeatureType().getAttributeCount(); i++) {
            attbs[i] = oldFeature.getAttribute(i);
        }
        attbs[attbs.length - 2] = distance;
        attbs[attbs.length - 1] = bearing;
        try {
            return featureType.create(attbs, oldFeature.getID());
        } catch (Exception e) {
            LOGGER.severe("Error createing super feature: " + e); e.printStackTrace();
        }
        return null;
    }
View Full Code Here

Examples of org.jamesii.perfdb.jdbc.FeatureType

  @Override
  public Feature getEntity() throws Exception {

    SimulationProblem sp = (new SimProblemTest()).getConnectedEntity();
    sp.create();
    FeatureType f = (new FeatureTest()).getConnectedEntity();
    f.create();
    return new Feature(sp, f, null);
  }
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

        FeatureLayer featureLayer = (FeatureLayer) layer;
        List<Rule> rules = (List<Rule>) featureLayer.getUserData().get(LayerFactory.USERDATA_KEY_STYLE_RULES);
        for (Rule rule : rules) {
          if (!isTextOnly(rule)) {
            FeatureSource<?, ?> source = featureLayer.getFeatureSource();
            FeatureType schema = source.getSchema();
            if (schema instanceof SimpleFeatureType) {
              builder.addVectorLayer((SimpleFeatureType) schema, rule.getDescription().getTitle()
                  .toString(), rule, font);
            }
          }
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

        FeatureSource<SimpleFeatureType,SimpleFeature> source =
                layer.getResource(FeatureSource.class, new SubProgressMonitor(monitor,10));

        FeatureCollection<SimpleFeatureType, SimpleFeature> features = source.getFeatures( filter );
       
        FeatureType schema = features.getSchema();
        Class<?> binding = schema.getGeometryDescriptor().getType().getBinding();
        Graph graph = null;
        if( MultiLineString.class.isAssignableFrom( binding )){
            graph = buildFromMultiLineString( features, new SubProgressMonitor(monitor, 90) );
        }       
        if( graph == null ){
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

        // check that all required properties have a specified value
        UpdateElementType update = (UpdateElementType) element;

        try {
            FeatureTypeInfo meta = (FeatureTypeInfo) typeInfos.values().iterator().next();
            FeatureType featureType = meta.getFeatureType();

            for (Iterator prop = update.getProperty().iterator(); prop.hasNext();) {
                PropertyType property = (PropertyType) prop.next();

                //check that valus that are non-nillable exist
                if (property.getValue() == null) {
                    String propertyName = property.getName().getLocalPart();
                    AttributeDescriptor attributeType = null;
                    PropertyDescriptor pd = featureType.getDescriptor(propertyName);
                    if(pd instanceof AttributeDescriptor) {
                        attributeType = (AttributeDescriptor) pd;
                    }
                    if ((attributeType != null) && (attributeType.getMinOccurs() > 0)) {
                        String msg = "Property '" + attributeType.getLocalName()
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

            if ( !meta.enabled() ) {
                continue;
            }

           
            FeatureType featureType =  null;
            try {
                featureType = meta.getFeatureType();
            } catch(Exception e) {
                LOGGER.log(Level.WARNING, "Could not load underlying feature type for type "
                        + meta.getName(), e);
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.