/** * @return */ public List<ClassificationNode> getClassificationNodes() { if ( classificationNodes == null ) { // ALL classifictionNodes are parsed -> they can be childs of ClassificationNode or ClassificationScheme // (...) List<OMElement> classNodeElems = adapter.getElements( adapter.getRootElement(), new XPath( "./rim:RegistryObjectList//rim:ClassificationNode", ns ) ); classificationNodes = new ArrayList<ClassificationNode>(); for ( OMElement classNodeElem : classNodeElems ) { classificationNodes.add( new ClassificationNode( classNodeElem ) ); } } return classificationNodes; }
private void insertClassificationNode( ClassificationNode classificationNode, int regPackId, Connection conn ) throws SQLException { InsertRow ir = new InsertRow( new TableName( Table.idxtb_classificationNode.name() ), null ); addRegistryObject( ir, classificationNode ); ir.addPreparedArgument( new SQLIdentifier( "parent" ), classificationNode.getParent() ); ir.addPreparedArgument( new SQLIdentifier( "code" ), classificationNode.getCode() ); ir.addPreparedArgument( new SQLIdentifier( "path" ), classificationNode.getPath() ); ir.addPreparedArgument( new SQLIdentifier( "data" ), getAsByteArray( classificationNode.getElement() ) ); ir.addPreparedArgument( new SQLIdentifier( "fk_registrypackage" ), regPackId ); ir.performInsert( conn ); }
return new Classification( rootEl ); case ClassificationNode: return new ClassificationNode( rootEl ); case ExtrinsicObject: return new ExtrinsicObject( rootEl );