Changeset 5578
- Timestamp:
- 08/20/14 11:59:28 (10 years ago)
- Location:
- VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard$ResourcesStep.html
r5574 r5578 16 16 <h4>Add resource or metadata references</h4> 17 17 <p> 18 Click 'add'to add an individual reference of the18 Click <strong>add</strong> to add an individual reference of the 19 19 type 'Metadata' or 'Resource' and optionally add a 20 20 label and/or description. 21 21 </p> 22 <p class="last">23 Click 'add more'to add multiple references (one per22 <p> 23 Click <strong>add more</strong> to add multiple references (one per 24 24 line) of one type without labels or resources. 25 25 Individual resources can be edited at any stage. 26 </p> 27 <p class="last"> 28 It is recommended to only use <em>persistent 29 identifiers</em> as references. The following are 30 examples of valid persistent identifiers: 31 <ul> 32 <li>hdl:1839/00-0000-0000-0001-305B-C</li> 33 <li>doi:10.10.1038/nphys1170</li> 34 <li>http://hdl.handle.net/1839/00-0000-0000-0000-0000-4</li> 35 <li>http://dx.doi.org/10.1002/0470841559.ch1</li> 36 </ul> 26 37 </p> 27 38 </div> -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/service/impl/ReferenceValidator.java
r5545 r5578 34 34 public class ReferenceValidator extends AbstractValidator<String> { 35 35 36 private static final Pattern HANDLE_PATTERN = Pattern.compile("^(hdl|doi):[0-9\\.]+\\/.+$"); 36 private static final String HANDLE_SPECIFIC_PART_PATTERN = "[0-9\\.]+\\/.+$"; 37 private static final Pattern HANDLE_PATTERN = Pattern.compile("^(hdl|doi):" + HANDLE_SPECIFIC_PART_PATTERN); 38 private static final Pattern HANDLE_RESOLVER_PATTERN = Pattern.compile("^http://(hdl\\.handle\\.net|dx\\.doi\\.org|)/" + HANDLE_SPECIFIC_PART_PATTERN); 37 39 private final IValidator<String> urlValidator = new UrlValidator(UrlValidator.NO_FRAGMENTS); 38 40 … … 54 56 return validatable.isValid(); 55 57 } 56 58 59 /** 60 * 61 * @param uri 62 * @return true IFF the expression is a URI consisting of a valid handle 63 * pattern preceded by a handle scheme expression (hdl: or doi:) OR one of 64 * the accepted handle resolver base URL's (http://hdl.handle.net or 65 * http://dx.doi.org) 66 */ 57 67 public static boolean isPid(CharSequence uri) { 58 return HANDLE_PATTERN.matcher(uri).matches(); 68 return HANDLE_PATTERN.matcher(uri).matches() 69 || HANDLE_RESOLVER_PATTERN.matcher(uri).matches(); 59 70 } 60 71 -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/webapp/css/_wizard.scss
r5574 r5578 101 101 background-color: #ffffe1; 102 102 color: #666666; 103 } 103 104 h4 { 105 text-align: center; 106 padding: 3px 0 3px 0; 107 margin: 0 0 3px 0; 108 border-width: 0 0 1px 0; 109 border-style: solid; 110 border-color: #666666; 111 color: #666666; 112 font-size: 100%; 113 } 114 115 p, ul { 116 margin: 0em 0em 0.5em 0em; 117 color: #666666; 118 font-size: 80%; 119 } 120 121 p.last { 122 margin: 0em; 123 } 124 } //div.notes, div.sidenotes 104 125 105 126 div.notes { … … 111 132 float: right; 112 133 width: 198px; 113 margin: 0 0 10px 10px; 114 } 115 116 div.notes h4 { 117 /* 118 background-image: url(/images/icon_info.gif); 119 background-repeat: no-repeat; 120 background-position: top left; 121 */ 122 text-align: center; 123 padding: 3px 0 3px 0; /*27px; */ 124 margin: 0 0 3px 0; 125 border-width: 0 0 1px 0; 126 border-style: solid; 127 border-color: #666666; 128 color: #666666; 129 font-size: 100%; 130 } 131 132 div.notes p { 133 margin: 0em 0em 0.5em 0em; 134 color: #666666; 135 font-size: 80%; 136 } 137 138 div.notes p.last { 139 margin: 0em; 134 margin: 0 0 10px 10px; 140 135 } 141 136 … … 200 195 div.modalDialogContent { 201 196 margin: 10px; 202 197 203 198 p { 204 199 margin: 1em; -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/test/java/eu/clarin/cmdi/virtualcollectionregistry/service/impl/VirtualCollectionPrePublicationValidatorTest.java
r5545 r5578 54 54 vc.getResources().add(new Resource(Resource.Type.METADATA, "hdl:1234/5678")); 55 55 vc.getResources().add(new Resource(Resource.Type.METADATA, "doi:1.2.3/456")); 56 vc.getResources().add(new Resource(Resource.Type.METADATA, "http://hdl.handle.net/1234/5678")); 57 vc.getResources().add(new Resource(Resource.Type.METADATA, "http://dx.doi.org/1.2.3/456")); 56 58 try { 57 59 instance.validate(vc);
Note: See TracChangeset
for help on using the changeset viewer.