Tabnine Logo
Property.getDepth
Code IndexAdd Tabnine to your IDE (free)

How to use
getDepth
method
in
javax.jcr.Property

Best Java code snippets using javax.jcr.Property.getDepth (Showing top 6 results out of 315)

origin: org.apache.sling/org.apache.sling.scripting.javascript

public int jsGet_depth() {
  try {
    return property.getDepth();
  } catch (RepositoryException re) {
    return -1;
  }
}
origin: info.magnolia/magnolia-core

@Override
public int getDepth() throws RepositoryException {
  return getWrappedProperty().getDepth();
}
origin: apache/jackrabbit

/**
 * Tests if depth of a property of depth of node + 1
 */
public void testGetDepth() throws RepositoryException {
  assertEquals("getDepth() of a property of root must be 1", testRootNode.getDepth() + 1,
      property.getDepth());
}
origin: apache/jackrabbit

/**
 * Test if getting the ancestor of depth = n, where n is greater than depth
 * of this <code>Property</code>, throws an <code>ItemNotFoundException</code>.
 *
 * @throws RepositoryException
 */
public void testGetAncestorOfGreaterDepth() throws RepositoryException {
  try {
    int greaterDepth = property.getDepth() + 1;
    property.getAncestor(greaterDepth);
    fail("Getting ancestor of depth n, where n is greater than depth of" +
        "this Property must throw an ItemNotFoundException");
  } catch (ItemNotFoundException e) {
    // success
  }
}
origin: apache/jackrabbit

/**
 * Test if the ancestor at depth = n, where n is the depth of this
 * <code>Item</code>, returns this <code>Property</code> itself.
 *
 * @throws RepositoryException
 */
public void testGetAncestorOfItemDepth() throws RepositoryException {
  Property propertyAtDepth = (Property) property.getAncestor(property.getDepth());
  assertTrue("The ancestor of depth = n, where n is the depth of this " +
      "Property must be the item itself.", property.isSame(propertyAtDepth));
}
origin: info.magnolia/magnolia-core

@Test
public void testGetDepth() throws Exception {
  // GIVEN
  final MockNode root = new MockNode();
  final MockNode child = new MockNode("child");
  final MockNode childOfChild = new MockNode("childOfChild");
  final String propertyName = "prop";
  root.addNode(child);
  child.addNode(childOfChild);
  child.setProperty(propertyName, "test");
  // WHEN - in that case we don't have a real WHEN...
  // THEN - expected values set as stated in javadoc of Item#getDetph
  assertEquals(0, root.getDepth());
  assertEquals(1, child.getDepth());
  assertEquals(2, childOfChild.getDepth());
  assertEquals(2, child.getProperty(propertyName).getDepth());
}
javax.jcrPropertygetDepth

Popular methods of Property

  • getString
    Returns a String representation of the value of this property. A shortcut for Property.getValue().g
  • getValues
    Returns an array of all the values of this property. Used to access multi-value properties. The arra
  • getValue
    Returns the value of this property as a Value object. The object returned is a copy of the stored va
  • getName
  • getType
    Returns the type of this Property. One of: * PropertyType.STRING * PropertyType.BINARY * Property
  • getBinary
    Returns a Binary representation of the value of this property. A shortcut for Property.getValue().g
  • getBoolean
    Returns a boolean representation of the value of this property. A shortcut for Property.getValue().
  • remove
  • isMultiple
    Returns true if this property is multi-valued andfalse if this property is single-valued.
  • getDate
    Returns a Calendar representation of the value of this property. A shortcut for Property.getValue()
  • getLong
    Returns a long representation of the value of this property. A shortcut for Property.getValue().get
  • getDefinition
    Returns the property definition that applies to this property. In some cases there may appear to be
  • getLong,
  • getDefinition,
  • setValue,
  • getParent,
  • getPath,
  • getNode,
  • getLength,
  • getDouble,
  • getStream,
  • getSession

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now