How to use the dc.title function in dc

To help you get started, we’ve selected a few dc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ceskaexpedice / kramerius / client / src / main / webapp / js / vc.js View on Github external
render: function() {
        var docs = this.docs.docs;
        if(docs.length === 0){
            this.$elem.hide();
            return;
        }
        for (var i = 0; i < docs.length; i++) {
            var pid = docs[i]["PID"];
            var imgsrc = "api/item/" + pid + "/thumb";// + this.thumbHeight;
            var thumb = $('<li>', {class: 'thumb'});
            thumb.data("metadata", docs[i]["dc.title"]);
            var title = docs[i]["dc.title"];
            var shortTitle = title;
            var creator = "";
            var maxLength = 90;
            var showTooltip = false;
            if (shortTitle.length &gt; maxLength) {
                shortTitle = shortTitle.substring(0, maxLength) + "...";
                showTooltip = true;
            }
            if (docs[i]["dc.creator"]) {
                creator = '<div class="autor">' + docs[i]["dc.creator"] + '</div>';
            }
            title = '<div class="title">' + title + '</div>';
            thumb.data("pid", pid);
            this.container.append(thumb);
            var policy = $('<div>', {class: 'policy'});
            if (docs[i]['dostupnost']) {</div></li>
github DSpace / dspace-angular / src / app / submission / section / upload / files-edit / files-edit.component.ts View on Github external
public setFormInitialMetadata() {
    if (!this.initialized) {
      this.initialized = true;
      // Alternative mode to assign:
      // this.formRef.formGroup.controls['files-data'].controls.title.setValue(...);
      // Cannot put the following lines into 'ngOnInit' because 'this.formRef' is available only after the view init.
      // Cannot put the following lines into 'ngAfterViewInit' because of 'ExpressionChangedAfterItHasBeenCheckedError'.

      // TODO  bitstreamList[key].metadata['dc.title'][0].value, as in section-upload
      // dc.title
      let title = '';
      if (isNotUndefined(this.fileData.metadata['dc.title'])) {
        // Case /edit
        title = this.fileData.metadata['dc.title'][0].value;
      } else {
        // Case /submit
        title = this.fileData.metadata[0].value;
      }

      const description = this.fileData.metadata.length > 1 ? this.fileData.metadata[1].value : '';
      const accessConditions = this.fileData.accessConditions;
      this.formRef.formGroup.get('metadata').get('dc_title').setValue(title);
      this.formRef.formGroup.get('metadata').get('dc_description').setValue(description);
      this.fileData.accessConditions.forEach( (condition, index) => {

        const accessConditionControl: any = this.formBuilderService.getFormControlById(
          'accessConditions',
          this.formRef.formGroup,
          this.formModel,
          index);
github DSpace / dspace-angular / src / app / submission / section / upload / files-edit / files-edit.component.ts View on Github external
public setFormInitialMetadata() {
    if (!this.initialized) {
      this.initialized = true;
      // Alternative mode to assign:
      // this.formRef.formGroup.controls['files-data'].controls.title.setValue(...);
      // Cannot put the following lines into 'ngOnInit' because 'this.formRef' is available only after the view init.
      // Cannot put the following lines into 'ngAfterViewInit' because of 'ExpressionChangedAfterItHasBeenCheckedError'.

      // TODO  bitstreamList[key].metadata['dc.title'][0].value, as in section-upload
      // dc.title
      let title = '';
      if (isNotUndefined(this.fileData.metadata['dc.title'])) {
        // Case /edit
        title = this.fileData.metadata['dc.title'][0].value;
      } else {
        // Case /submit
        title = this.fileData.metadata[0].value;
      }

      const description = this.fileData.metadata.length > 1 ? this.fileData.metadata[1].value : '';
      const accessConditions = this.fileData.accessConditions;
      this.formRef.formGroup.get('metadata').get('dc_title').setValue(title);
      this.formRef.formGroup.get('metadata').get('dc_description').setValue(description);
      this.fileData.accessConditions.forEach( (condition, index) => {

        const accessConditionControl: any = this.formBuilderService.getFormControlById(
          'accessConditions',
          this.formRef.formGroup,
github ceskaexpedice / kramerius / client / src / main / webapp / js / vc.js View on Github external
render: function() {
        var docs = this.docs.docs;
        if(docs.length === 0){
            this.$elem.hide();
            return;
        }
        for (var i = 0; i &lt; docs.length; i++) {
            var pid = docs[i]["PID"];
            var imgsrc = "api/item/" + pid + "/thumb";// + this.thumbHeight;
            var thumb = $('<li>', {class: 'thumb'});
            thumb.data("metadata", docs[i]["dc.title"]);
            var title = docs[i]["dc.title"];
            var shortTitle = title;
            var creator = "";
            var maxLength = 90;
            var showTooltip = false;
            if (shortTitle.length &gt; maxLength) {
                shortTitle = shortTitle.substring(0, maxLength) + "...";
                showTooltip = true;
            }
            if (docs[i]["dc.creator"]) {
                creator = '<div class="autor">' + docs[i]["dc.creator"] + '</div>';
            }
            title = '<div class="title">' + title + '</div>';
            thumb.data("pid", pid);
            this.container.append(thumb);
            var policy = $('<div>', {class: 'policy'});</div></li>
github ceskaexpedice / kramerius / client / src / main / webapp / js / timeline.js View on Github external
addThumb: function(doc) {
        var pid = doc["PID"];
        var root_pid = doc["root_pid"];
        var model = doc["fedora.model"];
        var imgsrc = "api/item/" + pid + "/thumb";
        var thumb = $('<li>', {class: 'thumb'});
        thumb.data("metadata", doc["root_title"]);
        var title = doc["root_title"];
        var dctitle = doc["dc.title"];
        var typtitulu = doc["model_path"][0].split("/")[0];
        var shortTitle = title;
        var creator = "";
        var maxLength = 90;
        var showToolTip = false;
        if (shortTitle.length &gt; maxLength) {
            shortTitle = shortTitle.substring(0, maxLength) + "...";
            showToolTip = true;
        }
        shortTitle = '<div class="title">' + shortTitle + '</div>';
        if (doc["dc.creator"]) {
            creator = '<div class="autor">' + doc["dc.creator"] + '</div>';
        }
        var titletag = '<div class="title">' + title + '</div>';
        if(title !== dctitle){
            titletag = titletag + '<div class="dctitle">' + dctitle + '</div>';</li>
github DSpace / dspace-angular / src / app / submission / section / upload / file / view / file-view.component.ts View on Github external
ngOnInit() {
    if (isNotEmpty(this.fileData.metadata)) {
      this.metadata.push({
        key: 'Title',
        language: (this.fileData.metadata.hasOwnProperty('dc.title') ? this.fileData.metadata['dc.title'][0].language : ''),
        value: (this.fileData.metadata.hasOwnProperty('dc.title') ? this.fileData.metadata['dc.title'][0].value : '')
      });
      this.metadata.push({
        key: 'Description',
        language: (this.fileData.metadata.hasOwnProperty('dc.description') ? this.fileData.metadata['dc.description'][0].language : ''),
        value: (this.fileData.metadata.hasOwnProperty('dc.description') ? this.fileData.metadata['dc.description'][0].value : '')
      });
    }
  }
}
github ceskaexpedice / kramerius / client / src / main / webapp / js / rows.js View on Github external
addThumb: function(doc) {
        var pid = doc["PID"];
        var root_pid = doc["root_pid"];
        var model = doc["fedora.model"];
        var imgsrc = "api/item/" + pid + "/thumb";
        var thumb = $('<li>', {class: 'thumb'});
        thumb.data("metadata", doc["root_title"]);
        var title = doc["root_title"];
        var dctitle = doc["dc.title"];
        var typtitulu = doc["model_path"][0].split("/")[0];
        var shortTitle = title;
        var creator = "";
        var maxLength = 90;
        var showToolTip = false;
        if (shortTitle.length &gt; maxLength) {
            shortTitle = shortTitle.substring(0, maxLength) + "...";
            showToolTip = true;
        }
        shortTitle = '<div class="title">' + shortTitle + '</div>';
        if (doc["dc.creator"]) {
            creator = '<div class="autor">' + doc["dc.creator"] + '</div>';
        }
        title = '<div class="title">' + title + '</div>';
        if(title !== dctitle){
            title = title + '<div class="dctitle">' + dctitle + '</div>';</li>
github usdot-its-jpo-data-portal / datahub-ui / data / js / usdot_data_microsite_template.js View on Github external
$.get(NTL_url + NTL_collection + NTL_datelimit + NTL_rowslimit, function (data) {
                var json = JSON.parse(data);
                for (itemCountNTL = 0; itemCountNTL &lt; json.response.docs.length; itemCountNTL++) {
                    //Filter results to pull only dataset types
                    if (json.response.docs[itemCountNTL]["mods.sm_resource_type"][0] == "Dataset"){
                        var tempJson = {};
                        //Read dataset name, description, date
                        tempJson["name"] = json.response.docs[itemCountNTL]["dc.title"][0];
                        tempJson["description"] = json.response.docs[itemCountNTL]["mods.abstract"][0];
                        tempJson["date"] = self.formatDate(json.response.docs[itemCountNTL]["fgs.createdDate"]);

                        //Read dataset tags, add Research Results button tag to all NTL results
                        var tagCount;
                        var allTags = [];
                        var RESEARCHRESULTS = "Research Results";
                        allTags[0] = RESEARCHRESULTS;
                        for (tagCount = 0; tagCount &lt; json.response.docs[itemCountNTL]["mods.sm_key_words"].length; tagCount++) {
                            allTags[tagCount + 1] = json.response.docs[itemCountNTL]["mods.sm_key_words"][tagCount];
                        }
                        tempJson["tags"] = allTags;
                        tempJson["tags"].sort();

                        //Build URL to refer to NTL result using PID
                        var PID = json.response.docs[itemCountNTL].PID.split(":")[1];
github ceskaexpedice / kramerius / client / src / main / webapp / js / browse.js View on Github external
K5.api.askForSolr(q, _.bind(function(data) {
            this.titlesList.find('.more_docs').remove();
            var arr = data.response.docs;
            for (var i = 0; i &lt; arr.length; i++) {
                var doc = arr[i];
                var div = $('<li>', {class: 'res policy'});
                div.data("pid", doc.PID);
                var dcTitle = doc['dc.title'];
                if(dcTitle.length === 0){
                    dcTitle = K5.i18n.translatable("dctitle.none");
                }
                var title = $('<span class="title">' + dcTitle + '</span>');
                title.click(function() {
                    K5.api.gotoDisplayingItemPage($(this).parent().data("pid"));
                });
                div.append(title);
                if (doc['dc.creator']) {
                    div.append('<div>' + doc['dc.creator'] + '</div>');
                }
                if (doc['datum_str']) {
                    div.append('<div>' + doc['datum_str'] + '</div>');
                }
                
                if (doc['dostupnost']) {</li>
github DSpace / dspace-angular / src / app / submission / sections / upload / file / file.component.spec.ts View on Github external
})
      ];
      operationsService.jsonPatchByResourceID.and.returnValue(observableOf(response));

      const accessConditionsToSave = [
        { name: 'openaccess', groupUUID: '123456-g' },
        { name: 'lease', endDate: '2019-01-16T00:00:00Z', groupUUID: '123456-g' },
        { name: 'embargo', startDate: '2019-01-16T00:00:00Z', groupUUID: '123456-g' }
      ];
      comp.saveBitstreamData(event);
      tick();

      let path = 'metadata/dc.title';
      expect(operationsBuilder.add).toHaveBeenCalledWith(
        pathCombiner.getPath(path),
        mockFileFormData.metadata['dc.title'],
        true
      );

      path = 'metadata/dc.description';
      expect(operationsBuilder.add).toHaveBeenCalledWith(
        pathCombiner.getPath(path),
        mockFileFormData.metadata['dc.description'],
        true
      );

      path = 'accessConditions';
      expect(operationsBuilder.add).toHaveBeenCalledWith(
        pathCombiner.getPath(path),
        accessConditionsToSave,
        true
      );

dc

A multi-dimensional charting library built to work natively with crossfilter and rendered using d3.js

Apache-2.0
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis