Package com.bradmcevoy.http

Examples of com.bradmcevoy.http.CustomProperty


* @author brad
*/
public class CustomPropertySource implements PropertySource {

    public Object getProperty( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        if( prop != null ) {
            return prop.getTypedValue();
        } else {
            return null;
        }
    }
View Full Code Here


            return null;
        }
    }

    public PropertyMetaData getPropertyMetaData( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        if( prop != null ) {
            return new PropertyMetaData( PropertyAccessibility.WRITABLE, prop.getValueClass());
        } else {
            return PropertyMetaData.UNKNOWN;
        }

    }
View Full Code Here

    }


    public void setProperty( QName name, Object value, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        if( prop != null ) {
            prop.setFormattedValue( value.toString() );
        } else {
            throw new RuntimeException( "property not found: " + name.getLocalPart() );
        }
    }
View Full Code Here

            throw new RuntimeException( "property not found: " + name.getLocalPart() );
        }
    }

    public boolean hasProperty( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        return prop != null;
    }
View Full Code Here

        CustomProperty prop = lookupProperty( name, r );
        return prop != null;
    }

    public void clearProperty( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        prop.setFormattedValue( null );
    }
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.CustomProperty

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.