Package org.apache.jackrabbit.oak.namepath

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


            @Override
            protected Map<String, String> getNamespaceMap() {
                return 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);
        paths.put(getTestPath(), getTestPath());
View Full Code Here


        }
    }

    @Test
    public void testGetOakPath() {
        NamePathMapper npMapper = new NamePathMapperImpl(new TestNameMapper());
        // map of jcr-path to oak path
        Map<String, String> paths = new HashMap<String, String>();
        paths.put(null, null);
        paths.put(getTestPath(), getTestPath());
        paths.put("/", "/");
View Full Code Here

    @Before
    public void before() throws Exception {
        super.before();

        registerNamespace(TestNameMapper.TEST_PREFIX, TestNameMapper.TEST_URI);
        NamePathMapper npMapper = new NamePathMapperImpl(new TestNameMapper(Namespaces.getNamespaceMap(root.getTree("/")), TestNameMapper.LOCAL_MAPPING));

        name = TestNameMapper.TEST_PREFIX + ":defName";
        PropertyState property = createProperty(name);
        restriction = new RestrictionImpl(property, true, npMapper);
    }
View Full Code Here

    @Before
    public void before() throws Exception {
        super.before();

        registerNamespace(TestNameMapper.TEST_PREFIX, TestNameMapper.TEST_URI);
        NamePathMapper npMapper = new NamePathMapperImpl(new TestNameMapper(Namespaces.getNamespaceMap(root.getTree("/")), TestNameMapper.LOCAL_MAPPING));

        name = TestNameMapper.TEST_PREFIX + ":defName";
        definition = new RestrictionDefinitionImpl(name, PropertyType.NAME, true, npMapper);
    }
View Full Code Here

            protected Root getWriteRoot() {
                return root;
            }
        };

        this.vf = new ValueFactoryImpl(null, new NamePathMapperImpl(
                new GlobalNameMapper() {
                    @Override
                    protected Map<String, String> getNamespaceMap() {
                        return Namespaces.getNamespaceMap(root.getTree("/"));
                    }
View Full Code Here

                return Namespaces.getNamespaceMap(root.getTree("/"));
            }
        };
        this.session = new SessionImpl(this, namespaces);
        this.idManager = new IdentifierManager(root);
        this.namePathMapper = new NamePathMapperImpl(mapper, idManager);
        this.valueFactory = new ValueFactoryImpl(root.getBlobFactory(), namePathMapper);
    }
View Full Code Here

    @Override
    public Validator getRootValidator(NodeState before, final NodeState after) {
        ReadOnlyNodeTypeManager ntm =
                ReadOnlyNodeTypeManager.getInstance(after);
        final ReadOnlyTree root = new ReadOnlyTree(after);
        NamePathMapper mapper = new NamePathMapperImpl(new GlobalNameMapper() {
            @Override
            protected Map<String, String> getNamespaceMap() {
                return Namespaces.getNamespaceMap(root);
            }
        });
View Full Code Here

            @Override
            protected Map<String, String> getNamespaceMap() {
                return 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);
        paths.put(getTestPath(), getTestPath());
View Full Code Here

        }
    }

    @Test
    public void testGetOakPath() {
        NamePathMapper npMapper = new NamePathMapperImpl(new TestNameMapper());
        // map of jcr-path to oak path
        Map<String, String> paths = new HashMap<String, String>();
        paths.put(null, null);
        paths.put(getTestPath(), getTestPath());
        paths.put("/", "/");
View Full Code Here

    @Before
    public void before() throws Exception {
        super.before();

        registerNamespace(TestNameMapper.TEST_PREFIX, TestNameMapper.TEST_URI);
        NamePathMapper npMapper = new NamePathMapperImpl(new TestNameMapper(Namespaces.getNamespaceMap(root.getTree("/")), TestNameMapper.LOCAL_MAPPING));

        name = TestNameMapper.TEST_PREFIX + ":defName";
        PropertyState property = createProperty(name);
        restriction = new RestrictionImpl(property, true, npMapper);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.namepath.NamePathMapperImpl

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.