All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nasa.pds.citool.CIToolIngester Maven / Gradle / Ivy

Go to download

The Legacy Catalog Tool provides functionality for ingesting PDS3 catalog files into the PDS4 infrastructure including the Registry Service.

There is a newer version: 3.1.0
Show newest version
package gov.nasa.pds.citool;

import gov.nasa.pds.citool.comparator.CatalogComparator;
import gov.nasa.pds.citool.ingestor.CatalogObject;
import gov.nasa.pds.citool.ingestor.CatalogVolumeIngester;
import gov.nasa.pds.citool.report.IngestReport;
import gov.nasa.pds.citool.search.DocGenerator;
import gov.nasa.pds.citool.target.Target;
import gov.nasa.pds.citool.util.ReferenceUtils;
import gov.nasa.pds.citool.util.References;
import gov.nasa.pds.citool.util.RegistryObjectCache;

import gov.nasa.pds.tools.LabelParserException;
import gov.nasa.pds.tools.constants.Constants.ProblemType;
import gov.nasa.pds.tools.label.Label;
import gov.nasa.pds.tools.label.ManualPathResolver;
import gov.nasa.pds.tools.label.parser.DefaultLabelParser;

import java.net.URI;
import java.net.URL;
import java.net.URISyntaxException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.logging.Logger;
import java.io.IOException;


public class CIToolIngester 
{
	private Logger log;
	private IngestReport report;
	
	
    public CIToolIngester(IngestReport report)
    {
        this.report = report;
        log = Logger.getLogger(this.getClass().getName());
    }
    
    
    /**
     * Ingest catalog file(s).
     *
     * @param target URL of the target (directory or file)
     * @throws Exception
     */
    public void ingest(Target target, boolean recurse) throws Exception 
    {
        if(target.isDirectory())
        {
            List urls = target.traverse(recurse);
            List




© 2015 - 2024 Weber Informatics LLC | Privacy Policy