work on NIHVIVO-116 'Enable RDF TBox export by ontology namespace'
This commit is contained in:
parent
f13e2cb5b1
commit
5ebd33a6ea
5 changed files with 28 additions and 5 deletions
|
@ -29,7 +29,9 @@ public class Controllers {
|
|||
|
||||
public static final String SITE_ADMIN = "/siteAdmin";
|
||||
public static final String LOGIN = "/siteAdmin";
|
||||
public static final String LOGOUT = "/siteAdmin";
|
||||
public static final String LOGOUT = "/siteAdmin";
|
||||
|
||||
public static final String EXPORT_RDF = "/export";
|
||||
|
||||
// jsps go here:
|
||||
|
||||
|
|
|
@ -85,7 +85,8 @@ public class OntologyEditController extends BaseEditController {
|
|||
// See OntologyDaoJena.ontologyFromOntologyResource() comments
|
||||
String realURI = OntologyDaoJena.adjustOntologyURI(o.getURI());
|
||||
request.setAttribute("realURI", realURI);
|
||||
|
||||
request.setAttribute("exportURL", request.getContextPath() + Controllers.EXPORT_RDF);
|
||||
|
||||
Portal portal = (new VitroRequest(request)).getPortal();
|
||||
RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP);
|
||||
request.setAttribute("epoKey",epo.getKey());
|
||||
|
|
|
@ -78,6 +78,7 @@ public class JenaExportController extends BaseEditController {
|
|||
String formatParam = vreq.getParameter("format");
|
||||
String subgraphParam = vreq.getParameter("subgraph");
|
||||
String assertedOrInferredParam = vreq.getParameter("assertedOrInferred");
|
||||
String ontologyURI = vreq.getParameter("ontologyURI");
|
||||
|
||||
Model model = null;
|
||||
|
||||
|
@ -109,7 +110,7 @@ public class JenaExportController extends BaseEditController {
|
|||
} else if ( "tbox".equals(subgraphParam) ) {
|
||||
if (limitToInferred) {
|
||||
Model fullModel = getOntModelFromAttribute( FULL_ONT_MODEL_ATTR, vreq );
|
||||
model = xutil.extractTBox( fullModel );
|
||||
model = xutil.extractTBox( fullModel, ontologyURI );
|
||||
try {
|
||||
inferenceModel.enterCriticalSection(Lock.READ);
|
||||
model = model.intersection(inferenceModel);
|
||||
|
@ -117,7 +118,7 @@ public class JenaExportController extends BaseEditController {
|
|||
inferenceModel.leaveCriticalSection();
|
||||
}
|
||||
} else {
|
||||
model = xutil.extractTBox( model );
|
||||
model = xutil.extractTBox( model, ontologyURI );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ private final OntModelSpec DEFAULT_ONT_MODEL_SPEC = OntModelSpec.OWL_MEM;
|
|||
} else {
|
||||
// limit resources to those in the supplied namespace
|
||||
describeQueryStrBuff
|
||||
.append(" FILTER (afn:namespace(?res) == \"")
|
||||
.append(" FILTER (afn:namespace(?res) = \"")
|
||||
.append(namespace)
|
||||
.append("\") \n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue