/** * @return a List of the immediate children of this tag * @throws RulesRepositoryException */ public List getChildTags() throws RulesRepositoryException { List children = new ArrayList(); try { NodeIterator it = this.node.getNodes(); while (it.hasNext()) { Node currentNode = it.nextNode(); children.add(new CategoryItem(this.rulesRepository, currentNode)); } } catch (Exception e) { log.error("Caught Exception: " + e); throw new RulesRepositoryException(e); } return children; }
/** * @return a List of the immediate children of this tag * @throws RulesRepositoryException */ public List getChildTags() throws RulesRepositoryException { List children = new ArrayList(); try { NodeIterator it = this.node.getNodes(); while (it.hasNext()) { Node currentNode = it.nextNode(); children.add(new CategoryItem(this.rulesRepository, currentNode)); } } catch (Exception e) { log.error("Caught Exception: " + e); throw new RulesRepositoryException(e); } return children; }
CategoryItem myShoesItem = new CategoryItem();
private void addTag(Accum ac, String tag) throws RepositoryException { try { Node tagNode = this.node.getSession().getNodeByIdentifier( tag ); CategoryItem tagItem = new CategoryItem( this.rulesRepository, tagNode ); ac.add(tagItem); } catch (ItemNotFoundException e) { //ignore log.debug( "Was unable to load a category by UUID - must have been removed." ); } }
private void addTag(Accum ac, String tag) throws RepositoryException { try { Node tagNode = this.node.getSession().getNodeByIdentifier( tag ); CategoryItem tagItem = new CategoryItem( this.rulesRepository, tagNode ); ac.add(tagItem); } catch (ItemNotFoundException e) { //ignore log.debug( "Was unable to load a category by UUID - must have been removed." ); } }
CategoryItem temp = new CategoryItem(); temp.SETcategorystring(line); categories.add(temp.getcategoryString().toString());
/** * This will create a child category under this one */ public CategoryItem addCategory(String name, String description) { try { String nodePath = NodeUtils.makeJSR170ComplaintName(name); Node child = this.node.addNode(nodePath, CategoryItem.TAG_NODE_TYPE_NAME); this.rulesRepository.getSession().save(); return new CategoryItem(this.rulesRepository, child); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new RulesRepositoryException(e); } } }
/** * This will create a child category under this one */ public CategoryItem addCategory(String name, String description) { try { String nodePath = NodeUtils.makeJSR170ComplaintName(name); Node child = this.node.addNode(nodePath, CategoryItem.TAG_NODE_TYPE_NAME); this.rulesRepository.getSession().save(); return new CategoryItem(this.rulesRepository, child); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new RulesRepositoryException(e); } } }
return new CategoryItem(this, tagNode); } catch (RepositoryException e) {
return new CategoryItem(this, tagNode); } catch (RepositoryException e) {