Package org.geotools.data.efeature

Examples of org.geotools.data.efeature.EFeatureStatus


     * </p>
     * @return a {@link EFeatureStatus} instance
     */
    public final EFeatureStatus attach(EFeatureInfo eInfo) {
        if(contains(eInfo)) return DENIED;
        EFeatureStatus eStatus = vote(eInfo);
        if(eStatus.isSuccess()) {
            eCache.put(createKey(eInfo),eInfo);
        }
        return eStatus;
    }
View Full Code Here


     * </p>
     * @return a {@link EFeatureStatus} instance
     */
    public final EFeatureStatus detach(EFeatureInfo eInfo) {
        if(!contains(eInfo)) return DENIED;
        EFeatureStatus eStatus = vote(eInfo);
        if(eStatus.isSuccess()) eCache.remove(createKey(eInfo));
        return eStatus;
    }   
View Full Code Here

     * @throws IllegalArgumentException If new package fails to validate.
     */
    private static final EPackage eAdd(EPackage ePackage) throws IllegalArgumentException {
        EPackage eOldPackage = eContext.eAdd(ePackage);
        if(eOldPackage!=ePackage) {
            EFeatureStatus eStatus = eContext().eStructure().validate();
            if(eStatus.isFailure()) {
                throw new IllegalArgumentException("EPackage not properly added. "
                        + eStatus.getMessage(),eStatus.getCause());
            }       
        }
        return eOldPackage;
    }
View Full Code Here

    protected void eReplace(EFeatureInfo eStructure, InternalEObject eImpl, boolean eTrusted, EFeatureHints eHints) {
        //
        // Validate structure?
        //
        if(!eTrusted) {
            EFeatureStatus eStatus;
            if((eStatus = eStructure.validate(eImpl)).isFailure()) {
                throw new IllegalArgumentException(
                        "EObject implementation is not valid. " +
                        eStatus.getMessage(), eStatus.getCause());
            }
        }
        //
        // Ensure hints exists
        //
View Full Code Here

                    eParent = EFeatureUtils.eGetContainingClass(eObject);
                }       
                //
                // Validate structure against EObject instance EClass
                //
                EFeatureStatus s;
                if (!(s = eStructure.validate(ePackage, eParent)).isSuccess()) {
                    throw new IllegalArgumentException(s.getMessage(), s.getCause());
                }
                //
                // Add to verified structures
                //
                eValidSet.add(eStructure.eUID());
View Full Code Here

            EFeatureInfo eStructure,
            EObject eImpl, Feature eData) {
        //
        // Verify that given data is valid
        //
        EFeatureStatus s;
        if (!(s = eStructure.validate(eData)).isSuccess()) {
            throw new IllegalArgumentException(s.getMessage());
        }
        //
        // Prepare transformation
        //
        ESimpleFeatureAdapter eAdapter = new ESimpleFeatureAdapter();
View Full Code Here

        return new GeometryAttributeDelegate();
    }

    @Override
    protected V validate(GeometryAttribute data) {
        EFeatureStatus s;
        if (!(s = getStructure().validate(data)).isSuccess()) {
            throw new IllegalArgumentException(s.getMessage());
        }
        return eValueType.cast(data.getValue());
    }
View Full Code Here

        return eValueType.cast(data.getValue());
    }

    @Override
    protected V validate(Object value) {
        EFeatureStatus s;
        if (!(s = getStructure().validate(value)).isSuccess()) {
            throw new IllegalArgumentException(s.getMessage(), s.getCause());
        }

        // Is valid, cast to value type
        //
        return eValueType.cast(eData.getValue());
View Full Code Here

        return new AttributeDelegate();
    }

    @Override
    protected V validate(Attribute data) {
        EFeatureStatus s;
        if (!(s = getStructure().validate(data)).isSuccess()) {
            throw new IllegalArgumentException(s.getMessage());
        }
        return eValueType.cast(data.getValue());
    }
View Full Code Here

        return eValueType.cast(data.getValue());
    }

    @Override
    protected V validate(Object value) {
        EFeatureStatus s;
        if (!(s = getStructure().validate(value)).isSuccess()) {
            throw new IllegalArgumentException(s.getMessage(), s.getCause());
        }

        // Is valid, cast to value type
        //
        return eValueType.cast(eData.getValue());
View Full Code Here

TOP

Related Classes of org.geotools.data.efeature.EFeatureStatus

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.