647: instr(p_fullPathName, '/', -1, 1) - 1);
648: BEGIN
649: SELECT path_docid INTO pkgDocId
650: FROM jdr_paths
651: WHERE jdr_mds_internal.getDocumentName(path_docid) = pkgName AND
652: path_type = 'PACKAGE' AND
653: path_seq = 0;
654: EXCEPTION
655: -- No package file exists in the repository.
699: IS
700: docid NUMBER;
701: pathType jdr_paths.path_type%TYPE;
702: BEGIN
703: docid := jdr_mds_internal.getDocumentID(p_fullPathName);
704: IF docid = -1
705: THEN
706: RAISE REF_NOT_FOUND;
707: ELSE
709: FROM jdr_paths
710: WHERE path_docid = docid;
711: IF pathType = 'DOCUMENT'
712: THEN
713: jdr_mds_internal.dropDocument(docid);
714: ELSE
715: RAISE NOT_DOCUMENT_REF;
716: END IF;
717: END IF;
722: p_fullPathName VARCHAR2) RETURN BOOLEAN
723: IS
724: docid NUMBER;
725: BEGIN
726: docid := jdr_mds_internal.getDocumentID(p_fullPathName, 'DOCUMENT');
727: IF docid = -1
728: THEN
729: RETURN(FALSE);
730: ELSE
786: buildAttributeList(currDoc);
787: -- Prepare to insert document.
788: IF currDoc.parentId = -1
789: THEN
790: db_docid := jdr_mds_internal.prepareDocumentForInsert('INTERNAL',
791: currDoc.fullPath,
792: 'DOCUMENT',
793: '1.0',
794: 'UTF-8');
793: '1.0',
794: 'UTF-8');
795: ELSE
796: -- This is a child document. Lock the package file document
797: jdr_mds_internal.lockDocument(currDoc.parentId);
798: -- Determine whether the document already exists in the repository
799: docName := substr(currDoc.fullPath,
800: instr(currDoc.fullPath, '/', -1, 1) + 1);
801: BEGIN
812: WHERE path_owner_docid = currDoc.parentId;
813: docSeq := docSeq + 1;
814: isDuplicate := FALSE;
815: END;
816: db_docid := jdr_mds_internal.prepareDocumentForInsert('INTERNAL',
817: docName,
818: currDoc.parentId,
819: docSeq,
820: 'DOCUMENT');