本文整理了Java中javax.jcr.Item.getName()
方法的一些代码示例,展示了Item.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Item.getName()
方法的具体详情如下:
包路径:javax.jcr.Item
类名称:Item
方法名:getName
[英]Returns the name of this Item
in qualified form. If this Item
is the root node of the workspace, an empty string is returned.
[中]以限定形式返回此Item
的名称。如果此Item
是工作区的根节点,则返回空字符串。
代码示例来源:origin: org.apache.jackrabbit.vault/vault-cli
public String getName() {
try {
return item.getName();
} catch (RepositoryException e) {
return "";
}
}
}
代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector
/** {@inheritDoc} */
public String getName() throws RepositoryException {
return item.getName();
}
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons
/**
* Returns <code>true</code> if the name of the given item is equal to
* the configured name.
* @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item)
*/
@Override
protected boolean matches(Item item) throws RepositoryException {
return item.getName().equals(name);
}
}
代码示例来源:origin: apache/jackrabbit
/**
* Returns <code>true</code> if the name of the given item is equal to
* the configured name.
* @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item)
*/
@Override
protected boolean matches(Item item) throws RepositoryException {
return item.getName().equals(name);
}
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
/**
* Returns <code>true</code> if the name of the given item is equal to
* the configured name.
* @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item)
*/
@Override
protected boolean matches(Item item) throws RepositoryException {
return item.getName().equals(name);
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr
public boolean isSame(Item item) throws RepositoryException {
boolean isSame = false;
if (name.equals(item.getName())) {
isSame = true;
}
return isSame;
}
代码示例来源:origin: org.apache.jackrabbit/com.springsource.org.apache.jackrabbit.commons
/**
* Returns <code>true</code> if the name of the given item is equal to
* the configured name.
* @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item)
*/
protected boolean matches(Item item) throws RepositoryException {
return item.getName().equals(name);
}
}
代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault
/**
* {@inheritDoc}
*
* Returns {@code true} if the name of the given item is equal to
* the configured name.
*/
public boolean matches(Item item) throws RepositoryException {
return item.getName().equals(name);
}
代码示例来源:origin: io.wcm/io.wcm.testing.jcr-mock
@Override
public boolean accept(final Item item) throws RepositoryException {
return (item instanceof Property) && pattern.matcher(item.getName()).matches();
}
});
代码示例来源:origin: io.wcm/io.wcm.testing.jcr-mock
@Override
public boolean accept(final Item item) throws RepositoryException {
return (item instanceof Node) && pattern.matcher(item.getName()).matches();
}
});
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons
public int compare(Item i1, Item i2) {
try {
return BTreeManager.this.order.compare(i1.getName(), i2.getName());
}
catch (RepositoryException e) {
throw new WrappedRepositoryException(e);
}
}
};
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
public int compare(Item i1, Item i2) {
try {
return BTreeManager.this.order.compare(i1.getName(), i2.getName());
}
catch (RepositoryException e) {
throw new WrappedRepositoryException(e);
}
}
};
代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault
public int compare(Item o1, Item o2) {
try {
// sort namespaced first
String n1 = o1.getName();
String n2 = o2.getName();
return AttributeNameComparator.INSTANCE.compare(n1, n2);
} catch (RepositoryException e) {
throw new IllegalStateException(e);
}
}
}
代码示例来源:origin: apache/jackrabbit
public int compare(Item i1, Item i2) {
try {
return BTreeManager.this.order.compare(i1.getName(), i2.getName());
}
catch (RepositoryException e) {
throw new WrappedRepositoryException(e);
}
}
};
代码示例来源:origin: apache/jackrabbit
/** {@inheritDoc} */
public String getName() throws RepositoryException, RemoteException {
try {
return item.getName();
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
代码示例来源:origin: org.exoplatform.jcr/exo.jcr.component.core
public boolean accept(Item item) throws RepositoryException
{
String name = item.getName();
// boolean result = false;
for (int i = 0; i < expressions.size(); i++)
{
String expr = (String)expressions.get(i);
if (estimate(name, expr))
return true;
}
return false;
}
代码示例来源:origin: org.onehippo.cms7/hippo-cms-api
private void addTemplate(JcrItemModel model) throws RepositoryException {
Item item = (Item) model.getObject();
String name = item.getName();
Set<String> excluded = descriptor.getExcluded();
if (excluded == null || !excluded.contains(name)) {
elements.addLast(new JcrNodeModel(model));
}
}
}
代码示例来源:origin: apache/jackrabbit
/**
*
* @param item
* @return
*/
private boolean isFilteredNamespace(Item item) {
try {
return isFilteredNamespace(item.getName(), item.getSession());
} catch (RepositoryException e) {
log.warn(e.getMessage());
}
return false;
}
代码示例来源:origin: org.onehippo.cms7/hippo-addon-channel-manager-content-service
private static void eraseDocument(final String uuid, final FolderWorkflow folderWorkflow, final Item handle) throws InternalServerErrorException, NotFoundException, MethodNotAllowed {
try {
log.info("Erasing document '{}'", uuid);
folderWorkflow.delete(handle.getName());
} catch (WorkflowException | RepositoryException | RemoteException e) {
log.warn("Failed to erase document '{}'", uuid, e);
throw new InternalServerErrorException(new ErrorInfo(Reason.SERVER_ERROR));
}
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void testGetJcrItemIsEscaped() throws Exception {
// GIVEN
ContentDecorator decorator = new HTMLEscapingContentDecorator(false);
JcrNodeAdapter nodeAdapter = mock(JcrNodeAdapter.class);
when(nodeAdapter.getJcrItem()).thenReturn(node);
when(nodeAdapter.isNode()).thenReturn(true);
when(table.getItem(itemId)).thenReturn(nodeAdapter);
// WHEN
javax.jcr.Item value = abstractColumnFormatter.getJcrItem(table, itemId);
// THEN
assertThat(decorator.wrapNode(node).getName(), is(value.getName()));
}
内容来源于网络,如有侵权,请联系作者删除!