Package ugh.dl

Examples of ugh.dl.MetadataType


      if (topstruct.getAllChildren() != null && topstruct.getAllChildren().size() > 0) {
        firstchildstruct = topstruct.getAllChildren().get(0);
      }

      /* MetadataType ermitteln und ggf. Fehler melden */
      MetadataType mdt;
      try {
        mdt = this.uhelp.getMetadataType(this.prefs, metadata);
      } catch (UghHelperException e) {
        Helper.setFehlerMeldung(e);
        return "";
View Full Code Here


  public void setSortierart(String sortierart) {
    this.Sortierart = sortierart;
  }

  private int compareMetadatenTypen(Object o1, Object o2) {
    MetadataType s1 = (MetadataType) o1;
    MetadataType s2 = (MetadataType) o2;
    String name1 = s1.getLanguage((String) Helper.getManagedBeanValue("#{LoginForm.myBenutzer.metadatenSprache}"));
    String name2 = s2.getLanguage((String) Helper.getManagedBeanValue("#{LoginForm.myBenutzer.metadatenSprache}"));
    if (name1 == null) {
      name1 = "";
    }
    if (name2 == null) {
      name2 = "";
View Full Code Here

        public int compare(final Reference o1, final Reference o2) {
          final Reference r1 = o1;
          final Reference r2 = o2;
          Integer page1 = 0;
          Integer page2 = 0;
          final MetadataType mdt = MetadatenHelper.this.myPrefs.getMetadataTypeByName("physPageNumber");
          List<? extends Metadata> listMetadaten = r1.getTarget().getAllMetadataByType(mdt);
          if (listMetadaten != null && listMetadaten.size() > 0) {
            final Metadata meineSeite = listMetadaten.get(0);
            page1 = Integer.parseInt(meineSeite.getValue());
          }
          listMetadaten = r2.getTarget().getAllMetadataByType(mdt);
          if (listMetadaten != null && listMetadaten.size() > 0) {
            final Metadata meineSeite = listMetadaten.get(0);
            page2 = Integer.parseInt(meineSeite.getValue());
          }
          return page1.compareTo(page2);
        }
      });

      MetadataType mdt = this.myPrefs.getMetadataTypeByName("physPageNumber");
      List<? extends Metadata> listSeiten = listReferenzen.get(0).getTarget().getAllMetadataByType(mdt);
      if (inPageNumber == PAGENUMBER_LAST) {
        listSeiten = listReferenzen.get(listReferenzen.size() - 1).getTarget().getAllMetadataByType(mdt);
      }
      if (listSeiten != null && listSeiten.size() > 0) {
View Full Code Here

      if (s2 == null) {
        return 1;
      }
      String name1 = "", name2 = "";
      try {
        MetadataType mdt1 = s1.getType();
        MetadataType mdt2 = s2.getType();
        name1 = mdt1.getNameByLanguage(this.language);
        name2 = mdt2.getNameByLanguage(this.language);
      } catch (java.lang.NullPointerException e) {
                myLogger.debug("Language " + language + " for metadata " + s1.getType() + " or " + s2.getType() + " is missing in ruleset");
        return 0;
      }
      if (name1 == null || name1.length() == 0) {
View Full Code Here

      if (topstruct.getAllChildren() != null && topstruct.getAllChildren().size() > 0) {
        firstchildstruct = topstruct.getAllChildren().get(0);
      }

      /* MetadataType ermitteln und ggf. Fehler melden */
      MetadataType mdt;
      try {
        mdt = this.uhelp.getMetadataType(this.prefs, metadata);
      } catch (UghHelperException e) {
        Helper.setFehlerMeldung(e);
        return "";
View Full Code Here

        Prefs myPrefs = p.getRegelsatz().getPreferences();
        Fileformat gdzfile;
        try {
          gdzfile = p.readMetadataFile();

          MetadataType mdt = ughhelp.getMetadataType(myPrefs, "pathimagefiles");
          List<? extends Metadata> alleMetadaten = gdzfile.getDigitalDocument().getPhysicalDocStruct().getAllMetadataByType(mdt);
          if (alleMetadaten != null && alleMetadaten.size() > 0) {
            Metadata md = alleMetadaten.get(0);
            myLogger.debug(md.getValue());
View Full Code Here

          DocStruct dsFirst = null;
          if (dsTop.getAllChildren() != null && dsTop.getAllChildren().size() > 0) {
            dsFirst = dsTop.getAllChildren().get(0);
          }

          MetadataType mdtPpnDigital = ughhelp.getMetadataType(myPrefs, "CatalogIDDigital");
          MetadataType mdtPpnAnalog = ughhelp.getMetadataType(myPrefs, "CatalogIDSource");
          List<? extends Metadata> alleMetadaten;

          /* digitale PPN korrigieren */
          if (dsFirst != null) {
            alleMetadaten = dsFirst.getAllMetadataByType(mdtPpnDigital);
            if (alleMetadaten != null && alleMetadaten.size() > 0) {
              Metadata md = alleMetadaten.get(0);
              myLogger.debug(md.getValue());
              if (!md.getValue().endsWith(myBandnr)) {
                md.setValue(md.getValue() + myBandnr);
                Helper.setMeldung(null, "PPN digital adjusted: ", p.getTitel());
              }
            }

            /* analoge PPN korrigieren */
            alleMetadaten = dsFirst.getAllMetadataByType(mdtPpnAnalog);
            if (alleMetadaten != null && alleMetadaten.size() > 0) {
              Metadata md1 = alleMetadaten.get(0);
              myLogger.debug(md1.getValue());
              if (!md1.getValue().endsWith(myBandnr)) {
                md1.setValue(md1.getValue() + myBandnr);
                Helper.setMeldung(null, "PPN analog adjusted: ", p.getTitel());
              }
            }
          }

          /* Collections korrigieren */
          List<String> myKollektionenTitel = new ArrayList<String>();
          MetadataType coltype = ughhelp.getMetadataType(myPrefs, "singleDigCollection");
          ArrayList<Metadata> myCollections;
          if (dsTop.getAllMetadataByType(coltype) != null && dsTop.getAllMetadataByType(coltype).size() != 0) {
            myCollections = new ArrayList<Metadata>(dsTop.getAllMetadataByType(coltype));
            if (myCollections != null && myCollections.size() > 0) {
              for (Metadata md : myCollections) {
View Full Code Here

      } else {
        Prefs myPrefs = p.getRegelsatz().getPreferences();
        try {
          Fileformat gdzfile = p.readMetadataFile();
          DocStruct dsTop = gdzfile.getDigitalDocument().getLogicalDocStruct();
          MetadataType mdtPpnDigital = ughhelp.getMetadataType(myPrefs, "CatalogIDSource");

          /* analoge PPN korrigieren */
          if (dsTop != null) {
            List<? extends Metadata> alleMetadaten = dsTop.getAllMetadataByType(mdtPpnDigital);
            if (alleMetadaten != null && alleMetadaten.size() > 0) {
View Full Code Here

          DocStruct dsFirst = null;
          if (dsTop.getAllChildren() != null && dsTop.getAllChildren().size() > 0) {
            dsFirst = dsTop.getAllChildren().get(0);
          }

          MetadataType mdtPpnDigital = ughhelp.getMetadataType(myPrefs, "CatalogIDDigital");

          /* digitale PPN korrigieren */
          if (dsFirst != null) {
            List<? extends Metadata> alleMetadaten = dsFirst.getAllMetadataByType(mdtPpnDigital);
            if (alleMetadaten == null || alleMetadaten.size() == 0) {
              Metadata md = new Metadata(mdtPpnDigital);
              md.setValue(ppnAufBandebene);
              dsFirst.addMetadata(md);
            }
          }

          /* Collections korrigieren */
          List<String> myKollektionenTitel = new ArrayList<String>();
          MetadataType coltype = ughhelp.getMetadataType(myPrefs, "singleDigCollection");
          ArrayList<Metadata> myCollections;
          if (dsTop.getAllMetadataByType(coltype) != null) {
            myCollections = new ArrayList<Metadata>(dsTop.getAllMetadataByType(coltype));
            if (myCollections != null && myCollections.size() > 0) {
              for (Iterator<Metadata> it = myCollections.iterator(); it.hasNext();) {
View Full Code Here

      return this.p.getRole();
   }

   public void setRolle(String inRolle) {
      this.p.setRole(inRolle);
      MetadataType mdt = this.myPrefs.getMetadataTypeByName(this.p.getRole());
      this.p.setType(mdt);

   }
View Full Code Here

TOP

Related Classes of ugh.dl.MetadataType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.