javax.jcr.Node.hasProperties()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(246)

本文整理了Java中javax.jcr.Node.hasProperties()方法的一些代码示例,展示了Node.hasProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.hasProperties()方法的具体详情如下:
包路径:javax.jcr.Node
类名称:Node
方法名:hasProperties

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

  1. /**
  2. * @inheritDoc
  3. */
  4. public boolean hasProperties() throws RepositoryException {
  5. return node.hasProperties();
  6. }

代码示例来源:origin: net.adamcin.oakpal/oakpal-core

  1. @Override
  2. public boolean hasProperties() throws RepositoryException {
  3. return delegate.hasProperties();
  4. }

代码示例来源:origin: net.adamcin.commons/net.adamcin.commons.jcr

  1. public boolean hasProperties() throws RepositoryException {
  2. return this.item.hasProperties();
  3. }

代码示例来源:origin: apache/jackrabbit

  1. /** {@inheritDoc} */
  2. public boolean hasProperties() throws RepositoryException, RemoteException {
  3. try {
  4. return node.hasProperties();
  5. } catch (RepositoryException ex) {
  6. throw getRepositoryException(ex);
  7. }
  8. }

代码示例来源:origin: info.magnolia/magnolia-core

  1. @Override
  2. public boolean hasProperties() throws RepositoryException {
  3. return getWrappedNode().hasProperties();
  4. }

代码示例来源:origin: nl.vpro/jcr-criteria

  1. @Override
  2. public boolean hasProperties() throws RepositoryException {
  3. return getNode().hasProperties();
  4. }

代码示例来源:origin: brix-cms/brix-cms

  1. public Boolean execute() throws Exception {
  2. return getDelegate().hasProperties();
  3. }
  4. });

代码示例来源:origin: brix-cms/brix-cms

  1. public boolean hasProperties() throws RepositoryException {
  2. return getDelegate().hasProperties();
  3. }

代码示例来源:origin: com.github.livesense/org.liveSense.service.email

  1. public boolean isEmpty() throws TemplateModelException {
  2. try {
  3. return !node.hasNodes() && ! node.hasProperties();
  4. } catch (RepositoryException e) {
  5. throw new TemplateModelException(e);
  6. }
  7. }

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

  1. if (node.hasNodes() || node.hasProperties()) {
  2. emptyNode(node);

代码示例来源:origin: apache/jackrabbit

  1. if ( this.lastNode.hasProperties() ) {
  2. this.propertyIterator = this.lastNode.getProperties();
  3. this.propertyIterator.hasNext();

代码示例来源:origin: info.magnolia/magnolia-4-5-migration

  1. @Override
  2. public void visit(Node node) throws RepositoryException {
  3. if(node.hasProperties()){
  4. PropertyIterator properties = new JCRMgnlPropertiesFilteringNodeWrapper(node).getProperties();
  5. while(properties.hasNext()) {
  6. Property property = properties.nextProperty();
  7. if(isRedundant(property,currentPageTemplate.getName())){
  8. //FIXME remove this condition when SCRUM-503 is solved
  9. if(!"class".equals(property.getName())){
  10. property.remove();
  11. }
  12. }
  13. }
  14. //Node is empty and can there for be deleted.
  15. if(!NodeUtil.getNodes(node, NodeUtil.EXCLUDE_META_DATA_FILTER).iterator().hasNext() && !new JCRMgnlPropertiesFilteringNodeWrapper(node).getProperties().hasNext()) {
  16. emptyNodesPaths.add(node.getPath());
  17. }
  18. }
  19. }
  20. };

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons

  1. if ( this.lastNode.hasProperties() ) {
  2. this.propertyIterator = this.lastNode.getProperties();
  3. this.propertyIterator.hasNext();

代码示例来源:origin: org.apache.jackrabbit/com.springsource.org.apache.jackrabbit.commons

  1. if ( this.lastNode.hasProperties() ) {
  2. this.propertyIterator = this.lastNode.getProperties();
  3. this.propertyIterator.hasNext();

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

  1. if ( this.lastNode.hasProperties() ) {
  2. this.propertyIterator = this.lastNode.getProperties();
  3. this.propertyIterator.hasNext();

代码示例来源:origin: apache/jackrabbit

  1. /**
  2. * Test if hasProperty() returns true if any property exists or false if
  3. * not. Tested node: root
  4. *
  5. * @throws RepositoryException
  6. */
  7. public void testHasProperties() throws RepositoryException {
  8. Node node = testRootNode;
  9. PropertyIterator properties = node.getProperties();
  10. int i = 0;
  11. while (properties.hasNext()) {
  12. Property p = properties.nextProperty();
  13. log.println(p.getName());
  14. i++;
  15. }
  16. if (i == 0) {
  17. assertFalse("Must return false when no properties exist",
  18. node.hasProperties());
  19. } else {
  20. assertTrue("Must return true when one or more properties exist",
  21. node.hasProperties());
  22. }
  23. }

代码示例来源:origin: apache/jackrabbit-oak

  1. @Test
  2. public void transientChanges() throws RepositoryException {
  3. Node parentNode = getNode(TEST_PATH);
  4. Node node = parentNode.addNode("test");
  5. assertFalse(node.hasProperty("p"));
  6. node.setProperty("p", "pv");
  7. assertTrue(node.hasProperty("p"));
  8. assertFalse(node.hasNode("n"));
  9. node.addNode("n");
  10. assertTrue(node.hasNode("n"));
  11. assertTrue(node.hasProperties());
  12. assertTrue(node.hasNodes());
  13. }

代码示例来源:origin: apache/jackrabbit

  1. if (!node.hasProperties()) {
  2. fail("Root node must always have at least one property: jcr:primaryType");

代码示例来源:origin: apache/jackrabbit

  1. if (!node.hasProperties()) {
  2. fail("Root node must always have at least one property: jcr:primaryType");

代码示例来源:origin: apache/jackrabbit

  1. if (node.hasProperties()) {
  2. if (skipBinary) {
  3. PropertyIterator iter = node.getProperties();

相关文章