Search in sources :

Example 1 with ParsingPathResolver

use of org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver in project jackrabbit by apache.

the class EventState method setupCachingPathResolver.

private static void setupCachingPathResolver() {
    if (cachingPathResolver != null) {
        return;
    }
    PathResolver pathResolver = new ParsingPathResolver(PathFactoryImpl.getInstance(), new NameResolver() {

        public Name getQName(String name) throws IllegalNameException, NamespaceException {
            return null;
        }

        public String getJCRName(Name name) throws NamespaceException {
            return name.getLocalName();
        }
    });
    cachingPathResolver = new CachingPathResolver(pathResolver);
}
Also used : NamespaceException(javax.jcr.NamespaceException) CachingPathResolver(org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver) PathResolver(org.apache.jackrabbit.spi.commons.conversion.PathResolver) ParsingPathResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver) IllegalNameException(org.apache.jackrabbit.spi.commons.conversion.IllegalNameException) ParsingPathResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver) NameResolver(org.apache.jackrabbit.spi.commons.conversion.NameResolver) Name(org.apache.jackrabbit.spi.Name) CachingPathResolver(org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver)

Example 2 with ParsingPathResolver

use of org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver in project jackrabbit by apache.

the class NamePathResolverImpl method create.

public static NamePathResolver create(NamespaceMappings nsMappings) {
    NameResolver nResolver = new NameResolverImpl(nsMappings);
    PathResolver pResolver = new ParsingPathResolver(PATH_FACTORY, nResolver);
    return new NamePathResolverImpl(nResolver, pResolver);
}
Also used : NamePathResolver(org.apache.jackrabbit.spi.commons.conversion.NamePathResolver) PathResolver(org.apache.jackrabbit.spi.commons.conversion.PathResolver) ParsingPathResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver) DefaultNamePathResolver(org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver) NameResolver(org.apache.jackrabbit.spi.commons.conversion.NameResolver) ParsingPathResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver)

Example 3 with ParsingPathResolver

use of org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver in project jackrabbit by apache.

the class ValueFormatTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    idResolver = new IdentifierResolver() {

        public Path getPath(String identifier) throws MalformedPathException {
            throw new UnsupportedOperationException();
        }

        public void checkFormat(String identifier) throws MalformedPathException {
        // nop
        }
    };
    NameResolver nResolver = new ParsingNameResolver(NameFactoryImpl.getInstance(), new DummyNamespaceResolver());
    PathResolver pResolver = new ParsingPathResolver(PathFactoryImpl.getInstance(), nResolver, idResolver);
    resolver = new DefaultNamePathResolver(nResolver, pResolver);
    qvFactory = QValueFactoryImpl.getInstance();
    vFactory = new ValueFactoryQImpl(qvFactory, resolver);
}
Also used : IdentifierResolver(org.apache.jackrabbit.spi.commons.conversion.IdentifierResolver) Path(org.apache.jackrabbit.spi.Path) ParsingNameResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver) DummyNamespaceResolver(org.apache.jackrabbit.spi.commons.conversion.DummyNamespaceResolver) MalformedPathException(org.apache.jackrabbit.spi.commons.conversion.MalformedPathException) NamePathResolver(org.apache.jackrabbit.spi.commons.conversion.NamePathResolver) PathResolver(org.apache.jackrabbit.spi.commons.conversion.PathResolver) ParsingPathResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver) DefaultNamePathResolver(org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver) DefaultNamePathResolver(org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver) NameResolver(org.apache.jackrabbit.spi.commons.conversion.NameResolver) ParsingNameResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver) ParsingPathResolver(org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver)

Aggregations

NameResolver (org.apache.jackrabbit.spi.commons.conversion.NameResolver)3 ParsingPathResolver (org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver)3 PathResolver (org.apache.jackrabbit.spi.commons.conversion.PathResolver)3 DefaultNamePathResolver (org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver)2 NamePathResolver (org.apache.jackrabbit.spi.commons.conversion.NamePathResolver)2 NamespaceException (javax.jcr.NamespaceException)1 Name (org.apache.jackrabbit.spi.Name)1 Path (org.apache.jackrabbit.spi.Path)1 CachingPathResolver (org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver)1 DummyNamespaceResolver (org.apache.jackrabbit.spi.commons.conversion.DummyNamespaceResolver)1 IdentifierResolver (org.apache.jackrabbit.spi.commons.conversion.IdentifierResolver)1 IllegalNameException (org.apache.jackrabbit.spi.commons.conversion.IllegalNameException)1 MalformedPathException (org.apache.jackrabbit.spi.commons.conversion.MalformedPathException)1 ParsingNameResolver (org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver)1