Package org.apache.jackrabbit.spi.Path

Examples of org.apache.jackrabbit.spi.Path.Element.denotesName()


    public void testIndexedNameElement() {
        Element element = new NamePath(null, createName("test"), 123);
        assertFalse(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertTrue(element.denotesName());
        assertFalse(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertEquals(createName("test"), element.getName());
        assertEquals(123, element.getIndex());
        assertEquals(123, element.getNormalizedIndex());
View Full Code Here


    public void testParentElement() {
        Element element = ParentPath.PARENT_PATH;
        assertFalse(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertTrue(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertEquals(createName(".."), element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
View Full Code Here

    public void testRootElement() {
        Element element = RootPath.ROOT_PATH;
        assertFalse(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertFalse(element.denotesParent());
        assertTrue(element.denotesRoot());
        assertEquals(createName(""), element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
View Full Code Here

    public void testCurrentElement() {
        Element element = CurrentPath.CURRENT_PATH;
        assertTrue(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertFalse(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertEquals(createName("."), element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
View Full Code Here

    public void testIdentifierElement() {
        Element element = new IdentifierPath("test");
        assertFalse(element.denotesCurrent());
        assertTrue(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertFalse(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertNull(element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
View Full Code Here

    public void testNameElement() {
        Element element =
            new NamePath(null, createName("test"), Path.INDEX_UNDEFINED);
        assertFalse(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertTrue(element.denotesName());
        assertFalse(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertEquals(createName("test"), element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
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.