diff --git a/pom.xml b/pom.xml index 21059fa7..6c731be1 100644 --- a/pom.xml +++ b/pom.xml @@ -113,7 +113,7 @@ gov.nasa.pds registry-common - 2.0.0 + 2.1.0-SNAPSHOT diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/AutogenFieldsType.java b/src/main/java/gov/nasa/pds/harvest/cfg/AutogenFieldsType.java deleted file mode 100644 index b7c363fa..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/AutogenFieldsType.java +++ /dev/null @@ -1,103 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlType; - - -/** - * - * Determines how items found in the products should be indexed in the - * registry. Do not define this tag for normal, expected behavior. - * - * - *

Java class for autogen_fields_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *       
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "autogen_fields_type", propOrder = { - "classFilter" -}) -public class AutogenFieldsType { - - protected FilterType classFilter; - @XmlAttribute(name = "generate") - protected Boolean generate; - - /** - * Gets the value of the classFilter property. - * - * @return - * possible object is - * {@link FilterType } - * - */ - public FilterType getClassFilter() { - return classFilter; - } - - /** - * Sets the value of the classFilter property. - * - * @param value - * allowed object is - * {@link FilterType } - * - */ - public void setClassFilter(FilterType value) { - this.classFilter = value; - } - - /** - * Gets the value of the generate property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isGenerate() { - if (generate == null) { - return true; - } else { - return generate; - } - } - - /** - * Sets the value of the generate property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setGenerate(Boolean value) { - this.generate = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/BundleType.java b/src/main/java/gov/nasa/pds/harvest/cfg/BundleType.java deleted file mode 100644 index 4b98183b..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/BundleType.java +++ /dev/null @@ -1,188 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import java.util.ArrayList; -import java.util.List; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * Describe the bundle to be processed. - * - * @dir: must supply the directory that contains the bundle XML file - * @versions: a comma separated list of values but "all", the default, - * will ingest all versions. - * - * collection: list of collections to include but if not specified, then - * all collections found and referenced by the bundle will be - * included. - * product: list of product directories. Reason??? - * - * - *

Java class for bundle_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *         
- *       
- *       
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "bundle_type", propOrder = { - "collection", - "product" -}) -public class BundleType { - - protected List collection; - protected List product; - @XmlAttribute(name = "dir", required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String dir; - @XmlAttribute(name = "versions") - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String versions; - - /** - * Gets the value of the collection property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the collection property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getCollection().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link CollectionType } - * - * - * @return - * The value of the collection property. - */ - public List getCollection() { - if (collection == null) { - collection = new ArrayList<>(); - } - return this.collection; - } - - /** - * Gets the value of the product property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the product property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getProduct().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link ProductType } - * - * - * @return - * The value of the product property. - */ - public List getProduct() { - if (product == null) { - product = new ArrayList<>(); - } - return this.product; - } - - /** - * Gets the value of the dir property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDir() { - return dir; - } - - /** - * Sets the value of the dir property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDir(String value) { - this.dir = value; - } - - /** - * Gets the value of the versions property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getVersions() { - if (versions == null) { - return "all"; - } else { - return versions; - } - } - - /** - * Sets the value of the versions property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setVersions(String value) { - this.versions = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/BundlesType.java b/src/main/java/gov/nasa/pds/harvest/cfg/BundlesType.java deleted file mode 100644 index 2383c8d3..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/BundlesType.java +++ /dev/null @@ -1,81 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import java.util.ArrayList; -import java.util.List; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlType; - - -/** - * - * Unnecessary object to keep legacy format. - * - * - *

Java class for bundles_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "bundles_type", propOrder = { - "bundle" -}) -public class BundlesType { - - @XmlElement(required = true) - protected List bundle; - - /** - * Gets the value of the bundle property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the bundle property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getBundle().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link BundleType } - * - * - * @return - * The value of the bundle property. - */ - public List getBundle() { - if (bundle == null) { - bundle = new ArrayList<>(); - } - return this.bundle; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/CollectionType.java b/src/main/java/gov/nasa/pds/harvest/cfg/CollectionType.java deleted file mode 100644 index 6de1c96b..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/CollectionType.java +++ /dev/null @@ -1,119 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * The collection's LID or LIDVID. - * - * DEV notes: - * - * Unfortunately, cannot define mutually exclusive attributes - * without schematron and trying to avoid schematron. - * - * It may be better to ditch either lid or lidvid then if :: is found - * treat it as lidvid otherwise lid. Doing that would allow for the - * attribute lid as required but accept lidvids. - * - * - *

Java class for collection_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "collection_type") -public class CollectionType { - - @XmlAttribute(name = "lid") - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String lid; - @XmlAttribute(name = "lidvid") - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String lidvid; - - /** - * Gets the value of the lid property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getLid() { - if (lid == null) { - return ""; - } else { - return lid; - } - } - - /** - * Sets the value of the lid property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLid(String value) { - this.lid = value; - } - - /** - * Gets the value of the lidvid property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getLidvid() { - if (lidvid == null) { - return ""; - } else { - return lidvid; - } - } - - /** - * Sets the value of the lidvid property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLidvid(String value) { - this.lidvid = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/ConfigManager.java b/src/main/java/gov/nasa/pds/harvest/cfg/ConfigManager.java deleted file mode 100644 index 59a5b2b2..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/ConfigManager.java +++ /dev/null @@ -1,92 +0,0 @@ -package gov.nasa.pds.harvest.cfg; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.bind.JAXBException; -import org.glassfish.jaxb.runtime.v2.JAXBContextFactory; -import gov.nasa.pds.registry.common.ConnectionFactory; -import gov.nasa.pds.registry.common.EstablishConnectionFactory; -import gov.nasa.pds.registry.common.meta.cfg.FileRefRule; - -/** - * Harvest configuration file reader. - * - * @author karpenko - */ -public class ConfigManager -{ - private static HashMap indexNodeMap = new HashMap(); - static { - indexNodeMap.put("pds-atm-registry", "PDS_ATM"); - indexNodeMap.put("pds-eng-registry", "PDS_ENG"); - indexNodeMap.put("pds-geo-registry", "PDS_GEO"); - indexNodeMap.put("pds-img-registry", "PDS_IMG"); - indexNodeMap.put("pds-naif-registry", "PDS_NAIF"); - indexNodeMap.put("pds-ppi-registry", "PDS_PPI"); - indexNodeMap.put("pds-rms-registry", "PDS_RMS"); - indexNodeMap.put("pds-sbn-registry", "pds_SBN"); - indexNodeMap.put("psa-registry", "PSA"); - indexNodeMap.put("jaxa-registry", "JAXA"); - indexNodeMap.put("roscosmos", "ROSCOSMOS"); - } - static public List exchangeFileRef (List xml2beans) { - ArrayList beans = new ArrayList(); - FileRefRule rule; - for (FileRefType xml : xml2beans) { - rule = new FileRefRule(); - rule.prefix = xml.getReplacePrefix(); - rule.replacement = xml.getWith(); - beans.add (rule); - } - return beans; - } - static public List exchangeLids (List ids) { - ArrayList lids = new ArrayList(); - for (CollectionType id : ids) { - if (0 < id.getLid().length()) lids.add (id.getLid()); - } - return lids; - } - static public List exchangeLidvids (List ids) { - ArrayList lidvids = new ArrayList(); - for (CollectionType id : ids) { - if (0 < id.getLidvid().length()) lidvids.add (id.getLidvid()); - } - return lidvids; - } - static public String exchangeIndexForNode (String indexName) { - if (indexNodeMap.containsKey (indexName)) return indexNodeMap.get(indexName); - if (0 < indexName.indexOf("-registry")) return indexName.substring(0, indexName.indexOf("-registry")); - return "development"; - } - static public ConnectionFactory exchangeRegistry (RegistryType xml) throws Exception { - return EstablishConnectionFactory.from (xml.getValue(), xml.getAuth()); - } - static public HarvestConfigurationType read(File file) throws JAXBException { - JAXBContext jaxbContext = new JAXBContextFactory().createContext(new Class[]{Harvest.class}, null); - HarvestConfigurationType result = (HarvestConfigurationType)jaxbContext.createUnmarshaller().unmarshal(file); - ObjectFactory forge = new ObjectFactory(); - if (result.getAutogenFields() == null) { - result.setAutogenFields(forge.createAutogenFieldsType()); - } - if (result.getAutogenFields().getClassFilter() == null) { - result.getAutogenFields().setClassFilter(forge.createFilterType()); - } - if (result.getFileInfo() == null) { - result.setFileInfo(forge.createFileInfoType()); - } - if (result.getProductFilter() == null) { - result.setProductFilter(forge.createFilterType()); - } - if (result.getReferences() == null) { - result.setReferences(forge.createReferencesType()); - } - if (result.getXpathMaps() == null) { - result.setXpathMaps(forge.createXpathMapsType()); - } - return result; - } -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/DirsType.java b/src/main/java/gov/nasa/pds/harvest/cfg/DirsType.java deleted file mode 100644 index ea8149f7..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/DirsType.java +++ /dev/null @@ -1,85 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import java.util.ArrayList; -import java.util.List; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * - * - *

Java class for dirs_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "dirs_type", propOrder = { - "path" -}) -public class DirsType { - - @XmlElement(required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected List path; - - /** - * Gets the value of the path property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the path property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getPath().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - * @return - * The value of the path property. - */ - public List getPath() { - if (path == null) { - path = new ArrayList<>(); - } - return this.path; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/FileInfoType.java b/src/main/java/gov/nasa/pds/harvest/cfg/FileInfoType.java deleted file mode 100644 index 4d43d9ea..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/FileInfoType.java +++ /dev/null @@ -1,181 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import java.util.ArrayList; -import java.util.List; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlType; - - -/** - * - * Used to rename file locations from a local space to the install space. - * For instance, change /home/username/pdsfiles to - * https://public.space.com/pdsfiles, - * - * @processDataFiles: - * @storeJsonLabels: - * @storeLabels: - * - * - *

Java class for file_info_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *       
- *       
- *       
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "file_info_type", propOrder = { - "fileRef" -}) -public class FileInfoType { - - @XmlElement(required = true) - protected List fileRef; - @XmlAttribute(name = "processDataFiles") - protected Boolean processDataFiles; - @XmlAttribute(name = "storeJsonLabels") - protected Boolean storeJsonLabels; - @XmlAttribute(name = "storeLabels") - protected Boolean storeLabels; - - /** - * Gets the value of the fileRef property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the fileRef property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getFileRef().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link FileRefType } - * - * - * @return - * The value of the fileRef property. - */ - public List getFileRef() { - if (fileRef == null) { - fileRef = new ArrayList<>(); - } - return this.fileRef; - } - - /** - * Gets the value of the processDataFiles property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isProcessDataFiles() { - if (processDataFiles == null) { - return true; - } else { - return processDataFiles; - } - } - - /** - * Sets the value of the processDataFiles property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setProcessDataFiles(Boolean value) { - this.processDataFiles = value; - } - - /** - * Gets the value of the storeJsonLabels property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isStoreJsonLabels() { - if (storeJsonLabels == null) { - return true; - } else { - return storeJsonLabels; - } - } - - /** - * Sets the value of the storeJsonLabels property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setStoreJsonLabels(Boolean value) { - this.storeJsonLabels = value; - } - - /** - * Gets the value of the storeLabels property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isStoreLabels() { - if (storeLabels == null) { - return true; - } else { - return storeLabels; - } - } - - /** - * Sets the value of the storeLabels property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setStoreLabels(Boolean value) { - this.storeLabels = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/FileRefType.java b/src/main/java/gov/nasa/pds/harvest/cfg/FileRefType.java deleted file mode 100644 index 495962fa..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/FileRefType.java +++ /dev/null @@ -1,114 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * Describe the prefix of the filename to replace with new content. - * - * @replacePrefix: the string to find in the filename starting with the - * first character of the filename (no regex or globbing) - * @with: the replacement content - * - * Example: - * filename = /home/username/pdsfiles/someproduct.xml - * replacePrefix = /home/username/pdsfiles - * with = https://public.com/pdsfiles/root - * - * After this fileRef is used, filename would be: - * https://public.com/pdsfiles/root/someproduct.xml - * - * - *

Java class for file_ref_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "file_ref_type") -public class FileRefType { - - @XmlAttribute(name = "replacePrefix", required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String replacePrefix; - @XmlAttribute(name = "with", required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String with; - - /** - * Gets the value of the replacePrefix property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getReplacePrefix() { - return replacePrefix; - } - - /** - * Sets the value of the replacePrefix property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setReplacePrefix(String value) { - this.replacePrefix = value; - } - - /** - * Gets the value of the with property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getWith() { - return with; - } - - /** - * Sets the value of the with property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setWith(String value) { - this.with = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/FilesType.java b/src/main/java/gov/nasa/pds/harvest/cfg/FilesType.java deleted file mode 100644 index 0209b859..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/FilesType.java +++ /dev/null @@ -1,85 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import java.util.ArrayList; -import java.util.List; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * - * - *

Java class for files_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "files_type", propOrder = { - "manifest" -}) -public class FilesType { - - @XmlElement(required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected List manifest; - - /** - * Gets the value of the manifest property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the manifest property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getManifest().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - * @return - * The value of the manifest property. - */ - public List getManifest() { - if (manifest == null) { - manifest = new ArrayList<>(); - } - return this.manifest; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/FilterType.java b/src/main/java/gov/nasa/pds/harvest/cfg/FilterType.java deleted file mode 100644 index ac02a7dc..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/FilterType.java +++ /dev/null @@ -1,121 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import java.util.ArrayList; -import java.util.List; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * A simple container to hold two lists of strings, One for inclusion and - * the other for exclusion, - * - * - *

Java class for filter_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *         
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "filter_type", propOrder = { - "exclude", - "include" -}) -public class FilterType { - - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected List exclude; - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected List include; - - /** - * Gets the value of the exclude property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the exclude property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getExclude().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - * @return - * The value of the exclude property. - */ - public List getExclude() { - if (exclude == null) { - exclude = new ArrayList<>(); - } - return this.exclude; - } - - /** - * Gets the value of the include property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the include property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getInclude().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - * @return - * The value of the include property. - */ - public List getInclude() { - if (include == null) { - include = new ArrayList<>(); - } - return this.include; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/Harvest.java b/src/main/java/gov/nasa/pds/harvest/cfg/Harvest.java deleted file mode 100644 index 0c135eaa..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/Harvest.java +++ /dev/null @@ -1,48 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlRootElement; -import jakarta.xml.bind.annotation.XmlType; - - -/** - * - * This terrible construct is so that xjc can autodetect this as the - * root node for processing. Many things would be better but this is - * the most workable solution especially if the making of the binding - * code is automated in the pom. The only other real solution is to - * modify one of the classes generated by hand. - * - * - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "") -@XmlRootElement(name = "harvest") -public class Harvest - extends HarvestConfigurationType -{ - - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/HarvestConfigurationType.java b/src/main/java/gov/nasa/pds/harvest/cfg/HarvestConfigurationType.java deleted file mode 100644 index 5622b99f..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/HarvestConfigurationType.java +++ /dev/null @@ -1,242 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlSeeAlso; -import jakarta.xml.bind.annotation.XmlType; - - -/** - * - * These are the basic options for the harvest configuration file. - * - * - * autogenFields: should not be used except in development testing - * load: tells where and how to harvest PDS4 labels - * fileInfo: option allowing filename prefixes to be replaced - * nodeName: the PDS node that this harvest run applies to - * productFilter: should not be used except in development testing - * registry: define the server harvest should use - * xpathMaps: allow constraints in the PDS4 label to control harvesting - * - * - *

Java class for harvest_configuration_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *         
- *         
- *         
- *         
- *         
- *         
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "harvest_configuration_type", propOrder = { - -}) -@XmlSeeAlso({ - Harvest.class -}) -public class HarvestConfigurationType { - - protected AutogenFieldsType autogenFields; - @XmlElement(required = true) - protected LoadType load; - protected FileInfoType fileInfo; - protected FilterType productFilter; - protected ReferencesType references; - @XmlElement(required = true) - protected RegistryType registry; - protected XpathMapsType xpathMaps; - - /** - * Gets the value of the autogenFields property. - * - * @return - * possible object is - * {@link AutogenFieldsType } - * - */ - public AutogenFieldsType getAutogenFields() { - return autogenFields; - } - - /** - * Sets the value of the autogenFields property. - * - * @param value - * allowed object is - * {@link AutogenFieldsType } - * - */ - public void setAutogenFields(AutogenFieldsType value) { - this.autogenFields = value; - } - - /** - * Gets the value of the load property. - * - * @return - * possible object is - * {@link LoadType } - * - */ - public LoadType getLoad() { - return load; - } - - /** - * Sets the value of the load property. - * - * @param value - * allowed object is - * {@link LoadType } - * - */ - public void setLoad(LoadType value) { - this.load = value; - } - - /** - * Gets the value of the fileInfo property. - * - * @return - * possible object is - * {@link FileInfoType } - * - */ - public FileInfoType getFileInfo() { - return fileInfo; - } - - /** - * Sets the value of the fileInfo property. - * - * @param value - * allowed object is - * {@link FileInfoType } - * - */ - public void setFileInfo(FileInfoType value) { - this.fileInfo = value; - } - - /** - * Gets the value of the productFilter property. - * - * @return - * possible object is - * {@link FilterType } - * - */ - public FilterType getProductFilter() { - return productFilter; - } - - /** - * Sets the value of the productFilter property. - * - * @param value - * allowed object is - * {@link FilterType } - * - */ - public void setProductFilter(FilterType value) { - this.productFilter = value; - } - - /** - * Gets the value of the references property. - * - * @return - * possible object is - * {@link ReferencesType } - * - */ - public ReferencesType getReferences() { - return references; - } - - /** - * Sets the value of the references property. - * - * @param value - * allowed object is - * {@link ReferencesType } - * - */ - public void setReferences(ReferencesType value) { - this.references = value; - } - - /** - * Gets the value of the registry property. - * - * @return - * possible object is - * {@link RegistryType } - * - */ - public RegistryType getRegistry() { - return registry; - } - - /** - * Sets the value of the registry property. - * - * @param value - * allowed object is - * {@link RegistryType } - * - */ - public void setRegistry(RegistryType value) { - this.registry = value; - } - - /** - * Gets the value of the xpathMaps property. - * - * @return - * possible object is - * {@link XpathMapsType } - * - */ - public XpathMapsType getXpathMaps() { - return xpathMaps; - } - - /** - * Sets the value of the xpathMaps property. - * - * @param value - * allowed object is - * {@link XpathMapsType } - * - */ - public void setXpathMaps(XpathMapsType value) { - this.xpathMaps = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/LoadType.java b/src/main/java/gov/nasa/pds/harvest/cfg/LoadType.java deleted file mode 100644 index b0bfe98a..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/LoadType.java +++ /dev/null @@ -1,126 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlType; - - -/** - * - * DEV notes: - * - * Had to bury this one deeper because cannot have a choice in an all. - * - * - *

Java class for load_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *         
- *         
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "load_type", propOrder = { - "bundles", - "directories", - "files" -}) -public class LoadType { - - protected BundlesType bundles; - protected DirsType directories; - protected FilesType files; - - /** - * Gets the value of the bundles property. - * - * @return - * possible object is - * {@link BundlesType } - * - */ - public BundlesType getBundles() { - return bundles; - } - - /** - * Sets the value of the bundles property. - * - * @param value - * allowed object is - * {@link BundlesType } - * - */ - public void setBundles(BundlesType value) { - this.bundles = value; - } - - /** - * Gets the value of the directories property. - * - * @return - * possible object is - * {@link DirsType } - * - */ - public DirsType getDirectories() { - return directories; - } - - /** - * Sets the value of the directories property. - * - * @param value - * allowed object is - * {@link DirsType } - * - */ - public void setDirectories(DirsType value) { - this.directories = value; - } - - /** - * Gets the value of the files property. - * - * @return - * possible object is - * {@link FilesType } - * - */ - public FilesType getFiles() { - return files; - } - - /** - * Sets the value of the files property. - * - * @param value - * allowed object is - * {@link FilesType } - * - */ - public void setFiles(FilesType value) { - this.files = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/ObjectFactory.java b/src/main/java/gov/nasa/pds/harvest/cfg/ObjectFactory.java deleted file mode 100644 index ba1b5b3d..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/ObjectFactory.java +++ /dev/null @@ -1,208 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlRegistry; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the gov.nasa.pds.harvest.cfg package. - *

An ObjectFactory allows you to programmatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: gov.nasa.pds.harvest.cfg - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link Harvest } - * - * @return - * the new instance of {@link Harvest } - */ - public Harvest createHarvest() { - return new Harvest(); - } - - /** - * Create an instance of {@link HarvestConfigurationType } - * - * @return - * the new instance of {@link HarvestConfigurationType } - */ - public HarvestConfigurationType createHarvestConfigurationType() { - return new HarvestConfigurationType(); - } - - /** - * Create an instance of {@link AutogenFieldsType } - * - * @return - * the new instance of {@link AutogenFieldsType } - */ - public AutogenFieldsType createAutogenFieldsType() { - return new AutogenFieldsType(); - } - - /** - * Create an instance of {@link LoadType } - * - * @return - * the new instance of {@link LoadType } - */ - public LoadType createLoadType() { - return new LoadType(); - } - - /** - * Create an instance of {@link FileInfoType } - * - * @return - * the new instance of {@link FileInfoType } - */ - public FileInfoType createFileInfoType() { - return new FileInfoType(); - } - - /** - * Create an instance of {@link FilterType } - * - * @return - * the new instance of {@link FilterType } - */ - public FilterType createFilterType() { - return new FilterType(); - } - - /** - * Create an instance of {@link ReferencesType } - * - * @return - * the new instance of {@link ReferencesType } - */ - public ReferencesType createReferencesType() { - return new ReferencesType(); - } - - /** - * Create an instance of {@link RegistryType } - * - * @return - * the new instance of {@link RegistryType } - */ - public RegistryType createRegistryType() { - return new RegistryType(); - } - - /** - * Create an instance of {@link XpathMapsType } - * - * @return - * the new instance of {@link XpathMapsType } - */ - public XpathMapsType createXpathMapsType() { - return new XpathMapsType(); - } - - /** - * Create an instance of {@link BundleType } - * - * @return - * the new instance of {@link BundleType } - */ - public BundleType createBundleType() { - return new BundleType(); - } - - /** - * Create an instance of {@link BundlesType } - * - * @return - * the new instance of {@link BundlesType } - */ - public BundlesType createBundlesType() { - return new BundlesType(); - } - - /** - * Create an instance of {@link CollectionType } - * - * @return - * the new instance of {@link CollectionType } - */ - public CollectionType createCollectionType() { - return new CollectionType(); - } - - /** - * Create an instance of {@link DirsType } - * - * @return - * the new instance of {@link DirsType } - */ - public DirsType createDirsType() { - return new DirsType(); - } - - /** - * Create an instance of {@link FileRefType } - * - * @return - * the new instance of {@link FileRefType } - */ - public FileRefType createFileRefType() { - return new FileRefType(); - } - - /** - * Create an instance of {@link FilesType } - * - * @return - * the new instance of {@link FilesType } - */ - public FilesType createFilesType() { - return new FilesType(); - } - - /** - * Create an instance of {@link ProductType } - * - * @return - * the new instance of {@link ProductType } - */ - public ProductType createProductType() { - return new ProductType(); - } - - /** - * Create an instance of {@link XpathMapType } - * - * @return - * the new instance of {@link XpathMapType } - */ - public XpathMapType createXpathMapType() { - return new XpathMapType(); - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/ProductType.java b/src/main/java/gov/nasa/pds/harvest/cfg/ProductType.java deleted file mode 100644 index 9f254430..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/ProductType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * - * - *

Java class for product_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "product_type") -public class ProductType { - - @XmlAttribute(name = "dir", required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String dir; - - /** - * Gets the value of the dir property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDir() { - return dir; - } - - /** - * Sets the value of the dir property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDir(String value) { - this.dir = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/ReferencesType.java b/src/main/java/gov/nasa/pds/harvest/cfg/ReferencesType.java deleted file mode 100644 index e8ae9861..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/ReferencesType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlType; - - -/** - * - * Seems like a forgotten idea - * - * - *

Java class for references_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "references_type") -public class ReferencesType { - - @XmlAttribute(name = "primaryOnly") - protected Boolean primaryOnly; - - /** - * Gets the value of the primaryOnly property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isPrimaryOnly() { - if (primaryOnly == null) { - return false; - } else { - return primaryOnly; - } - } - - /** - * Sets the value of the primaryOnly property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setPrimaryOnly(Boolean value) { - this.primaryOnly = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/RegistryType.java b/src/main/java/gov/nasa/pds/harvest/cfg/RegistryType.java deleted file mode 100644 index ebd10c76..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/RegistryType.java +++ /dev/null @@ -1,109 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.XmlValue; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * Define the connection to the registry, security for the connection, and - * the index within the registry. The value of this tag is a pointer to - * a registry connection like app://known/direct/localhost.xml or - * app://known/cognito/first_test.xml - * - * @auth: a java property file containing a username and password - * - * - *

Java class for registry_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "registry_type", propOrder = { - "value" -}) -public class RegistryType { - - @XmlValue - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String value; - @XmlAttribute(name = "auth", required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String auth; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the auth property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAuth() { - return auth; - } - - /** - * Sets the value of the auth property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAuth(String value) { - this.auth = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/XpathMapType.java b/src/main/java/gov/nasa/pds/harvest/cfg/XpathMapType.java deleted file mode 100644 index f63797f2..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/XpathMapType.java +++ /dev/null @@ -1,113 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * Point at an xpath file to apply against PDS4 labels. If @rootElement - * is the default value, then the xpath file will be applied to labels. - * Otherwise only those labels with matching @rootElement will have the - * xpath file applied. - * - * @filePath: location of the xpath file - * @rootElement: name of the root element to apply xpath file with default - * being all. - * - * - *

Java class for xpath_map_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "xpath_map_type") -public class XpathMapType { - - @XmlAttribute(name = "filePath", required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String filePath; - @XmlAttribute(name = "rootElement") - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String rootElement; - - /** - * Gets the value of the filePath property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFilePath() { - return filePath; - } - - /** - * Sets the value of the filePath property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFilePath(String value) { - this.filePath = value; - } - - /** - * Gets the value of the rootElement property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getRootElement() { - if (rootElement == null) { - return ""; - } else { - return rootElement; - } - } - - /** - * Sets the value of the rootElement property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setRootElement(String value) { - this.rootElement = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/XpathMapsType.java b/src/main/java/gov/nasa/pds/harvest/cfg/XpathMapsType.java deleted file mode 100644 index 58b14035..00000000 --- a/src/main/java/gov/nasa/pds/harvest/cfg/XpathMapsType.java +++ /dev/null @@ -1,114 +0,0 @@ -// -// This file was generated by the Eclipse Implementation of JAXB, v4.0.3 -// See https://eclipse-ee4j.github.io/jaxb-ri -// Any modifications to this file will be lost upon recompilation of the source schema. -// - - -package gov.nasa.pds.harvest.cfg; - -import java.util.ArrayList; -import java.util.List; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlAttribute; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlSchemaType; -import jakarta.xml.bind.annotation.XmlType; -import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * - * The xpaths to apply to PDS4 labels for determining harvesting. - * - * - *

Java class for xpath_maps_type complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

{@code
- * 
- *   
- *     
- *       
- *         
- *       
- *       
- *     
- *   
- * 
- * }
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "xpath_maps_type", propOrder = { - "xpathMap" -}) -public class XpathMapsType { - - @XmlElement(required = true) - protected List xpathMap; - @XmlAttribute(name = "baseDir", required = true) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - @XmlSchemaType(name = "normalizedString") - protected String baseDir; - - /** - * Gets the value of the xpathMap property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a {@code set} method for the xpathMap property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getXpathMap().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link XpathMapType } - * - * - * @return - * The value of the xpathMap property. - */ - public List getXpathMap() { - if (xpathMap == null) { - xpathMap = new ArrayList<>(); - } - return this.xpathMap; - } - - /** - * Gets the value of the baseDir property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getBaseDir() { - return baseDir; - } - - /** - * Sets the value of the baseDir property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setBaseDir(String value) { - this.baseDir = value; - } - -} diff --git a/src/main/java/gov/nasa/pds/harvest/cmd/HarvestCmd.java b/src/main/java/gov/nasa/pds/harvest/cmd/HarvestCmd.java index 837fb6a9..ae8c69e1 100644 --- a/src/main/java/gov/nasa/pds/harvest/cmd/HarvestCmd.java +++ b/src/main/java/gov/nasa/pds/harvest/cmd/HarvestCmd.java @@ -5,9 +5,6 @@ import org.apache.commons.cli.CommandLine; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import gov.nasa.pds.harvest.cfg.BundleType; -import gov.nasa.pds.harvest.cfg.ConfigManager; -import gov.nasa.pds.harvest.cfg.HarvestConfigurationType; import gov.nasa.pds.harvest.crawler.BundleProcessor; import gov.nasa.pds.harvest.crawler.CollectionProcessor; import gov.nasa.pds.harvest.crawler.Counter; @@ -20,6 +17,9 @@ import gov.nasa.pds.harvest.util.PackageIdGenerator; import gov.nasa.pds.harvest.util.log.LogUtils; import gov.nasa.pds.harvest.util.out.WriterManager; +import gov.nasa.pds.registry.common.cfg.BundleType; +import gov.nasa.pds.registry.common.cfg.ConfigManager; +import gov.nasa.pds.registry.common.cfg.HarvestConfigurationType; import gov.nasa.pds.registry.common.meta.BasicMetadataExtractor; import gov.nasa.pds.registry.common.util.ArchiveStatus; diff --git a/src/main/java/gov/nasa/pds/harvest/crawler/BaseProcessor.java b/src/main/java/gov/nasa/pds/harvest/crawler/BaseProcessor.java index 6d1f4905..9c65d09d 100644 --- a/src/main/java/gov/nasa/pds/harvest/crawler/BaseProcessor.java +++ b/src/main/java/gov/nasa/pds/harvest/crawler/BaseProcessor.java @@ -7,10 +7,10 @@ import org.apache.logging.log4j.Logger; import gov.nasa.pds.harvest.dao.RegistryManager; -import gov.nasa.pds.harvest.cfg.HarvestConfigurationType; import gov.nasa.pds.harvest.dao.MetadataWriter; import gov.nasa.pds.harvest.meta.XPathExtractor; import gov.nasa.pds.harvest.util.PackageIdGenerator; +import gov.nasa.pds.registry.common.cfg.HarvestConfigurationType; import gov.nasa.pds.registry.common.es.service.MissingFieldsProcessor; import gov.nasa.pds.registry.common.meta.AutogenExtractor; import gov.nasa.pds.registry.common.meta.BasicMetadataExtractor; diff --git a/src/main/java/gov/nasa/pds/harvest/crawler/BundleProcessor.java b/src/main/java/gov/nasa/pds/harvest/crawler/BundleProcessor.java index 48d74fe0..ae5fa63d 100644 --- a/src/main/java/gov/nasa/pds/harvest/crawler/BundleProcessor.java +++ b/src/main/java/gov/nasa/pds/harvest/crawler/BundleProcessor.java @@ -15,10 +15,10 @@ import gov.nasa.pds.harvest.dao.RegistryManager; import gov.nasa.pds.harvest.util.xml.XmlIs; -import gov.nasa.pds.harvest.cfg.BundleType; -import gov.nasa.pds.harvest.cfg.ConfigManager; -import gov.nasa.pds.harvest.cfg.HarvestConfigurationType; import gov.nasa.pds.harvest.dao.RegistryDao; +import gov.nasa.pds.registry.common.cfg.BundleType; +import gov.nasa.pds.registry.common.cfg.ConfigManager; +import gov.nasa.pds.registry.common.cfg.HarvestConfigurationType; import gov.nasa.pds.registry.common.meta.BundleMetadataExtractor; import gov.nasa.pds.registry.common.meta.Metadata; import gov.nasa.pds.registry.common.util.xml.XmlDomUtils; diff --git a/src/main/java/gov/nasa/pds/harvest/crawler/CollectionProcessor.java b/src/main/java/gov/nasa/pds/harvest/crawler/CollectionProcessor.java index 259bb71f..b8374dd0 100644 --- a/src/main/java/gov/nasa/pds/harvest/crawler/CollectionProcessor.java +++ b/src/main/java/gov/nasa/pds/harvest/crawler/CollectionProcessor.java @@ -13,12 +13,12 @@ import gov.nasa.pds.registry.common.util.CloseUtils; import org.w3c.dom.Document; -import gov.nasa.pds.harvest.cfg.BundleType; -import gov.nasa.pds.harvest.cfg.ConfigManager; -import gov.nasa.pds.harvest.cfg.HarvestConfigurationType; import gov.nasa.pds.harvest.dao.RegistryDao; import gov.nasa.pds.harvest.dao.RegistryManager; import gov.nasa.pds.harvest.util.xml.XmlIs; +import gov.nasa.pds.registry.common.cfg.BundleType; +import gov.nasa.pds.registry.common.cfg.ConfigManager; +import gov.nasa.pds.registry.common.cfg.HarvestConfigurationType; import gov.nasa.pds.registry.common.es.service.CollectionInventoryWriter; import gov.nasa.pds.registry.common.meta.CollectionMetadataExtractor; import gov.nasa.pds.registry.common.meta.Metadata; diff --git a/src/main/java/gov/nasa/pds/harvest/crawler/FilesProcessor.java b/src/main/java/gov/nasa/pds/harvest/crawler/FilesProcessor.java index eb36047f..9dfdf8f3 100644 --- a/src/main/java/gov/nasa/pds/harvest/crawler/FilesProcessor.java +++ b/src/main/java/gov/nasa/pds/harvest/crawler/FilesProcessor.java @@ -14,13 +14,13 @@ import java.util.stream.Stream; import org.w3c.dom.Document; -import gov.nasa.pds.harvest.cfg.HarvestConfigurationType; -import gov.nasa.pds.harvest.cfg.ConfigManager; import gov.nasa.pds.harvest.dao.RegistryDao; import gov.nasa.pds.harvest.dao.RegistryManager; import gov.nasa.pds.harvest.util.out.SupplementalWriter; import gov.nasa.pds.harvest.util.out.WriterManager; import gov.nasa.pds.harvest.util.xml.XmlIs; +import gov.nasa.pds.registry.common.cfg.ConfigManager; +import gov.nasa.pds.registry.common.cfg.HarvestConfigurationType; import gov.nasa.pds.registry.common.es.service.CollectionInventoryWriter; import gov.nasa.pds.registry.common.meta.BundleMetadataExtractor; import gov.nasa.pds.registry.common.meta.CollectionMetadataExtractor; diff --git a/src/main/java/gov/nasa/pds/harvest/crawler/ProductProcessor.java b/src/main/java/gov/nasa/pds/harvest/crawler/ProductProcessor.java index 6776665e..69205e4c 100644 --- a/src/main/java/gov/nasa/pds/harvest/crawler/ProductProcessor.java +++ b/src/main/java/gov/nasa/pds/harvest/crawler/ProductProcessor.java @@ -13,14 +13,14 @@ import gov.nasa.pds.registry.common.util.CloseUtils; import org.w3c.dom.Document; -import gov.nasa.pds.harvest.cfg.BundleType; -import gov.nasa.pds.harvest.cfg.ConfigManager; -import gov.nasa.pds.harvest.cfg.HarvestConfigurationType; -import gov.nasa.pds.harvest.cfg.ProductType; import gov.nasa.pds.harvest.dao.RegistryManager; import gov.nasa.pds.harvest.util.out.SupplementalWriter; import gov.nasa.pds.harvest.util.out.WriterManager; import gov.nasa.pds.harvest.util.xml.XmlIs; +import gov.nasa.pds.registry.common.cfg.BundleType; +import gov.nasa.pds.registry.common.cfg.ConfigManager; +import gov.nasa.pds.registry.common.cfg.HarvestConfigurationType; +import gov.nasa.pds.registry.common.cfg.ProductType; import gov.nasa.pds.registry.common.meta.Metadata; import gov.nasa.pds.registry.common.util.xml.XmlDomUtils; import gov.nasa.pds.registry.common.util.xml.XmlNamespaces; diff --git a/src/main/java/gov/nasa/pds/harvest/meta/XPathCacheLoader.java b/src/main/java/gov/nasa/pds/harvest/meta/XPathCacheLoader.java index ff13c981..d6d5e23e 100644 --- a/src/main/java/gov/nasa/pds/harvest/meta/XPathCacheLoader.java +++ b/src/main/java/gov/nasa/pds/harvest/meta/XPathCacheLoader.java @@ -1,18 +1,16 @@ package gov.nasa.pds.harvest.meta; import java.io.File; - import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathFactory; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import gov.nasa.pds.harvest.cfg.XpathMapType; -import gov.nasa.pds.harvest.cfg.XpathMapsType; import gov.nasa.pds.harvest.util.xml.XPathCache; +import gov.nasa.pds.registry.common.cfg.XpathMapType; +import gov.nasa.pds.registry.common.cfg.XpathMapsType; import gov.nasa.pds.registry.common.util.xml.XPathUtils; import gov.nasa.pds.registry.common.util.xml.XmlDomUtils;