Monday, August 23, 2004

Blogger API 1.0 : I checked the XML-RPC based API, but it seems that the contents can't be extracted using the API.

CyberLink for Java : I have added a interface for the search capability as follows.
public interface SearchCap

{
public String getPropertyName();
public boolean compare(SearchCriteria searchCri, ContentNode conNode);
}
I am creating the search plug-in as follows. The Java code is no problem because the String class uses Unicode. However I have to add some changes for the C++ version to use local code or Unicode in all the C++ code.
public class TitleSearchCap implements SearchCap 

{
public TitleSearchCap()
{
}
public String getPropertyName()
{
return SearchCriteria.TITLE;
}
public boolean compare(SearchCriteria searchCri, ContentNode conNode)
{
String searchCriTitle = searchCri.getValue();
String conTitle = conNode.getTitle();
if (searchCriTitle == null|| conTitle == null)
return false;
int cmpRet = conTitle.compareTo(searchCriTitle);
if (cmpRet == 0 && (searchCri.isEQ() || searchCri.isLE() || searchCri.isGE()))
return true;
else if (cmpRet < 0 && searchCri.isLT())
return true;
else if (0 < cmpRet && searchCri.isGT())
return true;
int idxRet = conTitle.indexOf(searchCriTitle);
if (0 <= idxRet && searchCri.isContains())
return true;
else if (searchCri.isDoesNotContain())
return true;
return false;
}
}

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?