本文整理了Java中javax.jcr.Node.hasProperties()
方法的一些代码示例,展示了Node.hasProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.hasProperties()
方法的具体详情如下:
包路径:javax.jcr.Node
类名称:Node
方法名:hasProperties
[英]Indicates whether this node has properties. Returns true
if this node has one or more properties accessible through the current Session
; false
otherwise.
[中]指示此节点是否具有属性。如果此节点有一个或多个可通过当前[$1$]访问的属性,则返回[$0$];false
否则。
代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector
/**
* @inheritDoc
*/
public boolean hasProperties() throws RepositoryException {
return node.hasProperties();
}
代码示例来源:origin: net.adamcin.oakpal/oakpal-core
@Override
public boolean hasProperties() throws RepositoryException {
return delegate.hasProperties();
}
代码示例来源:origin: net.adamcin.commons/net.adamcin.commons.jcr
public boolean hasProperties() throws RepositoryException {
return this.item.hasProperties();
}
代码示例来源:origin: apache/jackrabbit
/** {@inheritDoc} */
public boolean hasProperties() throws RepositoryException, RemoteException {
try {
return node.hasProperties();
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
代码示例来源:origin: info.magnolia/magnolia-core
@Override
public boolean hasProperties() throws RepositoryException {
return getWrappedNode().hasProperties();
}
代码示例来源:origin: nl.vpro/jcr-criteria
@Override
public boolean hasProperties() throws RepositoryException {
return getNode().hasProperties();
}
代码示例来源:origin: brix-cms/brix-cms
public Boolean execute() throws Exception {
return getDelegate().hasProperties();
}
});
代码示例来源:origin: brix-cms/brix-cms
public boolean hasProperties() throws RepositoryException {
return getDelegate().hasProperties();
}
代码示例来源:origin: com.github.livesense/org.liveSense.service.email
public boolean isEmpty() throws TemplateModelException {
try {
return !node.hasNodes() && ! node.hasProperties();
} catch (RepositoryException e) {
throw new TemplateModelException(e);
}
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework
if (node.hasNodes() || node.hasProperties()) {
emptyNode(node);
代码示例来源:origin: apache/jackrabbit
if ( this.lastNode.hasProperties() ) {
this.propertyIterator = this.lastNode.getProperties();
this.propertyIterator.hasNext();
代码示例来源:origin: info.magnolia/magnolia-4-5-migration
@Override
public void visit(Node node) throws RepositoryException {
if(node.hasProperties()){
PropertyIterator properties = new JCRMgnlPropertiesFilteringNodeWrapper(node).getProperties();
while(properties.hasNext()) {
Property property = properties.nextProperty();
if(isRedundant(property,currentPageTemplate.getName())){
//FIXME remove this condition when SCRUM-503 is solved
if(!"class".equals(property.getName())){
property.remove();
}
}
}
//Node is empty and can there for be deleted.
if(!NodeUtil.getNodes(node, NodeUtil.EXCLUDE_META_DATA_FILTER).iterator().hasNext() && !new JCRMgnlPropertiesFilteringNodeWrapper(node).getProperties().hasNext()) {
emptyNodesPaths.add(node.getPath());
}
}
}
};
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons
if ( this.lastNode.hasProperties() ) {
this.propertyIterator = this.lastNode.getProperties();
this.propertyIterator.hasNext();
代码示例来源:origin: org.apache.jackrabbit/com.springsource.org.apache.jackrabbit.commons
if ( this.lastNode.hasProperties() ) {
this.propertyIterator = this.lastNode.getProperties();
this.propertyIterator.hasNext();
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
if ( this.lastNode.hasProperties() ) {
this.propertyIterator = this.lastNode.getProperties();
this.propertyIterator.hasNext();
代码示例来源:origin: apache/jackrabbit
/**
* Test if hasProperty() returns true if any property exists or false if
* not. Tested node: root
*
* @throws RepositoryException
*/
public void testHasProperties() throws RepositoryException {
Node node = testRootNode;
PropertyIterator properties = node.getProperties();
int i = 0;
while (properties.hasNext()) {
Property p = properties.nextProperty();
log.println(p.getName());
i++;
}
if (i == 0) {
assertFalse("Must return false when no properties exist",
node.hasProperties());
} else {
assertTrue("Must return true when one or more properties exist",
node.hasProperties());
}
}
代码示例来源:origin: apache/jackrabbit-oak
@Test
public void transientChanges() throws RepositoryException {
Node parentNode = getNode(TEST_PATH);
Node node = parentNode.addNode("test");
assertFalse(node.hasProperty("p"));
node.setProperty("p", "pv");
assertTrue(node.hasProperty("p"));
assertFalse(node.hasNode("n"));
node.addNode("n");
assertTrue(node.hasNode("n"));
assertTrue(node.hasProperties());
assertTrue(node.hasNodes());
}
代码示例来源:origin: apache/jackrabbit
if (!node.hasProperties()) {
fail("Root node must always have at least one property: jcr:primaryType");
代码示例来源:origin: apache/jackrabbit
if (!node.hasProperties()) {
fail("Root node must always have at least one property: jcr:primaryType");
代码示例来源:origin: apache/jackrabbit
if (node.hasProperties()) {
if (skipBinary) {
PropertyIterator iter = node.getProperties();
内容来源于网络,如有侵权,请联系作者删除!