org.deegree.metadata
Class MetadataRecordFactory

java.lang.Object
  extended by org.deegree.metadata.MetadataRecordFactory

public class MetadataRecordFactory
extends Object

Main entry point for creating MetadataRecord instances from XML representations. TODO Factory concept needs reconsideration, especially with regard to plugability for different metadata formats (ISO, ebRIM, ...). Ideally, this factory shouldn't have any compile-time dependencies to the concrete record types.

Version:
$Revision: 30786 $, $Date: 2011-05-11 18:28:17 +0200 (Wed, 11 May 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
MetadataRecordFactory()
           
 
Method Summary
static MetadataRecord create(File file)
          Creates a new MetadataRecord from the given file.
static MetadataRecord create(org.apache.axiom.om.OMElement rootEl)
          Creates a new MetadataRecord from the given element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataRecordFactory

public MetadataRecordFactory()
Method Detail

create

public static MetadataRecord create(org.apache.axiom.om.OMElement rootEl)
                             throws IllegalArgumentException
Creates a new MetadataRecord from the given element.

Parameters:
rootEl - root element, must not be null
Returns:
metadata record instance, never null
Throws:
IllegalArgumentException - if the metadata format is unknown / record invalid

create

public static MetadataRecord create(File file)
                             throws IllegalArgumentException
Creates a new MetadataRecord from the given file.

Parameters:
file - record file, must not be null
Returns:
metadata record instance, never null
Throws:
IllegalArgumentException - if the metadata format is unknown / record invalid


Copyright © 2011. All Rights Reserved.