Exemplo n.º 1
0
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   id_ = URelaxer.getAttributePropertyAsString(element, "id");
   xmlLang_ = URelaxer.getAttributePropertyAsString(element, "xml:lang");
   setTitle(new FtTitle(stack));
   if (FtSubtitle.isMatch(stack)) {
     setSubtitle(new FtSubtitle(stack));
   }
   if (FtVersion.isMatch(stack)) {
     setVersion(new FtVersion(stack));
   }
   if (FtType.isMatch(stack)) {
     setType(new FtType(stack));
   }
   if (FtAuthors.isMatch(stack)) {
     setAuthors(new FtAuthors(stack));
   }
   notice_.clear();
   while (true) {
     if (FtNotice.isMatch(stack)) {
       addNotice(new FtNotice(stack));
     } else {
       break;
     }
   }
   if (FtAbstract.isMatch(stack)) {
     setAbstract(new FtAbstract(stack));
   }
 }
Exemplo n.º 2
0
  public void addRioxxVersionSection(List upload, Item item) throws WingException {
    String version = item.getMetadata("rioxxterms.version");

    if (StringUtils.isNotBlank(version) && !"NA".equals(version)) {
      try {
        DCInputsReader a = new DCInputsReader();
        java.util.List<String> pairs = a.getPairs("rioxxterms_version");
        int humanReadable = pairs.indexOf(version) - 1;
        version = pairs.get(humanReadable);
      } catch (DCInputsReaderException e) {
        log.error(e.getMessage(), e);
      }
      upload
          .addItem("upload-rioxx-version-warning", "upload-rioxx-version-warning")
          .addContent(T_rioxx_version.parameterize(version));
    }
  }
Exemplo n.º 3
0
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   id_ = URelaxer.getAttributePropertyAsString(element, "id");
   xmlLang_ = URelaxer.getAttributePropertyAsString(element, "xml:lang");
   person_.clear();
   while (true) {
     if (FtPerson.isMatch(stack)) {
       addPerson(new FtPerson(stack));
     } else {
       break;
     }
   }
 }
Exemplo n.º 4
0
 /**
  * Gets number of the IFtContentMixMixed property <b>content</b>.
  *
  * @return int
  */
 public int sizeContent() {
   return (content_.size());
 }
Exemplo n.º 5
0
 /**
  * Gets the IFtContentMixMixed property <b>content</b>.
  *
  * @return IFtContentMixMixed[]
  */
 public IFtContentMixMixed[] getContent() {
   IFtContentMixMixed[] array = new IFtContentMixMixed[content_.size()];
   return ((IFtContentMixMixed[]) content_.toArray(array));
 }
Exemplo n.º 6
0
 /**
  * Gets the FtNotice property <b>notice</b> by index.
  *
  * @param index
  * @return FtNotice
  */
 public FtNotice getNotice(int index) {
   return ((FtNotice) notice_.get(index));
 }
Exemplo n.º 7
0
 /**
  * Gets number of the FtNotice property <b>notice</b>.
  *
  * @return int
  */
 public int sizeNotice() {
   return (notice_.size());
 }
Exemplo n.º 8
0
 /**
  * Gets the FtNotice property <b>notice</b>.
  *
  * @return FtNotice[]
  */
 public FtNotice[] getNotice() {
   FtNotice[] array = new FtNotice[notice_.size()];
   return ((FtNotice[]) notice_.toArray(array));
 }
Exemplo n.º 9
0
 /**
  * Gets number of the FcTr property <b>tr</b>.
  *
  * @return int
  */
 public int sizeTr() {
   return (tr_.size());
 }
Exemplo n.º 10
0
 /**
  * Gets number of the FtPerson property <b>person</b>.
  *
  * @return int
  */
 public int sizePerson() {
   return (person_.size());
 }
Exemplo n.º 11
0
 /**
  * Gets the FtPerson property <b>person</b>.
  *
  * @return FtPerson[]
  */
 public FtPerson[] getPerson() {
   FtPerson[] array = new FtPerson[person_.size()];
   return ((FtPerson[]) person_.toArray(array));
 }
Exemplo n.º 12
0
  /** Sherpa romeo submission support */
  public void make_sherpaRomeo_submission(Item item, Division divIn) throws WingException {

    if (ConfigurationManager.getBooleanProperty(
        "webui.submission.sherparomeo-policy-enabled", true)) {

      SHERPASubmitService sherpaSubmitService =
          new DSpace().getSingletonService(SHERPASubmitService.class);

      if (sherpaSubmitService.hasISSNs(context, item)) {
        List div = divIn.addList("submit-upload-new", List.TYPE_FORM);
        div.setHead(T_sherpa_title);

        // Since sherpa web service doesn't work reliable with more than 1 issn, perform the service
        // for each issn
        Set<String> issns = sherpaSubmitService.getISSNs(context, item);
        Iterator<String> issnsIterator = issns.iterator();

        int i = 0;
        while (issnsIterator.hasNext()) {
          SHERPAResponse shresp =
              sherpaSubmitService.searchRelatedJournalsByISSN(issnsIterator.next());
          java.util.List<SHERPAJournal> journals = shresp.getJournals();
          java.util.List<SHERPAPublisher> publishers = shresp.getPublishers();

          if (CollectionUtils.isNotEmpty(journals)) {
            for (SHERPAJournal journ : journals) {
              SHERPAPublisher pub = publishers.get(0);

              List sherpaList = div.addList("sherpaList" + (i + 1), "simple", "sherpaList");
              sherpaList
                  .addItem()
                  .addFigure(
                      contextPath + "/static/images/" + (i == 0 ? "romeosmall" : "clear") + ".gif",
                      "http://www.sherpa.ac.uk/romeo/",
                      "sherpaLogo");

              sherpaList.addItem().addHighlight("sherpaBold").addContent(T_sherpa_journal);
              sherpaList.addItem(journ.getTitle() + " (" + journ.getIssn() + ")");

              sherpaList.addItem().addHighlight("sherpaBold").addContent(T_sherpa_publisher);
              sherpaList.addItemXref(pub.getHomeurl(), pub.getName());

              sherpaList.addItem().addHighlight("sherpaBold").addContent(T_sherpa_colour);
              sherpaList
                  .addItem()
                  .addHighlight("sherpaStyle " + pub.getRomeocolour())
                  .addContent(message("xmlui.aspect.sherpa.submission." + pub.getRomeocolour()));
              sherpaList
                  .addItem()
                  .addXref(
                      "http://www.sherpa.ac.uk/romeo/search.php?issn=" + journ.getIssn(),
                      T_sherpa_more,
                      "sherpaMoreInfo");

              i = i + 1;
            }
          }
        }

        List sherpaList = div.addList("sherpaListEnd", "simple", "sherpaList");
        sherpaList.addItem(T_sherpa_consult);
      }
    }
  }
Exemplo n.º 13
0
 /**
  * Gets the FcTr property <b>tr</b> by index.
  *
  * @param index
  * @return FcTr
  */
 public FcTr getTr(int index) {
   return ((FcTr) tr_.get(index));
 }
Exemplo n.º 14
0
 /**
  * Gets the IFtContentMixMixed property <b>content</b> by index.
  *
  * @param index
  * @return IFtContentMixMixed
  */
 public IFtContentMixMixed getContent(int index) {
   return ((IFtContentMixMixed) content_.get(index));
 }
Exemplo n.º 15
0
 /**
  * Gets the FtPerson property <b>person</b> by index.
  *
  * @param index
  * @return FtPerson
  */
 public FtPerson getPerson(int index) {
   return ((FtPerson) person_.get(index));
 }
 /**
  * Gets child RNodes.
  *
  * @return IRNode[]
  */
 public IRNode[] getRNodes() {
   java.util.List classNodes = new java.util.ArrayList();
   IRNode[] nodes = new IRNode[classNodes.size()];
   return ((IRNode[]) classNodes.toArray(nodes));
 }
Exemplo n.º 17
0
 /**
  * Gets the FcTr property <b>tr</b>.
  *
  * @return FcTr[]
  */
 public FcTr[] getTr() {
   FcTr[] array = new FcTr[tr_.size()];
   return ((FcTr[]) tr_.toArray(array));
 }