} catch (AccessDeniedException e) {
Repository.logger.warning(e.toString());
}
//otherwise we need to execute the query
RDFQuery rdfquery;
String pparam;
String restparam;
String using;
String valueQueryPart;
if(!"*".equals(sFullProperty)) {
//this is the type of browse when you match values
rdfquery = (isInverse)?RDFQuery.RDFQ_BROWSE_LISTVALUES_PROPERTY_INVERSE:RDFQuery.RDFQ_BROWSE_LISTVALUES_PROPERTY;
if(uriprop) {
using = "";
// pparam = "prop";//(isNegation)?"prop":"<"+sFullProperty+">";
restparam = (isNegation)?"NOT (":"(";
if(asFullProperty != null)
for(String s : asFullProperty){
restparam += "prop = <"+s+"> OR ";
}
if(restparam.length() > 4)
restparam = restparam.substring(0, restparam.length()-4);
restparam += ")";
}else {
// String property = this.pproperty.getURI(sPropertyName);
// pparam = "prop";//(sPropertyNS == null)?"<"+property+">":"prop";
restparam = "TRUE";
if(!"*".equals(sPropertyNS))
restparam += ((!isNegation)?" AND (":" AND (NOT ")+"namespace(prop) = property:";
//namespace(prop) = property: AND localName(prop) LIKE "*digitaltype*" //IGNORE CASE
if(!"*".equals(sPropertyName) && !"*".equals(sPropertyNS))
restparam += (!isNegation)?" AND ":" OR ";
if(!"*".equals(sPropertyName))
restparam += ((!isNegation)?"":"NOT")+" localName(prop)=\""+sPropertyName+"\"";
if(!"*".equals(sPropertyNS))
restparam += ") ";
String uprop = this.pnamespace.getURI(sPropertyNS);
using = (sPropertyNS!=null && !"*".equals(sPropertyNS))?" USING NAMESPACE mbb = <http://s3b.corrib.org/mbb#>"+RDFQuery.RDFQ_ADD_NAMESPACE.toString((uprop==null)?"http://dummy.url/":uprop):"";
}
pparam = "prop";
valueQueryPart = rdfquery.toString(restparam);
}else {
//this is the type of browse when you match properties
rdfquery = (isInverse)?RDFQuery.RDFQ_BROWSE_LISTVALUES_VALUE_INVERSE:RDFQuery.RDFQ_BROWSE_LISTVALUES_VALUE;
pparam = "%1$s";
restparam = "";
using = "";
valueQueryPart = rdfquery.toString("%1$s");
}
ValueFilter values = new ValueFilter(sValues);
String valueSelectQuery = values.process(valueQueryPart, this.isIgnoreCase());
valueSelectQuery += using;
//no need for predefined properties
Repository.logger.info(valueSelectQuery);
Value[] avUris = SesameWrapper.performVectorQuery(inGraph, QueryLanguage.SERQL, valueSelectQuery);
Set<Value> ssubjectUris = new HashSet<Value>();
RDFQuery subjectRdfQuery;
if(isInverse)
subjectRdfQuery = (!"*".equals(sFullProperty))?RDFQuery.RDFQ_BROWSE_FILTEROBJECTS_INVERSE:RDFQuery.RDFQ_BROWSE_FILTEROBJECTS_VALUES_INVERSE;
else
subjectRdfQuery = (!"*".equals(sFullProperty))?RDFQuery.RDFQ_BROWSE_FILTEROBJECTS:RDFQuery.RDFQ_BROWSE_FILTEROBJECTS_VALUES;
String subjectQueryPart;
Value[] avResults;
for(Value value : avUris) {
String value_filter;
if(value instanceof BNode)
value_filter = "<_:"+value+">";
else if(value instanceof URI)
value_filter = "<"+value+">";
else
value_filter = "\""+value+"\"";
if(!"*".equals(sFullProperty))
subjectQueryPart = subjectRdfQuery.toString(pparam, ("".equals(restparam))?"TRUE":restparam, value_filter);
else {
String tmpQ = subjectRdfQuery.toString(value_filter, "%1$s");
subjectQueryPart = values.process(tmpQ, this.isIgnoreCase());
}
subjectQueryPart += using;
avResults = SesameWrapper.performVectorQuery(Repository.MAIN_REPOSITORY.getLocalRepository(),