-
Notifications
You must be signed in to change notification settings - Fork 16
Add groovy formatter #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.4.x
Are you sure you want to change the base?
Conversation
|
@fxprunayre please have a look thanks. |
| isofunc = new iso19139.Functions(handlers: handlers, f:f, env:env, commonHandlers: commonHandlers) | ||
| matchers = new Matchers(handlers: handlers, f:f, env:env) | ||
| packageViews = [ | ||
| 'mdb:identificationInfo', 'gmd:metadataMaintenance', 'gmd:metadataConstraints', 'mdb:spatialRepresentationInfo', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still some gmd namespace ref. Should be mdb here for most of them.
| handlers.add name: 'BBox Element', select: matchers.isBBox, bboxEl(false) | ||
| handlers.add name: 'Polygon Element', select: matchers.isPolygon, polygonEl(false) | ||
| handlers.add 'gex:geographicElement', commonHandlers.processChildren{it.children()} | ||
| handlers.add 'gmd:extentTypeCode', extentTypeCodeEl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gex here.
| def localeEls = { els -> | ||
| def locales = [] | ||
| els.each { | ||
| it.'gmd:PT_Locale'.each { loc -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lan here, and not gmd after for charset and language. Charset is now characterEncoding
| String thumbnailUrl; | ||
| if (img.startsWith("http://") || img.startsWith("https://")) { | ||
| thumbnailUrl = img.replace("&fname", "&fname"); | ||
| } else if (!isSmallImage(img) || !hasLargeGraphic) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed. Not used anymore in GN
| def f | ||
| def env | ||
|
|
||
| def isUrlEl = {!it.'gmd:URL'.text().isEmpty()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL does not exist anymore here. They are CharacterString and can be multilingual.
| * Rome - Italy. email: geonetwork@osgeo.org | ||
| */ | ||
|
|
||
| package iso191153 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would name it iso19115_3 like the package name for Java classes:
package org.fao.geonet.schema.iso19115_3;
| /** | ||
| * Creates the {@link org.fao.geonet.api.records.formatters.groovy.util.Summary} instance for the iso19139 class. | ||
| * | ||
| * @author Jesse on 11/18/2014. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really ;)
| * Rome - Italy. email: geonetwork@osgeo.org | ||
| */ | ||
|
|
||
| def isoHandlers = new iso19139.Handlers(handlers, f, env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 139 ?
| # Rome - Italy. email: geonetwork@osgeo.org | ||
| # | ||
|
|
||
| schemasToLoad=iso19139 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed ?
* Address most of the comments requested in PR metadata101#34 * Remove all 19139 namespace ref * URL is a normal CharacterString now * Aggregates are AssociatedResources * Remove small/large thumbnails concept code which does not exist anymore * Remove useless translation. This plugin is only available in english and french for now ... we should probably plan for more testing in here
No description provided.