manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <daddy...@gmail.com>
Subject Re: File System MCF API Service
Date Mon, 19 Aug 2013 11:35:11 GMT
Hi Muhammet,

The "include" and "exclude" nodes are actual nodes, not attributes.  So
there can be more than one of each.  You add them as children, not as
attributes.  So you do not use "addAttributeNode", but rather create new
nodes and add them as children.

If you use the "toXML" method to dump it as XML, it will become much
clearer exactly what is going on.

Thanks!
Karl



On Mon, Aug 19, 2013 at 7:28 AM, Muhammed Olgun <mh.olgun@gmail.com> wrote:

> Hi Karl,
>
> Of course, here is my createFileSystemJob method
>
> public String createFileSystemJob(String description,
>             String repositoryConnectionName,
>             String outputConnectionName,
>             int priority,
>             Long expirationInterval,
>             Long rescanInterval,
>             Long reseedInterval,
>             Configuration outputSpecification)
>             throws IOException, ManifoldCFException {
>         Configuration documentSpecification = new Configuration();
>         Configuration startPoint = new Configuration();
>         addAttributeNode(documentSpecification, "chromedmode", "mode",
> "none");
>         addAttributeNode(documentSpecification, "feedtimeout", "value",
> "60");
>         addAttributeNode(documentSpecification, "startpoint", "path",
> "this is path");
>         addAttributeNode(documentSpecification, "startpoint", "include",
> "this is include");
>
>         return createContinuousJob(description,
>                 repositoryConnectionName, outputConnectionName,
>                 priority, expirationInterval, rescanInterval,
> reseedInterval,
>                 documentSpecification, outputSpecification);
>     }
>
> and my document_specification
> JSON "document_specification":{"chromedmode":{"_attribute_mode":"none"},"feedtimeout":{"_attribute_value":"60"},"startpoint":[{"_attribute_path":"this
> is path"},{"_attribute_include":"this is include"}]}}
>
> bu my JSON should be
>
>
> {"startpoint":[{"_attribute_path":"c:\path_to_files","include":[{"_attribute_type":"file","_attribute_match":"*.txt"},{"_attribute_type":"file","_attribute_match":"*.doc"\,"_attribute_type":"directory","_attribute_match":"*"],"exclude":["*.mov"]]}
>
> For instance there is no attribute tag on include and how to add the type
> attribute to the include attribute with addAttributeNode method?
>
>
> 2013/8/19 Karl Wright <daddywri@gmail.com>
>
>> Hi Muhammet,
>>
>> I haven't looked at the book example for a while.  Can you please include
>> some code which demonstrates what you tried?  Otherwise it's not clear
>> where the issue would be.
>>
>> Thanks!
>> Karl
>>
>>
>>
>> On Mon, Aug 19, 2013 at 4:28 AM, Muhammed Olgun <mh.olgun@gmail.com>wrote:
>>
>>> Hello,
>>>
>>> I'm working on file system operations with MCF API. I studied Programmatic
>>> Operations<http://manifoldcf.apache.org/release/trunk/en_US/programmatic-operation.html#File+system+connector>page
and MCF's RSSMCFAPISupport class according to ManifoldCF book on
>>> chapter 3 and I wrote a class which extends GenericMCFAPISupport.
>>>
>>> I created the file system job but I couldn't add include and exclude
>>> attributes. The problem is that I couldn't create a JSON which is mentioned
>>> on Programmatic Operations<http://manifoldcf.apache.org/release/trunk/en_US/programmatic-operation.html#File+system+connector>
page
>>> with provided methods like addAttributeNode or addParameterNode. Is there
>>> any way to create File System Job JSON with these methods or can I make
>>> request with my own JSON on MCF API Service? If yes, how can make my own
>>> request on MCF API Service?
>>>
>>> Best Regards.
>>> Muhammet
>>>
>>
>>
>

Mime
View raw message