edu.ucsb.nceas.morpho.datapackage
Class EML200DataPackage

java.lang.Object
  extended byedu.ucsb.nceas.morpho.datapackage.MetadataObject
      extended byedu.ucsb.nceas.morpho.datapackage.AbstractDataPackage
          extended byedu.ucsb.nceas.morpho.datapackage.EML200DataPackage
All Implemented Interfaces:
XMLFactoryInterface

public class EML200DataPackage
extends AbstractDataPackage

class that represents a data package. This class is abstract. Specific datapackages e.g. eml2, beta6., etc extend this abstact class


Field Summary
 
Fields inherited from class edu.ucsb.nceas.morpho.datapackage.AbstractDataPackage
BOTH, config, dataPkgFile, entityArray, fileSysDataStore, id, initialId, LOCAL, location, METACAT, metacatDataStore
 
Fields inherited from class edu.ucsb.nceas.morpho.datapackage.MetadataObject
doc, grammar, grammarType, metadataNode, metadataPathNode, root
 
Constructor Summary
EML200DataPackage()
           
 
Method Summary
 AbstractDataPackage download(java.lang.String id)
          Copies the AbstractDataPackage with the indicated id from metacat to the local file store
 java.lang.String getAuthor()
          override method in AbstractDataPackage to get all authors and combine name fields
 org.w3c.dom.Node getReferencedNode(org.w3c.dom.Node node)
          This method follows the pointer stored in 'references' node to return the DOM node referred to by 'references'
 org.w3c.dom.Node getSubtreeAtReference(java.lang.String refID)
          returns cloned root Node of subtree identified by the passed unique String refID; returns null if not found
 org.w3c.dom.Node getSubtreeAtReferenceNoClone(java.lang.String refID)
          returns pointer to root Node of subtree identified by the passed unique String refID; returns null if not found
 java.util.List getSubtreesThatReference(java.lang.String refID)
          returns a List of pointers to subtrees that reference (the subtree identified by) the passed refID.
 boolean ignoreConsecutiveDelimiters(int entityIndex, int physicalIndex)
          no tag in eml2.0 for this information it is being put in additionalMetadata until a new version of eml is released
 void load(java.lang.String location, java.lang.String identifier, Morpho morpho)
          This abstract method loads a datapackage from metacat or the local file system based on an identifier.
 org.w3c.dom.Node replaceSubtreeAtReference(java.lang.String refID, org.w3c.dom.Node newSubtreeRoot)
          replaces subtree identified by the passed unique String refID; returns null if not found.
 void serialize(java.lang.String location)
          This abstract method turns the datapackage into a form (e.g.
 AbstractDataPackage upload(java.lang.String id, boolean updatePackageId)
          Copies the AbstractDataPackage with the indicated id from the local file store to Metacat
 
Methods inherited from class edu.ucsb.nceas.morpho.datapackage.AbstractDataPackage
addAttributeForImport, addEntity, addNewUnit, appendAdditionalMetadata, clearAllAttributeImports, delete, deleteAllEntities, deleteAllSubtrees, deleteAttribute, deleteEntity, deleteSubtree, export, exportDataFiles, exportToZip, getAccessionNumber, getAttributeArray, getAttributeCountForAnEntity, getAttributeDataType, getAttributeID, getAttributeImportCount, getAttributeIndex, getAttributeName, getAttributeUnit, getCompressionMethod, getCoverageNode, getCurrentImportAttributeName, getCurrentImportEntityName, getCurrentImportMap, getCurrentImportScale, getCurrentImportXPath, getDistributionArray, getDistributionInlineData, getDistributionUrl, getEncodingMethod, getEntityArray, getEntityCount, getEntityDescription, getEntityID, getEntityIndex, getEntityName, getEntityNumRecords, getFileWithID, getGeographicNodeList, getIDsForNodesWithName, getInitialId, getKeywords, getLastImportedAttributes, getLastImportedDataSet, getLastImportedEntity, getLocation, getNewUniqueReferenceID, getOriginalEntityArray, getPackageId, getPhysicalArray, getPhysicalFieldDelimiter, getPhysicalFormat, getPhysicalName, getPhysicalNumberHeaderLines, getPhysicalSize, getSecondImportMap, getSubtree, getSubtreeNoClone, getSubtrees, getTaxonomicNodeList, getTemporalNodeList, getTitle, getUnitDictionaryCustomUnitTypes, getUnitDictionaryUnitsOfType, insertAttribute, insertCoverage, insertEntity, insertObjectIntoArray, insertSubtree, isCurrentImportNewTable, isNewCustomUnit, loadCustomUnits, openAsDom, openAsReader, removeAttributeForImport, removeGeographicNodes, removeTaxonomicNodes, removeTemporalNodes, replaceSubtree, serializeData, setAccessionNumber, setDistributionUrl, setEntityID, setEntityNumRecords, setInitialId, setLastImportedAttributes, setLastImportedDataSet, setLastImportedEntity, setLocation, setOriginalEntityArray, setPhysicalFieldDelimiter, setPhysicalSize, showPackageSummary, subtreeExists
 
Methods inherited from class edu.ucsb.nceas.morpho.datapackage.MetadataObject
getGenericValue, getMetadataNode, getMetadataPath, getXPathValue, main, setGenericValue, setMetadataNode, setMetadataPath, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EML200DataPackage

public EML200DataPackage()
Method Detail

serialize

public void serialize(java.lang.String location)
               throws MetacatUploadException
Description copied from class: AbstractDataPackage
This abstract method turns the datapackage into a form (e.g. string) that can be saved in the file system or metacat. Actual implementation is done in classes specific to grammar

Specified by:
serialize in class AbstractDataPackage
Parameters:
location - String
Returns:
true if there is no indicated problem; false, otherwise
Throws:
MetacatUploadException

load

public void load(java.lang.String location,
                 java.lang.String identifier,
                 Morpho morpho)
Description copied from class: AbstractDataPackage
This abstract method loads a datapackage from metacat or the local file system based on an identifier. Basic action is to create a DOM and assign it to the underlying MetadataObject. Actual implementation is done in classes specific to grammar

Specified by:
load in class AbstractDataPackage
Parameters:
location - String
identifier - String
morpho - Morpho

getAuthor

public java.lang.String getAuthor()
override method in AbstractDataPackage to get all authors and combine name fields

Overrides:
getAuthor in class AbstractDataPackage
Returns:
String

upload

public AbstractDataPackage upload(java.lang.String id,
                                  boolean updatePackageId)
                           throws MetacatUploadException
Description copied from class: AbstractDataPackage
Copies the AbstractDataPackage with the indicated id from the local file store to Metacat

Specified by:
upload in class AbstractDataPackage
Parameters:
id - String
Returns:
AbstractDataPackage
Throws:
MetacatUploadException

download

public AbstractDataPackage download(java.lang.String id)
Description copied from class: AbstractDataPackage
Copies the AbstractDataPackage with the indicated id from metacat to the local file store

Specified by:
download in class AbstractDataPackage
Parameters:
id - String
Returns:
AbstractDataPackage

getReferencedNode

public org.w3c.dom.Node getReferencedNode(org.w3c.dom.Node node)
This method follows the pointer stored in 'references' node to return the DOM node referred to by 'references'

Parameters:
node - Node
Returns:
Node

getSubtreeAtReference

public org.w3c.dom.Node getSubtreeAtReference(java.lang.String refID)
returns cloned root Node of subtree identified by the passed unique String refID; returns null if not found

Specified by:
getSubtreeAtReference in class AbstractDataPackage
Parameters:
refID - unique String refID
Returns:
cloned root Node of subtree, or null if refID not found

getSubtreesThatReference

public java.util.List getSubtreesThatReference(java.lang.String refID)
returns a List of pointers to subtrees that reference (the subtree identified by) the passed refID. More formally, returns a List of pointers to subtree root Nodes, where each subtree root Node contains a "references" child-node, and the content String of the references child-node matches the unique String refID passed to this method; returns an empty List if none found. Should never return null;

Specified by:
getSubtreesThatReference in class AbstractDataPackage
Parameters:
refID - unique String refID
Returns:
List of pointers to subtrees that reference the subtree identified by the passed refID. Returns an empty List if none found. Should never return null;

replaceSubtreeAtReference

public org.w3c.dom.Node replaceSubtreeAtReference(java.lang.String refID,
                                                  org.w3c.dom.Node newSubtreeRoot)
replaces subtree identified by the passed unique String refID; returns null if not found. Note that the new subtree will be given the same refID as the subtree it replaces, even if the newSubtreeRoot node has a different id set

Specified by:
replaceSubtreeAtReference in class AbstractDataPackage
Parameters:
refID - unique String refID. Note that the new subtree will be given the same refID as the subtree it replaces, even if the newSubtreeRoot node has a different id set
newSubtreeRoot - Node
Returns:
root Node of new subtree, or null if refID not found

getSubtreeAtReferenceNoClone

public org.w3c.dom.Node getSubtreeAtReferenceNoClone(java.lang.String refID)
returns pointer to root Node of subtree identified by the passed unique String refID; returns null if not found

Specified by:
getSubtreeAtReferenceNoClone in class AbstractDataPackage
Parameters:
refID - unique String refID
Returns:
pointer to root Node of subtree, or null if refID not found

ignoreConsecutiveDelimiters

public boolean ignoreConsecutiveDelimiters(int entityIndex,
                                           int physicalIndex)
no tag in eml2.0 for this information it is being put in additionalMetadata until a new version of eml is released

Specified by:
ignoreConsecutiveDelimiters in class AbstractDataPackage


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.