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

How to use
getPath
method
in
javax.jcr.Property

Best Java code snippets using javax.jcr.Property.getPath (Showing top 20 results out of 378)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: org.onehippo.cms7/hippo-cms-api

public JarExpander(Node node) throws RepositoryException {
  this.node = node;
  prop = node.getProperty("jcr:data");
  path = prop.getPath();
}
origin: org.apache.sling/org.apache.sling.scripting.javascript

public String jsGet_path() {
  try {
    return property.getPath();
  } catch (RepositoryException e) {
    return property.toString();
  }
}
origin: Adobe-Consulting-Services/acs-aem-commons

PageCompareDataLineImpl(Property property, String basePath, int depth) throws RepositoryException {
  this.path = property.getPath().replace(basePath, "");
  this.name = property.getName();
  this.value = EvolutionConfig.printProperty(property);
  this.depth = depth;
}
origin: org.fcrepo/fcrepo-kernel-modeshape

  @Override
  public String getExternalIdentifier() {
    try {
      return "/" + FileSystemConnector.class.getName() + ":projections:" + property().getPath();
    } catch (final RepositoryException e) {
      throw new RepositoryRuntimeException(e);
    }
  }
}
origin: apache/jackrabbit

protected void setUp() throws Exception {
  super.setUp();
  Node n = testRootNode.addNode(nodeName1, testNodeType);
  testNodePath = n.getPath();
  Value v = getJcrValue(superuser, RepositoryStub.PROP_PROP_VALUE1, RepositoryStub.PROP_PROP_TYPE1, "test");
  Property p = n.setProperty(propertyName1, v);
  testPropertyPath = p.getPath();
  testRootNode.getSession().save();
  readOnlySession = getHelper().getReadOnlySession();
}
origin: apache/jackrabbit

/**
 * Tests if getPath() returns the correct path.
 */
public void testGetPath()
    throws NotExecutableException, RepositoryException {
  assertEquals("getPath returns wrong result",
      testRoot + "/" + property.getName(),
      property.getPath());
}
origin: apache/jackrabbit

/**
 * Test if Item.isNew() returns true direct after a new PropertyItem is set
 * (before node is saved (transient)).
 *
 * @see javax.jcr.Item#isNew()
 */
public void testTransientPropertyItemIsNew () throws RepositoryException {
  Property testProperty = testNode.setProperty(propertyName1, "test");
  Item testPropertyItem = superuser.getItem(testProperty.getPath());
  // check testPropertyItem.isNew() before save
  assertTrue("Item.isNew() must return true directly after a new Property is set (before current node is saved)", testPropertyItem.isNew());
}
origin: Adobe-Consulting-Services/acs-aem-commons

public CurrentEvolutionEntryImpl(Property property, EvolutionConfig config) {
  try {
    this.config = config;
    this.type = EvolutionEntryType.PROPERTY;
    this.name = property.getName();
    this.depth = EvolutionPathUtil.getLastDepthForPath(property.getPath());
    this.path = property.getParent().getName();
    this.value = config.printProperty(property);
  } catch (Exception e) {
    log.error("Could not inititalize VersionEntry", e);
  }
}
origin: apache/jackrabbit

public void testSingleValueWithName() throws RepositoryException {
  Value weakRef = vf.createValue(target, true);
  referring.setProperty(propertyName1, weakRef);
  superuser.save();
  PropertyIterator it = target.getWeakReferences(propertyName1);
  assertTrue("no weak references returned", it.hasNext());
  Property p = it.nextProperty();
  assertEquals("wrong weak reference property", referring.getProperty(propertyName1).getPath(), p.getPath());
  assertFalse("no more weak references expected", it.hasNext());
}
origin: apache/jackrabbit

public void testMultiValues() throws RepositoryException {
  Value weakRef = vf.createValue(target, true);
  Value[] refs = new Value[]{weakRef, weakRef};
  referring.setProperty(propertyName1, refs);
  superuser.save();
  PropertyIterator it = target.getWeakReferences();
  assertTrue("no weak references returned", it.hasNext());
  Property p = it.nextProperty();
  assertEquals("wrong weak reference property", referring.getProperty(propertyName1).getPath(), p.getPath());
  assertFalse("no more weak references expected", it.hasNext());
}
origin: apache/jackrabbit

public void testMultiValuesWithName() throws RepositoryException {
  Value weakRef = vf.createValue(target, true);
  Value[] refs = new Value[]{weakRef, weakRef};
  referring.setProperty(propertyName1, refs);
  superuser.save();
  PropertyIterator it = target.getWeakReferences(propertyName1);
  assertTrue("no weak references returned", it.hasNext());
  Property p = it.nextProperty();
  assertEquals("wrong weak reference property", referring.getProperty(propertyName1).getPath(), p.getPath());
  assertFalse("no more weak references expected", it.hasNext());
}
origin: apache/jackrabbit-oak

@Test
public void testRootPropertyPath() throws RepositoryException {
  Property property = getAdminSession().getRootNode().getProperty("jcr:primaryType");
  assertEquals("/jcr:primaryType", property.getPath());
}

origin: apache/jackrabbit-oak

  private static Set<String> getReferencingPaths(Node n)
      throws RepositoryException {
    Set<String> refs = Sets.newHashSet();
    PropertyIterator it = n.getReferences();
    while (it.hasNext()) {
      refs.add(it.nextProperty().getPath());
    }
    return refs;
  }
}
origin: apache/jackrabbit-oak

private static void checkReferences(String msg, PropertyIterator refs, String ... expected) throws RepositoryException {
  List<String> paths = new LinkedList<String>();
  while (refs.hasNext()) {
    paths.add(refs.nextProperty().getPath());
  }
  checkEquals(msg, paths, expected);
}
origin: apache/jackrabbit

public void testTransientRententionPolicy2() throws RepositoryException, NotExecutableException {
  retentionMgr.setRetentionPolicy(testNodePath, getApplicableRetentionPolicy());
  assertNoEffect((Node) otherS.getItem(testNodePath), nodeName3, propertyName2);
  assertNoEffect((Node) otherS.getItem(childN.getPath()), nodeName3, propertyName2);
  assertNoEffect((Property) otherS.getItem(childP.getPath()));
}
origin: apache/jackrabbit

  public NodeIterator execute() throws Exception {
    Node n = getNode();
    String value = getRandomText(5);
    String path = n.setProperty(name, value).getPath();
    log.info(path + ": " + value);
    return wrapWithIterator(getNode());
  }
}
origin: ModeShape/modeshape

private RestProperty createRestProperty( Session session,
                     Property property,
                     String baseUrl ) throws RepositoryException {
  List<String> values = restPropertyValues(property, baseUrl, session);
  String url = RestHelper.urlFrom(baseUrl, ITEMS_METHOD_NAME, encodedPath(property.getPath()));
  String parentUrl = RestHelper.urlFrom(baseUrl, ITEMS_METHOD_NAME, encodedPath(property.getParent().getPath()));
  boolean multiValued = property.isMultiple();
  return new RestProperty(property.getName(), url, parentUrl, values, multiValued);
}
origin: apache/jackrabbit

public void testGetPropertyOrNullExisting() throws RepositoryException {
  JackrabbitSession js = (JackrabbitSession) superuser;
  Property property = js.getPropertyOrNull(PATH_EXISTING_PROPERTY);
  assertNotNull(property);
  assertEquals(property.getPath(), PATH_EXISTING_PROPERTY);
}
origin: apache/jackrabbit-oak

@Test
public void accessRemovedProperty() throws RepositoryException {
  Node foo = getNode("/foo");
  Property p = foo.setProperty("name", "value");
  p.remove();
  try {
    p.getPath();
    fail("Expected InvalidItemStateException");
  }
  catch (InvalidItemStateException expected) {
  }
}
origin: apache/jackrabbit-oak

@Test
public void getProperty() throws RepositoryException {
  Property property = getProperty("/foo/stringProp");
  assertNotNull(property);
  assertEquals("stringProp", property.getName());
  assertEquals("/foo/stringProp", property.getPath());
  Value value = property.getValue();
  assertNotNull(value);
  assertEquals(PropertyType.STRING, value.getType());
  assertEquals("stringVal", value.getString());
}
javax.jcrPropertygetPath

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,
  • getNode,
  • getLength,
  • getDouble,
  • getStream,
  • getSession

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Runner (org.openjdk.jmh.runner)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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