org.deegree.metadata.iso
Class ISORecord

java.lang.Object
  extended by org.deegree.metadata.iso.ISORecord
All Implemented Interfaces:
MetadataRecord

public class ISORecord
extends Object
implements MetadataRecord

Represents an ISO 19115 MetadataRecord.

An ISO 19115 record can be either a data or a service metadata record. The root element name for both types of records is {http://www.isotc211.org/2005/gmd}MD_Metadata.

Version:
$Revision: 31681 $, $Date: 2011-08-30 11:55:28 +0200 (Tue, 30 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Field Summary
static String ISO_RECORD_NS
          Namespace for ISORecord elements
static String SCHEMA_URL_GMD
          Schema URL for ISO Data and Service Metadata records
static String SCHEMA_URL_SRV
          Additional schema URL for Service Metadata records
 
Constructor Summary
ISORecord(org.apache.axiom.om.OMElement root)
           
ISORecord(XMLStreamReader xmlStream)
           
 
Method Summary
 boolean eval(Filter filter)
          Returns whether this MetadataRecord matches the given Filter expression.
 String[] getAbstract()
           
 byte[] getAsByteArray()
           
 org.apache.axiom.om.OMElement getAsOMElement()
          Returns the root element of the record.
 XMLStreamReader getAsXMLStream()
           
 Envelope[] getBoundingBox()
           
 String getContributor()
           
 String getCreator()
           
 String[] getFormat()
           
 String getIdentifier()
           
 String getLanguage()
           
 Date getModified()
           
 QName getName()
           
 org.apache.axiom.om.OMElement getNodeFromXPath(XPath xpath)
           
 String getParentIdentifier()
           
 ParsedProfileElement getParsedElement()
           
 String getPublisher()
           
 String[] getRelation()
           
 String[] getRights()
           
 String getSource()
           
 Object[] getSpatial()
           
 String getStringFromXPath(XPath xpath)
           
 String[] getSubject()
           
 String[] getTitle()
           
 String getType()
           
 boolean isHasSecurityConstraints()
           
 void removeNode(ValueReference propName)
           
 void serialize(XMLStreamWriter writer, CSWConstants.ReturnableElement returnType)
          Writes the XML representation of this record to the given XML stream.
 void serialize(XMLStreamWriter writer, String[] elementNames)
          Writes the XML representation of the specified elements to the given XML stream.
 DCRecord toDublinCore()
          Returns the Dublin Core representation of the requested record.
 String toString()
           
 void update(ValueReference propName, org.apache.axiom.om.OMElement newEl)
           
 void update(ValueReference propName, String s)
          Updates the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ISO_RECORD_NS

public static String ISO_RECORD_NS
Namespace for ISORecord elements


SCHEMA_URL_GMD

public static final String SCHEMA_URL_GMD
Schema URL for ISO Data and Service Metadata records

See Also:
Constant Field Values

SCHEMA_URL_SRV

public static final String SCHEMA_URL_SRV
Additional schema URL for Service Metadata records

See Also:
Constant Field Values
Constructor Detail

ISORecord

public ISORecord(XMLStreamReader xmlStream)

ISORecord

public ISORecord(org.apache.axiom.om.OMElement root)
Method Detail

getName

public QName getName()
Specified by:
getName in interface MetadataRecord

eval

public boolean eval(Filter filter)
Description copied from interface: MetadataRecord
Returns whether this MetadataRecord matches the given Filter expression.

Specified by:
eval in interface MetadataRecord
Parameters:
filter - filter to evaluate, must not be null
Returns:
true, if the record matches the filter, false otherwise

getAbstract

public String[] getAbstract()
Specified by:
getAbstract in interface MetadataRecord

getBoundingBox

public Envelope[] getBoundingBox()
Specified by:
getBoundingBox in interface MetadataRecord

getFormat

public String[] getFormat()
Specified by:
getFormat in interface MetadataRecord

getIdentifier

public String getIdentifier()
Specified by:
getIdentifier in interface MetadataRecord

getModified

public Date getModified()
Specified by:
getModified in interface MetadataRecord

getRelation

public String[] getRelation()
Specified by:
getRelation in interface MetadataRecord

getSpatial

public Object[] getSpatial()
Specified by:
getSpatial in interface MetadataRecord

getTitle

public String[] getTitle()
Specified by:
getTitle in interface MetadataRecord

getType

public String getType()
Specified by:
getType in interface MetadataRecord

getSubject

public String[] getSubject()
Specified by:
getSubject in interface MetadataRecord

getAsXMLStream

public XMLStreamReader getAsXMLStream()
                               throws XMLStreamException
Returns:
the ISORecord as xmlStreamReader with skipped startDocument-preamble
Throws:
XMLStreamException

getAsOMElement

public org.apache.axiom.om.OMElement getAsOMElement()
Description copied from interface: MetadataRecord
Returns the root element of the record.

Specified by:
getAsOMElement in interface MetadataRecord
Returns:
the root element, never null

getAsByteArray

public byte[] getAsByteArray()
                      throws FactoryConfigurationError
Throws:
FactoryConfigurationError

serialize

public void serialize(XMLStreamWriter writer,
                      CSWConstants.ReturnableElement returnType)
               throws XMLStreamException
Description copied from interface: MetadataRecord
Writes the XML representation of this record to the given XML stream.

Specified by:
serialize in interface MetadataRecord
Parameters:
writer - xml writer to write to, must not be null
returnType - the element set to return, never null
Throws:
XMLStreamException - if the writing of the XML fails

serialize

public void serialize(XMLStreamWriter writer,
                      String[] elementNames)
               throws XMLStreamException
Description copied from interface: MetadataRecord
Writes the XML representation of the specified elements to the given XML stream.

Specified by:
serialize in interface MetadataRecord
Parameters:
writer - xml writer to write to, must not be null
elementNames - the element set to return, must not be null.
Throws:
XMLStreamException - if the writing of the XML fails

toDublinCore

public DCRecord toDublinCore()
Description copied from interface: MetadataRecord
Returns the Dublin Core representation of the requested record.

Specified by:
toDublinCore in interface MetadataRecord
Returns:
DCRecord.

isHasSecurityConstraints

public boolean isHasSecurityConstraints()

getContributor

public String getContributor()
Specified by:
getContributor in interface MetadataRecord

getPublisher

public String getPublisher()
Specified by:
getPublisher in interface MetadataRecord

getRights

public String[] getRights()
Specified by:
getRights in interface MetadataRecord

getSource

public String getSource()
Specified by:
getSource in interface MetadataRecord

getCreator

public String getCreator()
Specified by:
getCreator in interface MetadataRecord

getLanguage

public String getLanguage()
Specified by:
getLanguage in interface MetadataRecord

getParentIdentifier

public String getParentIdentifier()

getParsedElement

public ParsedProfileElement getParsedElement()

getStringFromXPath

public String getStringFromXPath(XPath xpath)

getNodeFromXPath

public org.apache.axiom.om.OMElement getNodeFromXPath(XPath xpath)

update

public void update(ValueReference propName,
                   String s)
Description copied from interface: MetadataRecord
Updates the property.

Specified by:
update in interface MetadataRecord
Parameters:
propName - property name indicating the property to update, must not be null
s - the new string, must not be null

update

public void update(ValueReference propName,
                   org.apache.axiom.om.OMElement newEl)
Specified by:
update in interface MetadataRecord
Parameters:
propName - property name indicating the property to update, must not be null
newEl - the new OMElement to update the, must not be null

removeNode

public void removeNode(ValueReference propName)
Specified by:
removeNode in interface MetadataRecord
Parameters:
propName - property name indicating the property to remove, must not be null

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.