Package org.opengis.feature.type

Examples of org.opengis.feature.type.Name


            final AttributeType expectedInstanceOf;

            final Map clientProperties = getClientProperties(attDto);

            if (expectedInstanceTypeName != null) {
                Name expectedNodeTypeName = Types.degloseName(expectedInstanceTypeName, namespaces);
                expectedInstanceOf = typeRegistry.getAttributeType(expectedNodeTypeName, null, crs);
                if (expectedInstanceOf == null) {
                    String msg = "mapping expects and instance of " + expectedNodeTypeName
                            + " for attribute " + targetXPath
                            + " but the attribute descriptor was not found";
View Full Code Here


        Map clientProperties = new HashMap();
        for (Iterator it = dto.getClientProperties().entrySet().iterator(); it.hasNext();) {
            Map.Entry entry = (Map.Entry) it.next();
            String name = (String) entry.getKey();
            Name qName = Types.degloseName(name, namespaces);
            String cqlExpression = (String) entry.getValue();           
            final Expression expression =  parseOgcCqlExpression(cqlExpression);           
            clientProperties.put(qName, expression);
        }
        return clientProperties;
View Full Code Here

                    + dto);
        }

        AppSchemaDataAccessConfigurator.LOGGER.fine("asking datastore " + sourceDataStore
                + " for source type " + typeName);
        Name name = Types.degloseName(typeName, namespaces);
        FeatureSource fSource = sourceDataStore.getFeatureSource(name);
        if (fSource instanceof XmlFeatureSource) {
            ((XmlFeatureSource) fSource).setNamespaces(namespaces);
        }
        AppSchemaDataAccessConfigurator.LOGGER.fine("found feature source for " + typeName);
View Full Code Here

        AppSchemaFeatureTypeRegistry typeRegistry = new AppSchemaFeatureTypeRegistry();
       
        try {
            typeRegistry.addSchemas(schemaIndex);
   
            Name typeName = Types.typeName(GSMLNS, "MappedFeatureType");      
            ComplexType mf = (ComplexType) typeRegistry.getAttributeType(typeName);
            assertNotNull(mf);
            assertTrue(mf instanceof FeatureType);
           
            AttributeExpressionImpl ex = new AttributeExpressionImpl("gsml:specification/gsml:GeologicUnit/gsml:preferredAge/gsml:GeologicEvent/gsml:eventAge/gsml:CGI_TermRange/gsml:upper/gsml:CGI_TermValue/gsml:value",
View Full Code Here

        // could have been generated from an xpath of the form
        // @attName or propA/propB@attName
        if (candidates.size() == 0 && propertyName.size() > 0) {
            XPath.Step clientPropertyStep = (Step) propertyName.get(propertyName.size() - 1);
            if (clientPropertyStep.isXmlAttribute()) {
                Name clientPropertyName = Types.toTypeName(clientPropertyStep.getName());
                XPath.StepList parentPath;

                if (propertyName.size() == 1) {
                    parentPath = XPath.rootElementSteps(this.target, this.namespaces);
                } else {
View Full Code Here

    public static void example1() throws Exception {
        // octo start
        WKTReader wktReader = new WKTReader(new GeometryFactory());
        Geometry geom = wktReader.read("MULTIPOINT (1 1, 5 4, 7 9, 5 5, 2 2)");
       
        Name name = new NameImpl("tutorial","octagonalEnvelope");
        Process process = Processors.createProcess( name );
       
        ProcessExecutor engine = Processors.newProcessExecutor(2);
       
        // quick map of inputs
View Full Code Here

        System.out.println( octo );
        // octo end
    }
    public static void exampleParam() throws Exception {
        // param start
        Name name = new NameImpl("tutorial","octagonalEnvelope");

        Map<String, Parameter<?>> paramInfo = Processors.getParameterInfo(name);
        // param end
    }
View Full Code Here

                .literal("CONSTANT"));
        runAppSchemaBackendTests(filter);
    }

    private void runAppSchemaBackendTests(Filter filter) throws Exception {
        final Name GEOLOGIC_UNIT1 = Types.typeName("GeologicUnit1");
        FeatureSource<FeatureType, Feature> guFeatureSource = newGuDataAccess
                .getFeatureSourceByName(GEOLOGIC_UNIT1);
        assertNotNull(guFeatureSource);
        List<Feature> results = new ArrayList<Feature>();
View Full Code Here

     *
     * @throws Exception
     */
    @Test
    public void testThrowDataSourceException() throws Exception {
        Name typeName = Types.typeName(GSMLNS, "DoesNotExist");
        boolean handledException = false;
        try {
            AppSchemaDataAccessRegistry.getMappingByElement(typeName);
        } catch (DataSourceException e) {
            LOGGER.info(e.toString());
View Full Code Here

    @Test
    public void testSteps() throws Exception {
        FeatureType complexType = ComplexTestData
                .createExample01MultiValuedComplexProperty(new UniqueNameFeatureTypeFactoryImpl());
        Name name = complexType.getName();
        AttributeDescriptor descriptor = new AttributeDescriptorImpl(complexType, name, 0,
                Integer.MAX_VALUE, true, null);

        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("wq", name.getNamespaceURI());
        try {
            XPathUtil.steps(descriptor, null, namespaces);
            fail("passed null");
        } catch (NullPointerException e) {
        }

        List expected;
        String xpath;

        xpath = "/";
        assertEquals(1, XPathUtil.steps(descriptor, xpath, namespaces).size());
        XPathUtil.Step step = (XPathUtil.Step) XPathUtil.steps(descriptor, xpath, namespaces).get(0);
        QName rootQName = new QName(name.getNamespaceURI(), name.getLocalPart());
        assertEquals(rootQName, step.getName());

        expected = Collections.singletonList(new XPathUtil.Step(rootQName, 1));
        xpath = "wq_plus";
        assertEquals(expected, XPathUtil.steps(descriptor, xpath, namespaces));
View Full Code Here

TOP

Related Classes of org.opengis.feature.type.Name

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.