@Test public void testCriteriaDNNTUtilsTest_2() throws LexerException, ParserConfigurationException, SAXException, RightCriteriumException, IOException { RightCriteriumContext ctx = ctx("uuid:aaa","solr_wo_dnnt.xml"); EvaluatingResultState evaluatingResultState = CriteriaDNNTUtils.checkDnnt(ctx); Assert.assertTrue(evaluatingResultState.equals(EvaluatingResultState.NOT_APPLICABLE)); }
public static EvaluatingResultState checkDnnt(RightCriteriumContext ctx) { try { SolrAccess solrAccess = ctx.getSolrAccess(); String pid = ctx.getRequestedPid(); String xpath = " Document doc = solrAccess.getSolrDataDocument(pid); String val = SolrUtils.strValue(doc, xpath); return (val != null && val.equals("true")) ? EvaluatingResultState.TRUE : EvaluatingResultState.NOT_APPLICABLE; } catch (XPathExpressionException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } catch (IOException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } }
CriteriaDNNTUtils { public static EvaluatingResultState checkDnnt(RightCriteriumContext ctx) { try { SolrAccess solrAccess = ctx.getSolrAccess(); String pid = ctx.getRequestedPid(); String xpath = " Document doc = solrAccess.getSolrDataDocument(pid); String val = SolrUtils.strValue(doc, xpath); return (val != null && val.equals("true")) ? EvaluatingResultState.TRUE : EvaluatingResultState.NOT_APPLICABLE; } catch (XPathExpressionException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } catch (IOException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } } }
CriteriaDNNTUtils { public static EvaluatingResultState checkDnnt(RightCriteriumContext ctx) { try { SolrAccess solrAccess = ctx.getSolrAccess(); String pid = ctx.getRequestedPid(); String xpath = " Document doc = solrAccess.getSolrDataDocument(pid); String val = SolrUtils.strValue(doc, xpath); return (val != null && val.equals("true")) ? EvaluatingResultState.TRUE : EvaluatingResultState.NOT_APPLICABLE; } catch (XPathExpressionException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } catch (IOException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } }  }
CriteriaDNNTUtils { public static EvaluatingResultState checkDnnt(RightCriteriumContext ctx) { try { SolrAccess solrAccess = ctx.getSolrAccess(); String pid = ctx.getRequestedPid(); String xpath = " Document doc = solrAccess.getSolrDataDocument(pid); String val = SolrUtils.strValue(doc, xpath); return (val != null && val.equals("true")) ? EvaluatingResultState.TRUE : EvaluatingResultState.NOT_APPLICABLE; } catch (XPathExpressionException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } catch (IOException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } }  static void logDnntAccess(String pid,
                                     String stream,
                                     String rootTitle,
                                     String dcTitle,
                                     String remoteAddr,
                                     String username,
                                     String email,
                                     List<String> dcAuthors,
                                     ObjectPidsPath[] paths,
                                     ObjectModelsPath[] mpaths); static EvaluatingResultState checkDnnt(RightCriteriumContext ctx); static boolean checkContainsCriteriumReadDNNT(RightsReturnObject obj); static void checkContainsCriteriumPDFDNNT(RightCriteriumContext ctx, RightsManager manager); static void checkContainsCriterium(RightCriteriumContext ctx, RightsManager manager, Class ... clzs); static void checkContainsCriteriumReadDNNT(RightCriteriumContext ctx, RightsManager manager); }
CriteriaDNNTUtils { public static EvaluatingResultState checkDnnt(RightCriteriumContext ctx) { try { SolrAccess solrAccess = ctx.getSolrAccess(); String pid = ctx.getRequestedPid(); String xpath = " Document doc = solrAccess.getSolrDataDocument(pid); String val = SolrUtils.strValue(doc, xpath); return (val != null && val.equals("true")) ? EvaluatingResultState.TRUE : EvaluatingResultState.NOT_APPLICABLE; } catch (XPathExpressionException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } catch (IOException e) { LOGGER.log(Level.SEVERE,e.getMessage(),e); return EvaluatingResultState.NOT_APPLICABLE; } }  static void logDnntAccess(String pid,
                                     String stream,
                                     String rootTitle,
                                     String dcTitle,
                                     String remoteAddr,
                                     String username,
                                     String email,
                                     List<String> dcAuthors,
                                     ObjectPidsPath[] paths,
                                     ObjectModelsPath[] mpaths); static EvaluatingResultState checkDnnt(RightCriteriumContext ctx); static boolean checkContainsCriteriumReadDNNT(RightsReturnObject obj); static void checkContainsCriteriumPDFDNNT(RightCriteriumContext ctx, RightsManager manager); static void checkContainsCriterium(RightCriteriumContext ctx, RightsManager manager, Class ... clzs); static void checkContainsCriteriumReadDNNT(RightCriteriumContext ctx, RightsManager manager); static ThreadLocal<RightsReturnObject> currentThreadReturnObject; static Logger DNNT_LOGGER; static Logger LOGGER; }