XML
[ class tree: XML ] [ index: XML ] [ all elements ]

Class: XML_NITF

Source Location: /XML_NITF-1.0.1/NITF.php

Class Overview

XML_Parser
   |
   --XML_NITF

Generic NITF Parser class


Author(s):

Version:

  • 1.4

Methods


Inherited Variables

Inherited Methods


Class Details

[line 38]
Generic NITF Parser class

This class provides basic NITF parsing. Many of the major elements of the NITF standard are supported. This implementation is based off the NITF 3.1 DTD, publicly available at the following URL:

http://www.nitf.org/site/nitf-documentation/nitf-3-1.dtd

Note that not all elements of this standard are not supported.



[ Top ]


Method Detail

getBibliography   [line 367]

string getBibliography( )

Returns the free-form bibliographic data
  • Return: The bibliography (if one exists) is returned
  • Access: public

[ Top ]

getByline   [line 267]

void getByline( [string $sProperty = 'author'])

Return information about the author of a document
  • Access: public

Parameters:

string   $sProperty   —  The field of the byline to retrieve.

[ Top ]

getContent   [line 341]

array &getContent( )

Returns the paragraphs of content
  • Return: An array of elements that represent a single paragraph each
  • Access: public

[ Top ]

getDocData   [line 181]

mixed getDocData( [string $sProperty = null])

Access all or specific elements of the <docdata> block
  • Return: All of the elements from the <docdata> block will be returned if a specific property is not provided. If a specific property is requested and is found in the docdata block, then that property will be returned. If the property cannot be found, null is returned.
  • See: getDocDataElement()
  • Access: public

Parameters:

string   $sProperty   — 

The property of the <docdata> block to return, the most common being:

"doc-id" - a unique identifier of this document (string) "key-list" - a list of keywords provided with the document (array) "copyright" - the copyright holder (string) "series" - if the document is part of series (string) "urgency" - a number between 1 (urgent) and 8 (not urgent) (integer) "date.issue" - date the document was issued (UNIX timestamp) "date.release" - date the document is publicly available (UNIX timestamp) "date.expires" - date the document is no longer valid (UNIX timestamp)


[ Top ]

getHeadline   [line 254]

mixed getHeadline( [string $nLevel = 1])

Retrieve all headlines or a single headline denoted by key
  • Return: Returns an array if no specific headline element is requested, or a string if the specific headline element requested exists
  • Access: public

Parameters:

string   $nLevel   —  The key value corresponding to the headline to be retrieved

[ Top ]

getLede   [line 323]

string getLede( )

Returns the lede (sometimes called lead) paragraph
  • Return: Returns the lede paragraph if it is defined, or null otherwise
  • Access: public

[ Top ]

getMedia   [line 292]

array getMedia( [string $sProperty = null])

Query for a list of related media elements
  • Return: Returns an array of all media reference data, or an array of select media reference data determined by the property parameter passed.
  • Access: public

Parameters:

string   $sProperty   —  If supplied, only this property will be returned for each element of the media reference array.

[ Top ]

getPubData   [line 206]

mixed getPubData( [ $sProperty = null])

Returns all elements or a specific element from the <pubdata> block
  • Return: Returns string, numeric, or array values depending on the property being accessed from the <pubdata> block.
  • Access: public

Parameters:

   $sProperty   — 

[ Top ]

getRevision   [line 237]

array getRevision( )

Get the revision history
  • Return:

    An array containing key-value arrays. The properties of each array element in this array are:

    "comment" - Reason for the revision "function" - Job function of individual performing revision "name" - Name of the person who made the revision "norm" - Date of the revision

  • Access: public

[ Top ]

getTagline   [line 354]

string getTagline( )

Returns the tag line (if one exists)
  • Return: The tag line extracted from the NITF data source
  • Access: public

[ Top ]

toString   [line 384]

string &toString( [string $sCRLF = "\n"])

Get a string version of the article
  • Return: A string representing the main headline, author, content, and tagline.
  • Access: public

Parameters:

string   $sCRLF   —  The character(s) used to separate each article element in the string that is returned - often referred to as the CRLF.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:13:52 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.