当前位置: 首页>>代码示例>>PHP>>正文


PHP Opus_Document::addNote方法代码示例

本文整理汇总了PHP中Opus_Document::addNote方法的典型用法代码示例。如果您正苦于以下问题:PHP Opus_Document::addNote方法的具体用法?PHP Opus_Document::addNote怎么用?PHP Opus_Document::addNote使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Opus_Document的用法示例。


在下文中一共展示了Opus_Document::addNote方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: randString

$doc->setThesisGrantor($dnbInstitute);
$doc->setThesisPublisher($dnbInstitute);
//
// Subjects
//
$doc->addSubject()->setType('swd')->setValue(randString($counter++));
foreach (array('uncontrolled', 'msc', 'ddc') as $type) {
    $doc->addSubject()->setType($type)->setLanguage(randString($counter++))->setValue(randString($counter++))->setExternalKey(randString($counter++));
    $doc->addSubject()->setType($type)->setLanguage("eng" . randString($counter++))->setValue(randString($counter++))->setExternalKey(randString($counter++));
    $doc->addSubject()->setType($type)->setLanguage("deu")->setValue(randString($counter++))->setExternalKey(randString($counter++));
    $doc->addSubject()->setType($type)->setLanguage("eng")->setValue(randString($counter++))->setExternalKey(randString($counter++));
}
//
// Notes
//
$doc->addNote()->setVisibility('public')->setMessage(randString($counter++));
$doc->addNote()->setVisibility('private')->setMessage(randString($counter++));
//
// Licenses
//
$lic = new Opus_Licence();
$lic->setActive(1);
$lic->setLanguage('deu' . randString($counter++));
$lic->setLinkLicence(randString($counter++));
$lic->setNameLong(randString($counter++));
$lic->store();
$doc->setLicence($lic);
//
// Storing...
//
$doc->store();
开发者ID:belapp,项目名称:opus4-application,代码行数:31,代码来源:opus-create-xss-document.php

示例2:

$translator->store();
$doc->addPersonTranslator($translator);
$contributor = new Opus_Person();
$contributor->setFirstName('Jeff');
$contributor->setLastName('Smart');
$contributor->store();
$doc->addPersonContributor($contributor);
$doc->setCreatingCorporation('Walt Disney Creation Laboratories');
$doc->setContributingCorporation('Pixar Animation Studio');
$swd = $doc->addSubject()->setType('swd');
$swd->setValue('Test');
$free_subject_deu = $doc->addSubject()->setType('uncontrolled');
$free_subject_deu->setLanguage('deu')->setValue('Maustest');
$free_subject_eng = $doc->addSubject()->setType('uncontrolled');
$free_subject_eng->setLanguage('eng')->setValue('mouse test');
$note1 = $doc->addNote();
$note1->setVisibility('public')->setMessage('ein Dokument, dass noch eine Bemerkung braucht, weil im Abstract nicht alles gesagt wurde...');
$note2 = $doc->addNote();
$note2->setVisibility('private')->setMessage('und noch eine Bemerkung zum Bearbeitungsstand.');
$licences = Opus_Licence::getAll();
if (count($licences) >= 1) {
    $lic = $licences[0];
} else {
    $lic = new Opus_Licence();
    $lic->setActive(1);
    $lic->setLanguage('deu');
    $lic->setLinkLicence('http://www.test.de');
    $lic->setNameLong('Ein langer LizenzName');
    $lic->store();
}
$doc->setLicence($lic);
开发者ID:alexukua,项目名称:opus4,代码行数:31,代码来源:create_all_fields_document.php

示例3:

$translator->store();
$doc->addPersonTranslator($translator);
$contributor = new Opus_Person();
$contributor->setFirstName('Jeff');
$contributor->setLastName('Smart');
$contributor->store();
$doc->addPersonContributor($contributor);
$doc->setCreatingCorporation('Walt Disney Creation Laboratories');
$doc->setContributingCorporation('Pixar Animation Studio');
$swd = $doc->addSubject()->setType('swd');
$swd->setValue('Test');
$freeSubjectDeu = $doc->addSubject()->setType('uncontrolled');
$freeSubjectDeu->setLanguage('deu')->setValue('Maustest');
$freeSubjectEng = $doc->addSubject()->setType('uncontrolled');
$freeSubjectEng->setLanguage('eng')->setValue('mouse test');
$note = $doc->addNote();
$note->setVisibility('public')->setMessage('ein Dokument, dass noch eine Bemerkung braucht, weil im Abstract nicht alles gesagt wurde...');
$noteTwo = $doc->addNote();
$noteTwo->setVisibility('private')->setMessage('und noch eine Bemerkung zum Bearbeitungsstand.');
$licences = Opus_Licence::getAll();
if (count($licences) >= 1) {
    $lic = $licences[0];
} else {
    $lic = new Opus_Licence();
    $lic->setActive(1);
    $lic->setLanguage('deu');
    $lic->setLinkLicence('http://www.test.de');
    $lic->setNameLong('Ein langer LizenzName');
    $lic->store();
}
$doc->setLicence($lic);
开发者ID:belapp,项目名称:opus4-application,代码行数:31,代码来源:create_all_fields_document.php

示例4: handleNotes

 /**
  *
  * @param DOMNode $node
  * @param Opus_Document $doc
  */
 private function handleNotes($node, $doc)
 {
     foreach ($node->childNodes as $childNode) {
         if ($childNode instanceof DOMElement) {
             $n = $doc->addNote();
             $n->setMessage(trim($childNode->textContent));
             $n->setVisibility($childNode->getAttribute('visibility'));
         }
     }
 }
开发者ID:alexukua,项目名称:opus4,代码行数:15,代码来源:MetadataImport.php


注:本文中的Opus_Document::addNote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。