Package org.andromda.core.namespace

Examples of org.andromda.core.namespace.PropertyDefinition


                if (properties != null && properties.length > 0)
                {
                    final int numberOfProperties = properties.length;
                    for (int ctr = 0; ctr < numberOfProperties; ctr++)
                    {
                        final PropertyDefinition property = properties[ctr];
                        final String propertyName = property.getName();
                        if (Introspector.instance().isWritable(repositoryImplementation, propertyName))
                        {
                            Introspector.instance().setProperty(
                                repositoryImplementation,
                                property.getName(),
                                namespaces.getPropertyValue(
                                    namespace,
                                    property.getName()));
                        }
                    }
                }
                repositoryImplementation.open();
                this.repositories.put(
View Full Code Here


     */
    public String getPropertyValue(
        final String namespace,
        final String name)
    {
        final PropertyDefinition definition = this.getPropertyDefinition(
                namespace,
                name);
        if (definition == null)
        {
            throw new NamespacesException("Property '" + name + "' is not registered in either the '" + namespace +
                "' or '" + Namespaces.DEFAULT + "' namespaces");
        }
        final String defaultValue = definition.getDefaultValue();
        boolean warning = defaultValue == null && definition.isRequired();
        final Property property = this.getProperty(
                namespace,
                name,
                warning);
        return property != null && !property.isIgnore() ? property.getValue() : defaultValue;
View Full Code Here

    private PropertyDefinition getPropertyDefinition(
        final String namespace,
        final String name)
    {
        final NamespaceRegistry registry = this.getRegistry(namespace);
        PropertyDefinition definition = null;
        if (registry != null)
        {
            definition = registry.getPropertyDefinition(name);
        }
        if (definition == null)
View Full Code Here

TOP

Related Classes of org.andromda.core.namespace.PropertyDefinition

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.