new CswParserModel()
modules/cswParser/model.js, line 26
Properties:
Name | Type | Default | Description |
---|---|---|---|
cswId |
String | "" | Id of csw service, corresponding to rest-services.json |
Fires:
Listens to Events:
Extends
Methods
-
getDateTimeStringByStatus(dates, status, fallbackStatus){String}
modules/cswParser/model.js, line 335 -
Parses the given XML and returns the date with given status. If no date is found and fallback status is defined it recursionly calls itsef with fallback status as new status.
Name Type Description dates
XML Preparsed dates as XML. status
String Status of the date Object to be used fallbackStatus
String Fallback if no date with given status is found Returns:
raw date String extractec from XML.
-
getMetaData(cswObj){void}
modules/cswParser/model.js, line 39 -
Requests the meta data from the corresponding service.
Name Type Description cswObj
Object Object of CSW request information. Fires:
-
getNormalDateTimeString(dates){String}
modules/cswParser/model.js, line 318 -
Parses the given XML and returns a date string using the following logic. First look for revision date. If there is no revision date look for publication date. If no publication date fallback to creation date.
Name Type Description dates
XML Preparsed dates as XML. Returns:
raw date String extractec from XML.
-
parseAbstractText(xmlDoc){String}
modules/cswParser/model.js, line 188 -
Parses the abstract text part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
Abstract text of the meta data entry
-
parseAddress(xmlDoc){Object}
modules/cswParser/model.js, line 165 -
Parses the address part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
Address of the meta data entry's owner
-
parseData(xmlDoc, cswObj){void}
modules/cswParser/model.js, line 61 -
Parses the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. cswObj
Object Object of CSW request information. Fires:
-
parseDate(xmlDoc, status, fallbackStatus){String}
modules/cswParser/model.js, line 297 -
Parses the XML Document and returns the formatted date defined in status. If no status is defined there is a given logic to search for the latest date
Name Type Description xmlDoc
XML The returned XML Document from the requested CSW-Interface containing possibly multiple dates. status
String The defined date status to be extracted. fallbackStatus
String If date with given status returns undefined the fallback status is parsed. Returns:
date in Format (DD.MM.YYYY).
-
parseDownloadLinks(xmlDoc){Array}
modules/cswParser/model.js, line 127 -
Parses the download link part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
array of download links
-
parseEmail(xmlDoc){String}
modules/cswParser/model.js, line 225 -
Parses the e-mail part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
e-mail of the meta data entry's owner
-
parseOrga(xmlDoc, roleType){String}
modules/cswParser/model.js, line 265 -
Parses the organisation part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. roleType
String Type of role which shall be parsed ("owner", "pointOfContact"). Returns:
details of organisation of the meta data entry's owner
-
parseOrgaOwner(xmlDoc){String}
modules/cswParser/model.js, line 252 -
Parses the organisation name of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
name of the organisation of the meta data entry's owner
-
parsePeriodicity(xmlDoc){String}
modules/cswParser/model.js, line 360 -
Parses the periodicity part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
type of date for this frequency
-
parseTel(xmlDoc){String}
modules/cswParser/model.js, line 237 -
Parses the phone number part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
phone number of the meta data entry's owner
-
parseTitle(xmlDoc, cswObj){String}
modules/cswParser/model.js, line 153 -
Parses the title part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. cswObj
Object Object of CSW request information. Returns:
Title of the meta data entry
-
parseUrl(xmlDoc){String}
modules/cswParser/model.js, line 212 -
Parses the URL part of the data returned by the meta data request.
Name Type Description xmlDoc
Object Result of the meta data request. Returns:
URL of the meta data entry's owner