You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Karl Wright (JIRA)" <ji...@apache.org> on 2013/09/17 19:16:53 UTC

[jira] [Commented] (CONNECTORS-778) SharePoint connector: Add ability to index binary attachments of list items

    [ https://issues.apache.org/jira/browse/CONNECTORS-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13769695#comment-13769695 ] 

Karl Wright commented on CONNECTORS-778:
----------------------------------------

A code snippet that supposedly does the same thing.  Note the "ows_Attachments" reference, which is possibly returned by the GetListItems method invocation.

{code}
private void processAttachments(CrawledDocument parentDoc) {

// Process any attachments.
// SP_ATTR_ATTACHMENTS = ows_Attachments
String strAttachmentUrls = parentDoc.getAttribute(SP_ATTR_ATTACHMENTS);

if (strAttachmentUrls != null && !strAttachmentUrls.equals("0")) {

String[] attachmentUrlList = strAttachmentUrls.split(";#");

// For each attachment

for (String attachmentUrl : attachmentUrlList) {

// Create a separate doc

URL encodedUrl = null;

CrawledAttachment attachmentDoc = null;

try {

String logicalName = Sp2010UrlUtils.getLastPartOfUrl(attachmentUrl);

encodedUrl = Sp2010UrlUtils.getEncodedUrl(new URL(attachmentUrl));

attachmentDoc = new CrawledAttachment(encodedUrl.toString(), logicalName, encodedUrl);

} catch (IOException ex) {

logger.warn(ex.getMessage());

}

if (attachmentDoc != null) {

try {

// Mark the doc as an attachment to the parent

attachmentDoc.setAttribute(ATTR_IS_ATTACHMENT, "true");

attachmentDoc.setAttribute(ATTR_PARENT_DOC_ID, parentDoc.getUrl().toString());

}

}
{code}

                
> SharePoint connector: Add ability to index binary attachments of list items
> ---------------------------------------------------------------------------
>
>                 Key: CONNECTORS-778
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-778
>             Project: ManifoldCF
>          Issue Type: New Feature
>          Components: SharePoint connector
>    Affects Versions: ManifoldCF 1.4
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 1.4
>
>
> Add ability to index binary attachments of list items.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira