Examples of NameMapper


Examples of org.apache.commons.betwixt.strategy.NameMapper

     * @param configuration IntrospectionConfiguration, not null
     */
    private void configureDescriptor(
        NodeDescriptor descriptor,
        IntrospectionConfiguration configuration) {
        NameMapper nameMapper = configuration.getElementNameMapper();
        if (descriptor instanceof AttributeDescriptor) {
            // we want to use the attributemapper only when it is an attribute..
            nameMapper = configuration.getAttributeNameMapper();
       
        }          
        descriptor.setLocalName( nameMapper.mapTypeToElementName( propertyName ));
        descriptor.setPropertyName( getPropertyName() );
        descriptor.setPropertyType( getPropertyType() );
    }
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.NameMapper

       
       
        if ( configuration.isWrapCollectionsInElement() ) {
            ElementDescriptor wrappingDescriptor = new ElementDescriptor();
            wrappingDescriptor.setElementDescriptors( new ElementDescriptor[] { entryDescriptor } );
            NameMapper nameMapper = configuration.getElementNameMapper();  
            wrappingDescriptor.setLocalName( nameMapper.mapTypeToElementName( propertyName ));          
            result = wrappingDescriptor;
                       
        } else {
            result = entryDescriptor;
        }
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.NameMapper

     * @param configuration IntrospectionConfiguration, not null
     */
    private void configureDescriptor(
        NodeDescriptor descriptor,
        IntrospectionConfiguration configuration) {
        NameMapper nameMapper = configuration.getElementNameMapper();
        if (descriptor instanceof AttributeDescriptor) {
            // we want to use the attributemapper only when it is an attribute..
            nameMapper = configuration.getAttributeNameMapper();
       
        }          
        descriptor.setLocalName( nameMapper.mapTypeToElementName( propertyName ));
        descriptor.setPropertyName( getPropertyName() );
        descriptor.setPropertyType( getPropertyType() );
    }
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.NameMapper

       
       
        if ( configuration.isWrapCollectionsInElement() ) {
            ElementDescriptor wrappingDescriptor = new ElementDescriptor();
            wrappingDescriptor.setElementDescriptors( new ElementDescriptor[] { entryDescriptor } );
            NameMapper nameMapper = configuration.getElementNameMapper();  
            wrappingDescriptor.setLocalName( nameMapper.mapTypeToElementName( propertyName ));          
            result = wrappingDescriptor;
                       
        } else {
            result = entryDescriptor;
        }
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.NameMapper

    private XMLIntrospector createXMLIntrospector()
    {
        XMLIntrospector introspector = new XMLIntrospector();

        introspector.setAttributesForPrimitives(false);
        NameMapper mapper = new DecapitalizeNameMapper();       
        introspector.setElementNameMapper(mapper);
        introspector.setAttributeNameMapper(mapper);
       
        introspector.setPluralStemmer(new DefaultPluralStemmer());
View Full Code Here

Examples of org.apache.jackrabbit.oak.namepath.NameMapper

    private AccessControlManagerImpl getTestAccessControlManager() throws Exception {
        return new AccessControlManagerImpl(getTestRoot(), getNamePathMapper(), getSecurityProvider());
    }

    private NamePathMapper getLocalNamePathMapper() {
        NameMapper remapped = new TestNameMapper(nameMapper, TestNameMapper.LOCAL_MAPPING);
        return new NamePathMapperImpl(remapped);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.namepath.NameMapper

        return aggr.toArray(new Privilege[aggr.size()]);
    }

    @Test
    public void testGetPath() {
        NameMapper nameMapper = new GlobalNameMapper() {
            @Override
            protected Map<String, String> getNamespaceMap() {
                return Collections.singletonMap("jr", "http://jackrabbit.apache.org");
            }
        };
View Full Code Here

Examples of org.apache.jackrabbit.oak.namepath.NameMapper

    private AccessControlManagerImpl getTestAccessControlManager() throws Exception {
        return new AccessControlManagerImpl(getTestRoot(), getNamePathMapper(), getSecurityProvider());
    }

    private NamePathMapper getLocalNamePathMapper() {
        NameMapper remapped = new TestNameMapper(nameMapper, TestNameMapper.LOCAL_MAPPING);
        return new NamePathMapperImpl(remapped);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.namepath.NameMapper

        return aggr.toArray(new Privilege[aggr.size()]);
    }

    @Test
    public void testGetPath() {
        NameMapper nameMapper = new TestGlobalNameMapper(Collections.singletonMap("jr", "http://jackrabbit.apache.org"));
        NamePathMapper npMapper = new NamePathMapperImpl(nameMapper);

        // map of jcr-path to standard jcr-path
        Map<String, String> paths = new HashMap<String, String>();
        paths.put(null, null);
View Full Code Here

Examples of org.apache.jackrabbit.oak.namepath.NameMapper

    private AccessControlManagerImpl getTestAccessControlManager() throws Exception {
        return new AccessControlManagerImpl(getTestRoot(), getNamePathMapper(), getSecurityProvider());
    }

    private NamePathMapper getLocalNamePathMapper() {
        NameMapper remapped = new TestNameMapper(nameMapper, TestNameMapper.LOCAL_MAPPING);
        return new NamePathMapperImpl(remapped);
    }
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.