diff --git a/pom.xml b/pom.xml index 89795b5..d9722e1 100644 --- a/pom.xml +++ b/pom.xml @@ -2,19 +2,27 @@ - 4.0.0 + 4.0.0 org.dataconservancy.pkgtool dcs-packaging-tool-cli 1.0.0-SNAPSHOT Automated Packaging Command Line Tool + org.dataconservancy project-pom 8 + - + + + standalone + ${project.artifactId} + dist + ${project.artifactId} + @@ -46,6 +54,19 @@ org.apache.maven.plugins maven-jar-plugin 3.0.0 + + + + true + true + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.0.0 org.apache.maven.plugins @@ -125,6 +146,53 @@ org.jacoco jacoco-maven-plugin + + maven-assembly-plugin + + true + true + + + + standalone-jar + package + + single + + + + + org.dataconservancy.packaging.tool.cli.AutomatedPackageTool + true + true + + + ${project.name} + ${project.version} + r${buildNumber} + + + + + jar-with-dependencies + + + + + dist + package + + single + + + + + bin + + + + + @@ -140,22 +208,42 @@ org.slf4j slf4j-api - 1.7.10 + 1.7.21 + + + ch.qos.logback + logback-classic + 1.1.2 org.dataconservancy.pkgtool dcs-packaging-tool-api - 1.0.3 + 1.0.8-SNAPSHOT + + + org.dataconservancy.pkgtool + dcs-packaging-tool-impl + 1.0.8-SNAPSHOT + + + org.dataconservancy.pkgtool + dcs-packaging-tool-ser + 1.0.8-SNAPSHOT org.dataconservancy.pkgtool dcs-packaging-tool-model-builder - 1.0.3 + 1.0.8-SNAPSHOT org.dataconservancy.packaging.shared dcs-packaging-shared - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT + + + org.dataconservancy.rules + dcs-packaging-rules + 0.1.0-SNAPSHOT @@ -176,10 +264,28 @@ org.dataconservancy.pkgtool dcs-packaging-tool-api + + org.dataconservancy.pkgtool + dcs-packaging-tool-impl + + + org.dataconservancy.pkgtool + dcs-packaging-tool-ser + org.dataconservancy.pkgtool dcs-packaging-tool-model-builder + + org.dataconservancy.rules + dcs-packaging-rules + + + org.slf4j + slf4j-simple + + + @@ -196,11 +302,42 @@ ch.qos.logback logback-classic - runtime + 1.1.2 + + + + + dc.maven.releases + Data Conservancy Public Maven 2 Repository (releases) + default + http://maven.dataconservancy.org/public/releases/ + + true + + + false + + + + + dc.maven.snapshots + Data Conservancy Public Maven 2 Repository (snapshots) + default + http://maven.dataconservancy.org/public/snapshots/ + + false + + + true + + + + + \ No newline at end of file diff --git a/src/main/java/org/dataconservancy/packaging/tool/cli/AutomatedPackageTool.java b/src/main/java/org/dataconservancy/packaging/tool/cli/AutomatedPackageTool.java index b4956be..691b94a 100644 --- a/src/main/java/org/dataconservancy/packaging/tool/cli/AutomatedPackageTool.java +++ b/src/main/java/org/dataconservancy/packaging/tool/cli/AutomatedPackageTool.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Johns Hopkins University + * Copyright 2017 Johns Hopkins University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,223 +17,361 @@ package org.dataconservancy.packaging.tool.cli; import org.apache.commons.compress.archivers.ArchiveStreamFactory; +import org.apache.jena.rdf.model.Model; + +import org.dataconservancy.packaging.shared.IpmPackager; import org.dataconservancy.packaging.tool.api.PackagingFormat; +import org.dataconservancy.packaging.tool.api.RulesEngine; +import org.dataconservancy.packaging.tool.api.RulesEngineException; +import org.dataconservancy.packaging.tool.impl.RulesEngineImpl; +import org.dataconservancy.packaging.tool.model.BagItParameterNames; import org.dataconservancy.packaging.tool.model.GeneralParameterNames; +import org.dataconservancy.packaging.tool.model.PackageDescriptionRulesBuilder; import org.dataconservancy.packaging.tool.model.PackageGenerationParameters; -import org.dataconservancy.packaging.tool.model.PackageGenerationParametersBuilder; import org.dataconservancy.packaging.tool.model.PackageToolException; import org.dataconservancy.packaging.tool.model.PackagingToolReturnInfo; import org.dataconservancy.packaging.tool.model.ParametersBuildException; +import org.dataconservancy.packaging.tool.model.PropertiesConfigurationParametersBuilder; +import org.dataconservancy.packaging.tool.model.builder.xstream.JaxbPackageDescriptionRulesBuilder; +import org.dataconservancy.packaging.tool.model.rules.RulesSpec; + import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.CmdLineParser; import org.kohsuke.args4j.Option; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import java.util.Arrays; -import java.util.LinkedHashMap; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.LocalDate; import java.util.List; import java.util.Properties; -import org.slf4j.Logger; +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; + import org.slf4j.LoggerFactory; -import org.springframework.context.support.ClassPathXmlApplicationContext; +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.Logger; /** - * Created by jrm on 8/10/16. - * - * @author jrm + * Command line interface to create a DC package as directed by the rules engine. + * @author jrm - initial framework. + * @author Ben Trumbore (wbt3@cornell.edu) - connect CLI to functionality. */ +@SuppressWarnings({"unused", "FieldCanBeLocal"}) public class AutomatedPackageTool { - private final static String rulesFileName = "rules.xsd"; - private final static String packageMetadataFileName = "packageMetadata"; - private final static String packageGenerationsParametersFileName = "packageGenerationParameters"; - private final static File userDataconservancyDirectory = new File(System.getProperty("user.home") + File.pathSeparator + ".dataconservancy"); - private final static String defaultResourceConfigPath = "/org/dataconservancy/apt/config/"; + private static final String rulesFileName = "apt-rules.xml"; + private static final String packageGenerationsParametersFileName = "packageGenerationParameters"; + private static final String defaultResourceConfigPath = "/org/dataconservancy/apt/config/"; + private static final String packageNameKey = "Package-Name"; + private static final String defaultPackageName = "MyPackage"; + + private static final File userDcDir = new File(System.getProperty("user.home") + "/.dataconservancy"); + private static final String javaTemp = System.getProperty("java.io.tmpdir").replace(File.separatorChar, '/'); - private final Logger log = LoggerFactory.getLogger(this.getClass()); + private final Logger log = (Logger)LoggerFactory.getLogger(this.getClass()); - /* - * - * Arguments - */ - @Argument(required = true, index = 0, metaVar = "[content]", usage = "content root directory") - private File contentRootFile = null; + private PackageGenerationParameters packageParams = new PackageGenerationParameters(); - @Argument(required = false, index = 1, metaVar = "[profile]", usage = "domain profile file") - private File domainProfileFile = null; + /* + * Arguments + */ + @Argument(required = true, index = 0, metaVar = "", usage = "content root directory") + private static File contentRootFile; - /* - * - * General Options - */ - /** Request for help/usage documentation */ - @Option(name = "-h", aliases = { "-help", "--help" }, usage = "print help message") - private boolean help = false; + @Argument(required = true, index = 1, metaVar = "", usage = "package metadata file location") + private static File packageMetadataFile; - /** Requests the current version number of the cli application. */ - @Option(name = "-v", aliases = { "-version", "--version" }, usage = "print version information") - private boolean version = false; + /* + * General Options + */ + /** Request for help/usage documentation */ + @Option(name = "-h", aliases = { "-help", "--help" }, usage = "print help message") + private boolean help = false; + + /** Requests the current version number of the cli application. */ + @Option(name = "-v", aliases = { "-version", "--version" }, usage = "print version information") + private boolean version = false; /** Requests for debugging info. */ - @Option(name = "-d", aliases = { "-debug", "--debug" }, usage = "print debug information") - private boolean debug = false; + @Option(name = "-d", aliases = { "-debug", "--debug" }, usage = "print debug information") + private boolean debug = false; /** Requests for parameter info */ @Option(name = "-i", aliases = { "-info", "--info"}, usage = "print parameter info") private boolean info = false; - /* - * - * Package Generation Options - */ - /** Packaging format */ - @Option(name = "-f", aliases = { "--format" }, usage = "packaging format to use") - private PackagingFormat pkgFormat = PackagingFormat.BOREM; + /* + * Package Generation Options + */ + /** Package Generation Params location **/ + @Option(name = "-g", aliases = { "--generation-params" }, metaVar = "", + usage = "package generation params file location") + private static File packageGenerationParamsFile; + + /** Rules file **/ + @Option(name = "-r", aliases = {"--rules", "--rules-file"}, metaVar = "", + usage = "The location of the rules file") + private static File rulesFile; + + /** Package Name **/ + @Option(name = "-n", aliases = { "--name", "--package-name"}, metaVar = "", + usage = "The package name, which also determines the output filename. " + + "Will override value in Package Generation Parameters file.") + private static String packageName; - /** Package Generation Params location */ - @Option(name = "-g", aliases = { "--generation-params" }, metaVar = "", usage = "package generation params file location") - private static File packageGenerationParamsFile; + /** Package output location **/ + @Option(name = "-o", aliases = { "--location", "--output-location"}, metaVar = "", + usage = "The output directory to which the package file will be written. " + + "Will override value in Package Generation Parameters file.") + private static File outputLocation; + + /** Force overwrite of target file **/ + @Option(name = "--overwrite", aliases = { "--force" }, + usage = "If specified, will overwrite if the destination package file already exists without prompting.") + private static boolean overwriteIfExists = false; + + /** Package staging location **/ + @Option(name = "--stage", aliases = { "--staging", "--staging-location", "--package-staging-location"}, + metaVar = "", usage = "The directory to which the package will be staged before building. " + + "Will override value in Package Generation Parameters file.") + private String packageStagingLocation = javaTemp + "DCS-PackageToolStaging"; - /** Package Metadata File location */ - @Option(name = "-m", aliases = { "--package-metadata" }, metaVar = "", usage = "package metadata file location") - private static File packageMetadataFile; + /** Packaging format **/ + @Option(name = "-f", aliases = { "--format" }, usage = "packaging format to use") + private PackagingFormat pkgFormat = PackagingFormat.BOREM; /** Archive format **/ - @Option(name = "-a", aliases = { "--archiving-format"}, metaVar = "tar|zip", usage = "Archive format to use when creating the package. Defaults to tar") + @Option(name = "-a", aliases = { "--archiving-format"}, metaVar = "tar|zip", + usage = "Archive format to use when creating the package. Defaults to tar") private String archiveFormat; /** Compression format for tar archives **/ - @Option(name = "-c", aliases = { "--compression-format"}, metaVar = "gz|none", usage = "Compression format, if archive type is tar. If not specified, no compression is used. Ignored if non-tar archive is used.") + @Option(name = "-c", aliases = { "--compression-format"}, metaVar = "gz|none", + usage = "Compression format, if archive type is tar. " + + "If not specified, no compression is used. Ignored if non-tar archive is used.") private String compressionFormat; /** Checksum algorithms **/ - @Option(name = "-s", aliases = { "--checksum"}, metaVar = "md5|sha1", usage = "Checksum algorithms to use. If none specified, will use md5. Can be specified multiple times") + @Option(name = "-s", aliases = { "--checksum"}, metaVar = "md5|sha1", + usage = "Checksum algorithms to use. If none specified, will use md5. Can be specified multiple times") private List checksums; - /** Package Name **/ - @Option(name = "-n", aliases = { "--name", "--package-name"}, metaVar = "", usage = "The package name, which also determines the output filename. Will override value in Package Generation Parameters file.") - private static String packageName; + /** Serialization Format **/ + @Option(name = "-z", aliases = { "--serialization", "--serialization-format"}, metaVar = "JSONLD|TURTLE|XML", + usage = "Serialization format for the ORE-ReM file") + private String serializationFormat; - /** Package output location **/ - @Option(name = "-o", aliases = { "--location", "--output-location"}, metaVar = "", usage = "The output directory to which the package file will be written. Will override value in Package Generation Parameters file.") - private static File outputLocation; + /** Serialization Format **/ + @Option(name = "-eid", aliases = { "--external-project-id"}, + usage = "External project ID to associate with the package") + private String externalID; - /** Package staging location **/ - @Option(name = "--stage", aliases = { "--staging", "--staging-location", "--package-staging-location"}, metaVar = "", usage = "The directory to which the package will be staged before building. Will override value in Package Generation Parameters file.") - private String packageStagingLocation; - /** Force overwrite of target file **/ - @Option(name = "--overwrite", aliases = { "--force" }, usage = "If specified, will overwrite if the destination package file already exists without prompting.") - private boolean overwriteIfExists = false; - - /** Write to stdout **/ - @Option(name = "--stdout", usage = "Write to stdout, instead of to a file.") - private boolean stdout = false; + /** + * Entry point for the application + * @param args command line arguments + */ + public static void main(final String[] args) { - /** Serialization Format **/ - @Option(name = "-z", aliases = { "--serialization", "--serialization-format"}, metaVar="JSONLD|TURTLE|XML", usage = "Serialization format for the ORE-ReM file") - private String serializationFormat; + final AutomatedPackageTool application = new AutomatedPackageTool(); - /** Rules file **/ - @Option(name = "-r", aliases = {"--rules", "--rules-file"}, metaVar = "", usage = "Thelocation of the rules file") - private static File rulesFile; + final CmdLineParser parser = new CmdLineParser(application); + parser.getProperties().withUsageWidth(80); - public static void main(String[] args) { + try { + parser.parseArgument(args); + + // Handle general options such as help, version. + if (application.help) { + parser.printUsage(System.err); + System.err.println(); + System.exit(0); + } else if (application.version) { + System.err.println(AutomatedPackageTool.class.getPackage().getImplementationVersion()); + System.exit(0); + } - final AutomatedPackageTool application = new AutomatedPackageTool(); + if (!contentRootFile.exists() || !contentRootFile.isDirectory()) { + System.err.println("Supplied content directory " + contentRootFile.getCanonicalPath() + + " does not exist or is not a directory."); + System.exit(1); + } - CmdLineParser parser = new CmdLineParser(application); - parser.setUsageWidth(80); - - try { - parser.parseArgument(args); - - /* Handle general options such as help, version */ - if (application.help) { - parser.printUsage(System.err); - System.err.println(); - System.exit(0); - } else if (application.version) { - System.err.println(AutomatedPackageTool.class.getPackage() - .getImplementationVersion()); - System.exit(0); - } - - if (!outputLocation.exists() || !outputLocation.isDirectory()) { - System.err.println("Supplied output file directory " + outputLocation.getCanonicalPath() + " does not exist or is not a directory."); + if (outputLocation != null && (!outputLocation.exists() || !outputLocation.isDirectory())) { + System.err.println("Supplied output file directory " + outputLocation.getCanonicalPath() + + " does not exist or is not a directory."); System.exit(1); } - if (!(packageName.length() > 0)) { + if (packageName != null && !(packageName.length() > 0)) { System.err.println("Bag name must have positive length."); System.exit(1); } - if (packageMetadataFile != null && (!packageMetadataFile.exists() || !packageMetadataFile.isFile())) { - System.err.println("Supplied package metadata file " + packageMetadataFile.getCanonicalPath() + " does not exist or is not a file."); + if (!packageMetadataFile.exists() || !packageMetadataFile.isFile()) { + System.err.println("Supplied package metadata file " + packageMetadataFile.getCanonicalPath() + + " does not exist or is not a file."); System.exit(1); } - if(rulesFile != null && (!rulesFile.exists() || !rulesFile.isFile())){ - System.err.println("Supplied rules file " + rulesFile.getCanonicalPath() + " does not exist or is not a file."); + if (rulesFile != null && (!rulesFile.exists() || !rulesFile.isFile())) { + System.err.println("Supplied rules file " + rulesFile.getCanonicalPath() + + " does not exist or is not a file."); System.exit(1); } - /* Run the package generation application proper */ - application.run(); - - } catch (CmdLineException e) { - /* - * This is an error in command line args, just print out usage data - * and description of the error. - */ - System.err.println(e.getMessage()); - parser.printUsage(System.err); - System.err.println(); - System.exit(1); - } catch (Exception e) { + // Run the package generation application proper. + application.run(); + + } catch (CmdLineException e) { + // This is an error in command line args, just print out usage data and description of the error. + System.err.println(e.getMessage()); + parser.printUsage(System.err); + System.err.println(); + System.exit(1); + } catch (Exception e) { System.err.println(e.getMessage()); System.exit(1); } } - private void run() throws Exception { - final ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext( - "classpath*:org/dataconservancy/apt/config/applicationContext.xml", - "classpath*:org/dataconservancy/config/applicationContext.xml", - "classpath*:org/dataconservancy/packaging/tool/ser/config/applicationContext.xml"); - boolean useDefaults = true; + private void run() throws Exception { + // Control the logger output level. + final Logger root = (Logger)LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); + if (debug) { + root.setLevel(Level.DEBUG); + } else { + root.setLevel(Level.WARN); // TODO - Change to INFO when some info logging is moved to debug. + } + + // Get the inputs to the packager. + final RdfContentProvider contentProvider = createContentProvider(); + final InputStream paramsStream = collectPackagingParameters(); + final InputStream metadataStream = createPackageMetadata(); + + // Create the package and copy it to the output folder + if (contentProvider != null) { + final IpmPackager packager = new IpmPackager(); + packager.setPackageName(packageName); + final org.dataconservancy.packaging.tool.api.Package pkg = + packager.buildPackage(contentProvider, metadataStream, paramsStream); + copyPackage(pkg); + } + } - // Prepare parameter builder - PackageGenerationParametersBuilder parametersBuilder = appContext.getBean("packageGenerationParametersBuilder", - PackageGenerationParametersBuilder.class); - // Load parameters first from default, then override with home directory .packageGenerationParameters, then with - // specified params file (if given). - PackageGenerationParameters packageParams; + private RdfContentProvider createContentProvider() { + final InputStream rulesStream = getPackagingRules(); + final Model jenaModel = createJenaModel(rulesStream); + // Create content provider using local data path + final String rootPath; try { - packageParams = parametersBuilder.buildParameters(getClass().getResourceAsStream(defaultResourceConfigPath + packageGenerationsParametersFileName)); + rootPath = contentRootFile.getCanonicalPath(); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + + RdfContentProvider contentProvider = null; + try { + final String parentFolder = new File(rootPath).getParent(); + // Handle Windows path separators + final URI contentURI = new URI(parentFolder.replace(File.separatorChar, '/')); + contentProvider = new RdfContentProvider(jenaModel, contentURI); + } catch (URISyntaxException e) { + e.printStackTrace(); + } + + return contentProvider; + } + + + // Resolve the rules file location. Priority is given to a command line file path, + // then to the user's default location, then to the application default. + private InputStream getPackagingRules() { + InputStream rulesStream = null; + try { + if (rulesFile == null) { + final File userRulesFile = new File(userDcDir, rulesFileName); + if (userRulesFile.exists()) { + rulesStream = new FileInputStream(userRulesFile); + } else { + // Get the default rules file supplied with the app + rulesStream = getClass().getResourceAsStream(defaultResourceConfigPath + rulesFileName); + } + } else { + rulesStream = new FileInputStream(rulesFile); + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + + return rulesStream; + } + + + private Model createJenaModel(final InputStream rulesStream) { + // Rules engine creates Jena model from rules and local data + final PackageDescriptionRulesBuilder builder = new JaxbPackageDescriptionRulesBuilder(); + final RulesSpec rulesSpec = builder.buildPackageDescriptionRules(rulesStream); + final RulesEngine engine = new RulesEngineImpl(rulesSpec); + + final String dataPath; + try { + dataPath = contentRootFile.getCanonicalPath(); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + + final File dataFolder = new File(dataPath); + Model jenaModel = null; + try { + jenaModel = engine.generateRdf(dataFolder); + } catch (RulesEngineException e) { + e.printStackTrace(); + } + + return jenaModel; + } + + + // Load parameters first from application default, then override with file of user defaults, + // then override with a specified parameters file (if given), then with command line options. + private InputStream collectPackagingParameters() { + // Get default parameters from a source code resource. + try { + packageParams = new PropertiesConfigurationParametersBuilder(). + buildParameters(getClass().getResourceAsStream(defaultResourceConfigPath + + packageGenerationsParametersFileName)); updateCompression(packageParams); } catch (ParametersBuildException e) { throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_PARAM_BUILD_EXCEPTION, e); } - File userParamsFile = new File(userDataconservancyDirectory, packageGenerationsParametersFileName); + // Override any parameters defined in the user's default parameter file. + final File userParamsFile = new File(userDcDir, packageGenerationsParametersFileName); if (userParamsFile.exists()) { try { - PackageGenerationParameters homeParams = - parametersBuilder.buildParameters(new FileInputStream(userParamsFile)); + final PackageGenerationParameters homeParams = new PropertiesConfigurationParametersBuilder(). + buildParameters(new FileInputStream(userParamsFile)); - System.err.println("Overriding generation parameters with values from standard '" + packageGenerationsParametersFileName + "'"); - useDefaults = false; + System.err.println("Overriding generation parameters with values from standard '" + + packageGenerationsParametersFileName + "'"); updateCompression(homeParams); packageParams.overrideParams(homeParams); } catch (FileNotFoundException e) { @@ -243,13 +381,14 @@ private void run() throws Exception { } } + // Override any parameters defined in a file provided as a command line option. if (packageGenerationParamsFile != null) { try { - PackageGenerationParameters fileParams = parametersBuilder. + final PackageGenerationParameters fileParams = new PropertiesConfigurationParametersBuilder(). buildParameters(new FileInputStream(packageGenerationParamsFile)); - System.err.println("Overriding generation parameters with values from " + packageGenerationParamsFile + " specified on command line"); - useDefaults = false; + System.err.println("Overriding generation parameters with values from " + + packageGenerationParamsFile + " specified on command line"); updateCompression(fileParams); packageParams.overrideParams(fileParams); } catch (ParametersBuildException e) { @@ -263,57 +402,33 @@ private void run() throws Exception { } } - // Finally, override with command line options - // If any options overridden, this will cause useDefaults to become false, if it wasn't already - PackageGenerationParameters flagParams = createCommandLinePrefs(); + // Finally, override any parameters specified with individual command line options. + final PackageGenerationParameters flagParams = createCommandLinePrefs(); if (!flagParams.getKeys().isEmpty()) { - useDefaults = false; System.err.println("Overriding generation parameters using command line flags"); updateCompression(flagParams); packageParams.overrideParams(flagParams); } - //we need to validate any specified file locations in the package generation params to make sure they exist + // We need to validate any specified file locations in the package generation parameters + // to make sure they exist. if (packageParams.getParam(GeneralParameterNames.PACKAGE_LOCATION) == null) { - packageParams.addParam(GeneralParameterNames.PACKAGE_LOCATION, System.getProperty("java.io.tmpdir")); + packageParams.addParam(GeneralParameterNames.PACKAGE_LOCATION, javaTemp); } + validateLocationParameters(packageParams); - // Resolve the rules file location. Priority is given to a command line file path, then to one in the user's home location, then to the app default - if(rulesFile == null){ - File userRulesFile = new File(userDataconservancyDirectory, rulesFileName); - if (userRulesFile.exists()){ - rulesFile = userRulesFile; - } else { - //get the default rules file supplied with the app - } + // Print the parameter info + if (info) { + System.err.println("\nPARAMETERS"); + final String params = packageParams.toParametersString(); + System.err.println(params); } - - System.err.println("MOOOOOOOOOOOOOOOOOOOOOOOO"); - + final String params = packageParams.toParametersString(); + return new ByteArrayInputStream(params.getBytes(StandardCharsets.UTF_8)); } - /** - * we validate locations of files passed as arguments elsewhere, but the locations passed as options - * eventually end up in the PackageGenerationsParameters. We validate these parameter values only after - * we finish the process of building the parameters from the various available sources. - * @param params the package generation parameters - */ - private void validateLocationParameters(PackageGenerationParameters params) { - - //required, cannot be null - String packageLocation = params.getParam(GeneralParameterNames.PACKAGE_LOCATION, 0); - if (packageLocation == null || packageLocation.isEmpty()) { - throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_FILE_NOT_FOUND_EXCEPTION); - } else { - File packageLocationFile = new File(packageLocation); - if (!packageLocationFile.exists()) { - System.err.println(packageLocation); - throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_FILE_NOT_FOUND_EXCEPTION); - } - } - } /** * Update the compression format for the parameters, if necessary. @@ -321,51 +436,86 @@ private void validateLocationParameters(PackageGenerationParameters params) { * format to "none" unless another format is explicitly set. * @param params The package generation params, used to get the file needed */ - private void updateCompression(PackageGenerationParameters params) { - String archive = params.getParam(GeneralParameterNames.ARCHIVING_FORMAT, 0); - String compress = params.getParam(GeneralParameterNames.COMPRESSION_FORMAT, 0); + private void updateCompression(final PackageGenerationParameters params) { + final String archive = params.getParam(GeneralParameterNames.ARCHIVING_FORMAT, 0); + final String compress = params.getParam(GeneralParameterNames.COMPRESSION_FORMAT, 0); //manually set the compression to none if archive is ZIP and no compression // is specifically set in this object, or if archive is exploded - if (archive != null && ((archive.equals(ArchiveStreamFactory.ZIP) && compress == null) || archive.equals("exploded"))) { + if (archive != null && + ((archive.equals(ArchiveStreamFactory.ZIP) && compress == null) || archive.equals("exploded"))) { params.addParam(GeneralParameterNames.COMPRESSION_FORMAT, "none"); } } + /** * Create a PackageGenerationParameter for command line flags * @return a PackageGenerationParameter object with any command line overrides */ private PackageGenerationParameters createCommandLinePrefs() { - PackageGenerationParameters params = new PackageGenerationParameters(); + final PackageGenerationParameters params = new PackageGenerationParameters(); - if (archiveFormat != null) {params.addParam(GeneralParameterNames.ARCHIVING_FORMAT, archiveFormat);} - if (compressionFormat != null) {params.addParam(GeneralParameterNames.COMPRESSION_FORMAT, compressionFormat);} + if (pkgFormat != null) { + params.addParam(GeneralParameterNames.PACKAGE_FORMAT_ID, pkgFormat.toString()); + } + if (archiveFormat != null) { + params.addParam(GeneralParameterNames.ARCHIVING_FORMAT, archiveFormat); + } + if (compressionFormat != null) { + params.addParam(GeneralParameterNames.COMPRESSION_FORMAT, compressionFormat); + } if (packageName != null) { params.addParam(GeneralParameterNames.PACKAGE_NAME, packageName); - // params.addParam(BagItParameterNames.PKG_BAG_DIR, packageName); } - if (outputLocation != null) {params.addParam(GeneralParameterNames.PACKAGE_LOCATION, outputLocation.getAbsolutePath());} - if (packageStagingLocation != null) {params.addParam(GeneralParameterNames.PACKAGE_STAGING_LOCATION, packageStagingLocation);} + if (outputLocation != null) { + params.addParam(GeneralParameterNames.PACKAGE_LOCATION, outputLocation.getAbsolutePath()); + } + if (packageStagingLocation != null) { + params.addParam(GeneralParameterNames.PACKAGE_STAGING_LOCATION, packageStagingLocation); + } if (checksums != null && !checksums.isEmpty()) { params.addParam(GeneralParameterNames.CHECKSUM_ALGORITHMS, checksums); } - if(serializationFormat != null){ + if (serializationFormat != null) { params.addParam(GeneralParameterNames.REM_SERIALIZATION_FORMAT, serializationFormat); } + return params; } - private LinkedHashMap> createPackageMetadata(){ - Properties props = new Properties(); - if(packageMetadataFile != null) { - if(!packageMetadataFile.exists()){ + /** + * we validate locations of files passed as arguments elsewhere, but the locations passed as options + * eventually end up in the PackageGenerationsParameters. We validate these parameter values only after + * we finish the process of building the parameters from the various available sources. + * @param params the package generation parameters + */ + private void validateLocationParameters(final PackageGenerationParameters params) { + + // required, cannot be null + final String packageLocation = params.getParam(GeneralParameterNames.PACKAGE_LOCATION, 0); + if (packageLocation == null || packageLocation.isEmpty()) { + throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_FILE_NOT_FOUND_EXCEPTION); + } else { + final File packageLocationFile = new File(packageLocation); + if (!packageLocationFile.exists()) { + System.err.println(packageLocation); + throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_FILE_NOT_FOUND_EXCEPTION); + } + } + } + + + private InputStream createPackageMetadata() { + final Properties metadata = new Properties(); + if (packageMetadataFile != null) { + if (!packageMetadataFile.exists()) { throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_FILE_NOT_FOUND_EXCEPTION); } try (InputStream fileStream = new FileInputStream(packageMetadataFile)) { - props.load(fileStream); + metadata.load(fileStream); } catch (FileNotFoundException e) { throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_FILE_NOT_FOUND_EXCEPTION, e); } catch (IOException e) { @@ -373,16 +523,75 @@ private LinkedHashMap> createPackageMetadata(){ throw new PackageToolException(PackagingToolReturnInfo.CMD_LINE_FILE_NOT_FOUND_EXCEPTION); } } - LinkedHashMap> metadata = new LinkedHashMap<>(); - List valueList; - for (String key : props.stringPropertyNames()) { - valueList = Arrays.asList(props.getProperty(key).trim().split("\\s*,\\s*")); - metadata.put(key,valueList); + if (! metadata.containsKey(packageNameKey)) { + final List name = packageParams.getParam(packageNameKey); + if (name != null && name.size() > 0) { + metadata.setProperty(packageNameKey, name.get(name.size() - 1)); + } else { + metadata.setProperty(packageNameKey, defaultPackageName); + } + } else if (packageName == null) { + packageName = metadata.getProperty(packageNameKey); + } else { + metadata.setProperty(packageNameKey, packageName); + } + + if (externalID != null) { + metadata.setProperty(GeneralParameterNames.EXTERNAL_PROJECT_ID, externalID); } - return metadata; + metadata.setProperty(BagItParameterNames.BAGGING_DATE, LocalDate.now().toString()); + + final ByteArrayOutputStream metaDataOut = new ByteArrayOutputStream(); + InputStream metadataStream = null; + try { + metadata.store(metaDataOut, null); + metaDataOut.close(); + metadataStream = new ByteArrayInputStream(metaDataOut.toByteArray()); + } catch (IOException e) { + e.printStackTrace(); + } + + return metadataStream; } + private void copyPackage(final org.dataconservancy.packaging.tool.api.Package pkg) { + // Determine the file to copy + final String sourceName = pkg.getPackageName(); + final Path sourcePath = Paths.get(packageStagingLocation, sourceName); + + // If no output location is specified, don't copy the package + if (outputLocation == null) { + System.err.printf("Package '%s' has been created.\n", sourcePath); + return; + } + + // Determine the file to create + Path destPath = Paths.get(outputLocation.getAbsolutePath(), sourceName); + File dest = new File(destPath.toString()); + + // If the file already exists and we can't overwrite it, find a new name + if (! overwriteIfExists) { + int index = 0; + final String extension = sourceName.substring(packageName.length()); + while (dest.exists()) { + // Append (#) to the root of the file name to avoid the conflict + index++; + final String destName = String.format("%s (%d)%s", packageName, index, extension); + destPath = Paths.get(outputLocation.getAbsolutePath(), destName); + dest = new File(destPath.toString()); + } + } + + // Copy the file + try { + Files.copy(sourcePath, destPath, REPLACE_EXISTING); + System.err.printf("Package '%s' has been created.\n", destPath); + } catch (IOException e) { + e.printStackTrace(); + } + } + } diff --git a/src/main/java/org/dataconservancy/packaging/tool/cli/RdfContentProvider.java b/src/main/java/org/dataconservancy/packaging/tool/cli/RdfContentProvider.java index 0142027..c4e52c0 100644 --- a/src/main/java/org/dataconservancy/packaging/tool/cli/RdfContentProvider.java +++ b/src/main/java/org/dataconservancy/packaging/tool/cli/RdfContentProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Johns Hopkins University + * Copyright 2017 Johns Hopkins University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,9 +25,11 @@ import org.dataconservancy.packaging.shared.AbstractContentProvider; import org.dataconservancy.packaging.tool.model.ipm.FileInfo; import org.dataconservancy.packaging.tool.model.ipm.Node; -import org.slf4j.Logger; + +import ch.qos.logback.classic.Logger; import org.slf4j.LoggerFactory; +import java.io.File; import java.net.URI; import java.nio.file.Path; import java.nio.file.Paths; @@ -38,12 +40,16 @@ * Implementation of ContentProvider for RDF sourced data. * @author Ben Trumbore (wbt3@cornell.edu). */ +@SuppressWarnings("unused") public class RdfContentProvider extends AbstractContentProvider { - private Logger logger = LoggerFactory.getLogger(RdfContentProvider.class); + private Logger logger = (Logger)LoggerFactory.getLogger(RdfContentProvider.class); private Model domainObjects = null; private URI contentPath; + // Must use an Atomic Reference to allow root node to be set inside lambda function below. + private final AtomicReference root = new AtomicReference(); + /** * Create a content provider that can be passed to * {@link org.dataconservancy.packaging.shared.IpmPackager#buildPackage}. @@ -64,102 +70,189 @@ public Model getDomainModel() { } // Define property names that are found on some RDF nodes. - private static final String HAS_TYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; - private static final String HAS_TITLE = "http://dataconservancy.org/business-object-model#hasTitle"; - private static final String METADATA_FOR = "http://dataconservancy.org/business-object-model#metadataFor"; - private static final String IS_MEMBER_OF = "http://dataconservancy.org/business-object-model#isMemberOf"; + private static final String HAS_TYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; + private static final String HAS_TITLE = "http://dataconservancy.org/business-object-model#hasTitle"; + private static final String METADATA_FOR = "http://dataconservancy.org/business-object-model#metadataFor"; + private static final String IS_METADATA_FOR = "http://dataconservancy.org/business-object-model#isMetadataFor"; + private static final String IS_MEMBER_OF = "http://dataconservancy.org/business-object-model#isMemberOf"; // Define properties that will be inspected for some RDF nodes. - private static final Property hasType = ResourceFactory.createProperty(HAS_TYPE); - private static final Property hasTitle = ResourceFactory.createProperty(HAS_TITLE); - private static final Property metadataFor = ResourceFactory.createProperty(METADATA_FOR); - private static final Property isMemberOf = ResourceFactory.createProperty(IS_MEMBER_OF); + private static final Property hasType = ResourceFactory.createProperty(HAS_TYPE); + private static final Property hasTitle = ResourceFactory.createProperty(HAS_TITLE); + private static final Property metadataFor = ResourceFactory.createProperty(METADATA_FOR); + private static final Property isMetadataFor = ResourceFactory.createProperty(IS_METADATA_FOR); + private static final Property isMemberOf = ResourceFactory.createProperty(IS_MEMBER_OF); /** * We manually build the IPM tree here. Fundamentally, we're doing three things: * 1) Creating "directory" nodes that correspond to a domain object. - * 2) Creating "content" nodes that correspond to a domain object that - * describes associated content. + * 2) Creating "content" nodes that correspond to a domain object that describes associated content. * 3) Arranging these nodes into a tree structure of our liking. * @return The root node of the IPM model for this content provider. */ public Node getIpmModel() { - // Must use an Atomic Reference to allow root node to be set inside lambda function below. - final AtomicReference root = new AtomicReference(); - - final String msgFmt = "Creating %s IPM node named '%s' for domain object %s"; - - // For each subject resource that is not anonymous, create a node. - // - If the node type is an Image or File, then it will be a content node. - // - Otherwise, make a directory node. - // It is assumed that all folders will precede their child nodes/folders. + // For each subject resource that is not anonymous, find or create a node. + // The root node is remembered when it is created, then returned from this method. domainObjects.listSubjects().forEachRemaining(subject -> { if (subject.isAnon()) { logger.debug("Skipping IPM node creation for anonymous resource '{}'", subject.getId().toString()); return; } - final URI u = URI.create(subject.getURI()); + final List statements = subject.listProperties().toList(); + final Statement s = subject.getProperty(isMemberOf); + final String parent = (s == null) ? "none" : s.getObject().toString(); - // Hash URIs do not get their own node; they will be considered to be a single node. - // TODO - Is this needed for JenaModel input? (copied from buildModelTree) - if (u.getFragment() != null) { - logger.debug("Skipping IPM node creation for hash URI resource '{}'", subject.getURI()); - return; - } + logger.debug(String.format("%25s %s %s %s", + subject.getProperty(hasTitle).getObject().toString(), subject.toString(), + parent, subject.getProperty(hasType).getObject().toString())); - // What type of node is this? What is its name? - final String type = subject.getProperty(hasType ).getObject().toString(); - final String title = subject.getProperty(hasTitle).getObject().toString(); - final boolean isImage = type.equals("http://dataconservancy.org/business-object-model#Metadata"); - final boolean isFile = type.equals("http://dataconservancy.org/business-object-model#File"); - final boolean isFolder = type.equals("http://dataconservancy.org/business-object-model#DataItem"); - - // Create the new package tree node and insert it into the tree. - final Node n = new Node(u); - n.setDomainObject(u); - - // Assign node file info and parent depending on node type. - // Note that file info must be assigned before finding/assigning parent. - if (isImage || isFile) { - logger.info(String.format(msgFmt, "file", title, subject.getURI())); - final Property prop = isImage ? metadataFor : isMemberOf; - final String parentID = subject.getProperty(prop).getObject().toString(); - assignFileInfo(title, parentID, contentPath, domainObjects, n, true); - assignParentNode(n, root.get()); - } else if (isFolder) { - logger.info(String.format(msgFmt, "directory", title, subject.getURI())); - final String parentID = subject.getProperty(isMemberOf).getObject().toString(); - assignFileInfo(title, parentID, contentPath, domainObjects, n, false); - assignParentNode(n, root.get()); - } else { // root folder, type == "Collection" - logger.info(String.format(msgFmt, "root directory", title, subject.getURI())); - assignFileInfo(title, null, contentPath, domainObjects, n, false); - root.set(n); + // Is this node for a folder? + final String rdfType = subject.getProperty(hasType ).getObject().toString(); + final boolean isFolder = rdfType.equals("http://dataconservancy.org/business-object-model#DataItem") || + rdfType.equals("http://dataconservancy.org/business-object-model#Collection") || + rdfType.equals("DataItem") || + rdfType.equals("Collection"); + + // Find or create a node for the RDF subject. Any missing parent nodes are recursively created. + if (isFolder) { + findOrCreateFolderNode(subject); + } else { + createFileNode(subject, rdfType); } }); return root.get(); } + + /** + * Create a file node and, recursively, any missing folder nodes on its path. + * @param subject The RDF resource for the file + * @param type The type of the RDF resource + * @return The newly created file node + */ + private Node createFileNode(final Resource subject, final String type) { + // File type determines which property is used to access its parent. + final boolean isImage1 = type.equals("http://dataconservancy.org/business-object-model#Metadata"); + final boolean isImage2 = type.equals("MetadataFile"); + final boolean isFile = type.equals("http://dataconservancy.org/business-object-model#File") || + type.equals("http://dataconservancy.org/business-object-model#DataFile") || + type.equals("DataFile"); + + final Property prop = isImage1 ? metadataFor : isImage2 ? isMetadataFor : isMemberOf; + final String parentID = subject.getProperty(prop).getObject().toString(); + final Resource parent = domainObjects.getResource(parentID); + + // Create a node for the file. + final URI uri = URI.create(subject.getURI()); + final Node node = new Node(uri); + node.setDomainObject(uri); + + // Recursively find the node's parent node. If the parent is a "synthesized" DataItem node, + // use its parent instead. Add the new node to the true parent node. + final Node parentNode = findOrCreateFolderNode(parent); + final Node ancestorNode = (parentNode.getFileInfo() == null) ? parentNode.getParent() : parentNode; + final String fileName = subject.getProperty(hasTitle).getObject().toString(); + assignFileInfo(fileName, ancestorNode.getDomainObject().toString(), contentPath, node, true); + parentNode.addChild(node); + + logger.debug(String.format("Creating file named '%s' for object %s", fileName, uri.toString())); + return node; + } + + + /** + * Find an existing node for the supplied RDF folder resource, or create one. + * Recursively create any folders on the path to this folder. + * @param subject The RDF resource for the folder + * @return The node that was found or created for the folder + */ + private Node findOrCreateFolderNode(final Resource subject) { + final String msgFmt = "Creating %s named '%s' for object %s"; + final String title = subject.getProperty(hasTitle).getObject().toString(); + final String nodeUri = subject.getURI(); + + // If this node has no parent, it is the root node + final Statement prop = subject.getProperty(isMemberOf); + if (prop == null) { + // If the root node doesn't exist, create and remember it. + if (root.get() == null) { + final URI uri = URI.create(subject.getURI()); + final Node node = new Node(uri); + node.setDomainObject(uri); + assignFileInfo(title, null, contentPath, node, false); + root.set(node); + logger.debug(String.format(msgFmt, "root folder", title, nodeUri)); + } + return root.get(); + } else { + // This is not the root node. Recursively find or create its parent node. + final String parentID = prop.getObject().toString(); + final Resource parent = domainObjects.getResource(parentID); + final Node parentNode = findOrCreateFolderNode(parent); + + // See if this node already exists as a child of its parent node. + Node node = null; + final List children = parentNode.getChildren(); + if (children != null) { + for (Node child : children) { + if (nodeUri.equals(child.getIdentifier().toString())) { + node = child; + break; + } + } + } + + if (node == null) { + // There is no existing node for this subject, so create one. + final URI uri = URI.create(subject.getURI()); + node = new Node(uri); + node.setDomainObject(uri); + parentNode.addChild(node); + + // If this is a "synthesized" node for a DataItem, do not assign it a FileInfo. + final String localPath = getPath(title, parentID); + final Path fullPath = Paths.get(contentPath + "/" + localPath); + final File testFile = new File(fullPath.toString()); + if (testFile.isFile()) { + // Without a FileInfo, no bin file will be created in the package. + // The node's URI will be used as the base name for the .ttl file. + logger.debug(String.format(msgFmt, "synthetic folder", title, nodeUri)); + } else { + assignFileInfo(title, parentID, contentPath, node, false); + logger.debug(String.format(msgFmt, "folder", title, nodeUri)); + } + } + + return node; + } + } + + /** - * Create a FileInfo that points to file/folder content found in content tree path. - * + * Create a FileInfo that points to file/folder content found in the content tree path. * @param fileName The name of the file or folder to be included. * @param parentID ID of the node's parent in the domain model. * @param contentPath Path to the root of the local package data tree. - * @param domainObjects The domain model tree. * @param node The node for which the FileInfo is being created. * @param isFile True if the node represents a file, False if it is a folder. */ private void assignFileInfo(final String fileName, final String parentID, final URI contentPath, - final Model domainObjects, final Node node, final boolean isFile) { - final String localPath = (parentID == null) - ? fileName - : getPath(fileName, parentID, domainObjects); + final Node node, final boolean isFile) { + final String localPath = (parentID == null) ? fileName : getPath(fileName, parentID); final Path fullPath = Paths.get(contentPath + "/" + localPath); - final FileInfo info = new FileInfo(fullPath); + // Empty folders will not be included in the content tree so we must add them instead of reading their info. + final FileInfo info; + final File file = new File(fullPath.toString()); + if (file.exists()) { + info = new FileInfo(fullPath); + } else { + info = new FileInfo(fullPath.toUri(), fileName); + file.mkdir(); + } + if (isFile) { info.setIsFile(true); } else { @@ -168,69 +261,27 @@ private void assignFileInfo(final String fileName, final String parentID, final node.setFileInfo(info); } + /** * Creates a complete path from the tail end of a path up to the domain model root. - * Prepends the current path's parent name and - * recurses until the domain model does not contain a higher parent. + * Prepends the current path's parent name and recurses until the domain model does not + * contain a higher parent. * @param pathTail When first called, the leaf file/folder of the desired path. * During recursion, the accumulated path from the leaf upwards. * @param parentID The ID of the domain model node that is the parent of the pathTail. - * @param domainObjects The domain model. * @return The complete path from domain model root to the provided leaf. */ - private String getPath(final String pathTail, final String parentID, final Model domainObjects) { + private String getPath(final String pathTail, final String parentID) { final Resource parent = domainObjects.getResource(parentID); final String parentName = parent.getProperty(hasTitle).getObject().toString(); final String newPath = parentName + "/" + pathTail; final Statement grandparent = parent.getProperty(isMemberOf); if (grandparent != null) { - return getPath(newPath, grandparent.getObject().toString(), domainObjects); + return getPath(newPath, grandparent.getObject().toString()); } else { return newPath; } } - /** - * Finds and assigns the parent IPM tree node of the given node. - * @param node The node for which a parent is found and assigned. - * @param root The root node of the IPM tree. - */ - private void assignParentNode(final Node node, final Node root) { - // Find the file system paths to the provided root and target nodes. - String nodeLoc = node.getFileInfo().getLocation().getPath(); - nodeLoc = nodeLoc.replaceFirst("^/(.:/)", "$1"); // Remove leading "/" on Windows - final Path nodePath = Paths.get(nodeLoc); - String rootLoc = root.getFileInfo().getLocation().getPath(); - rootLoc = rootLoc.replaceFirst("^/(.:/)", "$1"); // Remove leading "/" on Windows - final Path rootPath = Paths.get(rootLoc); - - // Find the relative file system path between the root and target nodes. - Path relPath = rootPath.relativize(nodePath); - - // Walk the tree from the root node down through its children - // until the target node is reached. At each step find the child whose name - // matches the first name in the remaining relative path. - Node parent = root; - while (relPath.getNameCount() > 1) { - final String name = relPath.getName(0).toString(); - final List children = parent.getChildren(); - Node match = null; - for (Node child : children) { - if (child.getFileInfo().getName().equals(name)) { - match = child; - break; - } - } - if (match == null) { - throw new RuntimeException("Expected IPM model folder '" + name + "' does not exist!"); - } - parent = match; - relPath = relPath.subpath(1, relPath.getNameCount()); - } - - // Assign the target node's discovered parent. - parent.addChild(node); - } - } diff --git a/src/main/resources/AutomatedPackageTool/DEPENDENCIES b/src/main/resources/AutomatedPackageTool/DEPENDENCIES new file mode 100644 index 0000000..e9ac411 --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/DEPENDENCIES @@ -0,0 +1,173 @@ +// ------------------------------------------------------------------ +// Transitive dependencies of this project determined from the +// maven pom organized by organization. +// ------------------------------------------------------------------ + +Package Tool Command Line + + +From: 'an unknown organization' + - antlr antlr:antlr:jar:2.7.5 + + - AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0 + License: Public Domain + - JSONLD Java :: Core (http://github.com/jsonld-java/jsonld-java/jsonld-java/) com.github.jsonld-java:jsonld-java:jar:0.2 + License: Revised BSD License (https://raw.github.com/jsonld-java/jsonld-java/master/LICENCE) + - JSONLD Java :: Jena Integration (http://github.com/jsonld-java/jsonld-java/jsonld-java-integration/jsonld-java-jena/) com.github.jsonld-java:jsonld-java-jena:jar:0.2 + License: Revised BSD License (https://raw.github.com/jsonld-java/jsonld-java/master/LICENCE) + - FORESITE :: Object Reuse and Exchange library (http://www.openarchives.org/ore) com.googlecode.foresite-toolkit:foresite:jar:0.9 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - concurrent-jena com.hp.hpl.jena:concurrent-jena:jar:1.3.2 + + - json-jena com.hp.hpl.jena:json-jena:jar:1.0 + + - ICU4J (http://www-306.ibm.com/software/globalization/icu/) com.ibm.icu:icu4j:jar:3.4.4 + License: ICU License (http://www-306.ibm.com/software/globalization/icu/license.jsp) + - jdom jdom:jdom:jar:1.0 + + - Lucene Core (http://lucene.apache.org/java/lucene-core) org.apache.lucene:lucene-core:jar:2.2.0 + License: Apache 2 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - spring-aop org.springframework:spring-aop:jar:3.0.7.RELEASE + + - spring-asm org.springframework:spring-asm:jar:3.0.7.RELEASE + + - spring-beans org.springframework:spring-beans:jar:3.0.7.RELEASE + + - spring-context org.springframework:spring-context:jar:3.0.7.RELEASE + + - spring-core org.springframework:spring-core:jar:3.0.7.RELEASE + + - spring-expression org.springframework:spring-expression:jar:3.0.7.RELEASE + + - stax-api stax:stax-api:jar:1.0 + + - Woodstox (http://woodstox.codehaus.org) woodstox:wstx-asl:jar:3.0.0 + + - xalan xalan:xalan:jar:2.7.0 + + - Xerces2-j (https://xerces.apache.org/xerces2-j/) xerces:xercesImpl:jar:2.11.0 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - xmlParserAPIs xerces:xmlParserAPIs:jar:2.0.2 + + - XML Commons External Components XML APIs (http://xml.apache.org/commons/components/external/) xml-apis:xml-apis:jar:1.4.01 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) License: The SAX License (http://www.saxproject.org/copying.html) License: The W3C License (http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.zip) + - XMLUnit for Java (http://xmlunit.sourceforge.net/) xmlunit:xmlunit:jar:1.3 + License: BSD License (http://xmlunit.svn.sourceforge.net/viewvc/*checkout*/xmlunit/trunk/xmlunit/LICENSE.txt) + +From: 'Data Conservancy' (http://dataconservancy.org) + - DCS MHF :: Metadata Representation API (http://maven.dataconservancy.org/sites/mhf/dcs-mhf-representation-api/) org.dataconservancy.mhf:dcs-mhf-representation-api:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - DCS Model :: DCP Object Model (http://maven.dataconservancy.org/sites/model/dcs-model) org.dataconservancy.model:dcs-model:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - DCS Model :: DCP Model Builder (http://maven.dataconservancy.org/sites/model/dcs-model-builder) org.dataconservancy.model:dcs-model-builder:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - DCS Model :: DCP XStream Model Builder (http://maven.dataconservancy.org/sites/model/dcs-model-builder-xstream) org.dataconservancy.model:dcs-model-builder-xstream:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - DCS Model :: Package Model (http://maven.dataconservancy.org/sites/model/dcs-pkg-model) org.dataconservancy.model:dcs-pkg-model:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - DCS Model :: Package Model Implementation (http://maven.dataconservancy.org/sites/model/dcs-pkg-model-impl) org.dataconservancy.model:dcs-pkg-model-impl:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Shared Packaging Code org.dataconservancy.packaging:dcs-package-shared:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Package Validation Logic org.dataconservancy.packaging:dcs-package-validation:jar:1.1.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Package Tool API org.dataconservancy.packaging:dcs-packaging-tool-api:jar:0.9.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Package Tool API Implementation org.dataconservancy.packaging:dcs-packaging-tool-impl:jar:0.9.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Package Tool Model org.dataconservancy.packaging:dcs-packaging-tool-model:jar:0.9.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Package Tool Model Builder org.dataconservancy.packaging:dcs-packaging-tool-model-builder:jar:0.9.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - JSON Implementation of Package Model Builder org.dataconservancy.packaging:dcs-packaging-tool-model-builder-json:jar:0.9.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Package Tool Model Builder using Properties Configuration org.dataconservancy.packaging:dcs-packaging-tool-model-builder-properties:jar:0.9.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + - Package Tool Model Builder using Xstream org.dataconservancy.packaging:dcs-packaging-tool-model-builder-xstream:jar:0.9.0-beta + License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) + +From: 'Extreme! Lab, Indiana University' (http://www.extreme.indiana.edu/) + - MXP1: Xml Pull Parser 3rd Edition (XPP3) (http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/) xpp3:xpp3_min:jar:1.1.4c + License: Indiana University Extreme! Lab Software License, vesion 1.1.1 (http://www.extreme.indiana.edu/viewcvs/~checkout~/XPP3/java/LICENSE.txt) License: Public Domain (http://creativecommons.org/licenses/publicdomain) + +From: 'FasterXML' (http://fasterxml.com/) + - Jackson-annotations (http://wiki.fasterxml.com/JacksonHome) com.fasterxml.jackson.core:jackson-annotations:jar:2.2.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) License: GNU Lesser General Public License, Version 2.1 (http://www.gnu.org/licenses/lgpl-2.1.html) + - Jackson-core (http://wiki.fasterxml.com/JacksonHome) com.fasterxml.jackson.core:jackson-core:jar:2.2.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) License: GNU Lesser General Public License, Version 2.1 (http://www.gnu.org/licenses/lgpl-2.1.html) + - jackson-databind (http://wiki.fasterxml.com/JacksonHome) com.fasterxml.jackson.core:jackson-databind:jar:2.2.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) License: GNU Lesser General Public License, Version 2.1 (http://www.gnu.org/licenses/lgpl-2.1.html) + +From: 'HP Labs' (http://www.hpl.hp.com/semweb/) + - ARQ (http://jena.sourceforge.net/ARQ/) com.hp.hpl.jena:arq:jar:2.2 + License: BSD (http://jena.sourceforge.net/ARQ/license.html) + - ARQ Extra (http://jena.sourceforge.net/ARQ/) com.hp.hpl.jena:arq-extra:jar:2.2 + License: BSD (http://jena.sourceforge.net/ARQ/license.html) + - IRI (http://jena.sourceforge.net/) com.hp.hpl.jena:iri:jar:0.5 + License: BSD (http://jena.sourceforge.net/license.html) + - Jena (http://jena.sourceforge.net/) com.hp.hpl.jena:jena:jar:2.5.5 + License: BSD (http://jena.sourceforge.net/license.html) + - Jena Tests (http://jena.sourceforge.net/) com.hp.hpl.jena:jenatest:jar:2.5.5 + License: BSD (http://jena.sourceforge.net/license.html) + +From: 'Joda.org' (http://www.joda.org) + - Joda time (http://joda-time.sourceforge.net) joda-time:joda-time:jar:2.0 + License: Apache 2 (http://www.apache.org/licenses/LICENSE-2.0.txt) + +From: 'Kohsuke Kawaguchi' (http://www.kohsuke.org/) + - args4j (http://args4j.kohsuke.org/args4j/) args4j:args4j:bundle:2.0.26 + License: MIT License (http://www.opensource.org/licenses/mit-license.php) + +From: 'QOS.ch' (http://www.qos.ch) + - Logback Classic Module (http://logback.qos.ch) ch.qos.logback:logback-classic:jar:1.0.1 + License: Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html) License: GNU Lesser General Public License (http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) + - Logback Core Module (http://logback.qos.ch) ch.qos.logback:logback-core:jar:1.0.1 + License: Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html) License: GNU Lesser General Public License (http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) + - JCL 1.1.1 implemented over SLF4J (http://www.slf4j.org) org.slf4j:jcl-over-slf4j:jar:1.6.1 + License: MIT License (http://www.opensource.org/licenses/mit-license.php) + - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.1 + License: MIT License (http://www.opensource.org/licenses/mit-license.php) + +From: 'Sun Microsystems' (http://java.sun.com/) + - ROME, RSS and atOM utilitiEs for Java (https://rome.dev.java.net/) rome:rome:jar:0.9 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + +From: 'The Apache Software Foundation' (http://www.apache.org/) + - Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Commons Configuration (http://commons.apache.org/configuration/) commons-configuration:commons-configuration:jar:1.8 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Commons IO (http://jakarta.apache.org/commons/io/) commons-io:commons-io:jar:1.3.2 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Commons Compress (http://commons.apache.org/compress/) org.apache.commons:commons-compress:jar:1.3 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Apache HttpClient (http://hc.apache.org/httpcomponents-client) org.apache.httpcomponents:httpclient:jar:4.3.2 + License: Apache License, Version 2.0 (LICENSE.txt) + - HttpClient Cache (http://hc.apache.org/httpcomponents-client) org.apache.httpcomponents:httpclient-cache:jar:4.2.5 + License: Apache License (LICENSE.txt) + - Apache HttpCore (http://hc.apache.org/httpcomponents-core-ga) org.apache.httpcomponents:httpcore:jar:4.3.1 + License: Apache License, Version 2.0 (LICENSE.txt) + - Apache Jena - Libraries POM (http://jena.apache.org/apache-jena-libs/) org.apache.jena:apache-jena-libs:pom:2.11.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Apache Jena - ARQ (SPARQL 1.1 Query Engine) (http://jena.apache.org/jena-arq/) org.apache.jena:jena-arq:jar:2.11.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Apache Jena - Core (http://jena.apache.org/jena-core/) org.apache.jena:jena-core:jar:2.11.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Apache Jena - IRI (http://jena.apache.org/jena-iri/) org.apache.jena:jena-iri:jar:1.0.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + - Apache Jena - TDB (Native Triple Store) (http://jena.apache.org/jena-tdb/) org.apache.jena:jena-tdb:jar:1.0.1 + License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + +From: 'XStream' (http://xstream.codehaus.org) + - XStream Core com.thoughtworks.xstream:xstream:jar:1.3.1 + License: BSD style (http://xstream.codehaus.com/license.html) + + + + diff --git a/src/main/resources/AutomatedPackageTool/LICENSE b/src/main/resources/AutomatedPackageTool/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/main/resources/AutomatedPackageTool/NOTICE b/src/main/resources/AutomatedPackageTool/NOTICE new file mode 100644 index 0000000..5babc0c --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/NOTICE @@ -0,0 +1,8 @@ + +Package Tool Command Line +Copyright 2010-2014 Data Conservancy + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + diff --git a/src/main/resources/AutomatedPackageTool/README.txt b/src/main/resources/AutomatedPackageTool/README.txt new file mode 100644 index 0000000..8b78bb3 --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/README.txt @@ -0,0 +1,46 @@ + usage: AutomatedPackageTool [options] + + : content root directory + : package metadata file location + --overwrite (--force) : If specified, will overwrite if the + destination package file already + exists without prompting. (default: + true) + --stage (--staging, : The directory to which the package + --staging-location, will be staged before building. Will + --package-staging-location) override value in Package Generation + Parameters file. (default: + c:/temp/staging) + -a (--archiving-format) tar|zip : Archive format to use when creating + the package. Defaults to tar + -c (--compression-format) gz|none : Compression format, if archive type + is tar. If not specified, no + compression is used. Ignored if + non-tar archive is used. + -d (-debug, --debug) : print debug information (default: + false) + -eid (--external-project-id) VAL : External project ID to associate with + the package + -f (--format) [BOREM | TEST] : packaging format to use (default: + BOREM) + -g (--generation-params) : package generation params file + location + -h (-help, --help) : print help message (default: true) + -i (-info, --info) : print parameter info (default: false) + -n (--name, --package-name) : The package name, which also + determines the output filename. Will + override value in Package Generation + Parameters file. (default: FooBar) + -o (--location, --output-location) : The output directory to which the + package file will be written. Will + override value in Package Generation + Parameters file. (default: C:\temp) + -r (--rules, --rules-file) : The location of the rules file + -s (--checksum) md5|sha1 : Checksum algorithms to use. If none + specified, will use md5. Can be + specified multiple times + -v (-version, --version) : print version information (default: + false) + -z (--serialization, : Serialization format for the ORE-ReM + --serialization-format) file + JSONLD|TURTLE|XML \ No newline at end of file diff --git a/src/main/resources/AutomatedPackageTool/bin/pkg-gen.bat b/src/main/resources/AutomatedPackageTool/bin/pkg-gen.bat new file mode 100644 index 0000000..18b4d24 --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/bin/pkg-gen.bat @@ -0,0 +1,38 @@ +:: Copyright 2017 Johns Hopkins University +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +@ECHO OFF + +SET JAVA_BIN=java +SET EXECUTABLE_JAR=dcs-packaging-tool-cli-1.0.0-SNAPSHOT.jar +SET COMMAND_LINE=%JAVA_BIN% -jar %EXECUTABLE_JAR% %* + +java -version 2>nul 1>nul + +IF %ERRORLEVEL%==0 (goto java-found) ELSE (goto java-not-found) + +:java-found +%COMMAND_LINE% +goto exit + +:java-not-found +@ECHO ON +echo Did not find %JAVA_BIN% on the command path. +echo Please insure that Java is installed +echo and that it is on your command path. +goto exit + + +:exit +echo Exiting. diff --git a/src/main/resources/AutomatedPackageTool/bin/pkg-gen.sh b/src/main/resources/AutomatedPackageTool/bin/pkg-gen.sh new file mode 100644 index 0000000..57fac0b --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/bin/pkg-gen.sh @@ -0,0 +1,33 @@ +# Copyright 2015 Johns Hopkins University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +JAVA_BIN=java +JAVA_OPTS="" + +EXECUTABLE_JAR=dcs-packaging-tool-cli-1.0.0-SNAPSHOT.jar + +JAVA_CMD="$JAVA_BIN $JAVA_OPTS" +COMMAND_LINE="$JAVA_CMD -jar $EXECUTABLE_JAR $@" + +which $JAVA_BIN 2>&1 > /dev/null + +if [ $? != 0 ] ; then + echo "Did not find $JAVA_BIN on the command path." + echo "Please be sure that the path to your Java executable is set on your command path." + exit 1 +fi + +$COMMAND_LINE diff --git a/src/main/resources/AutomatedPackageTool/samples/apt-rules.xml b/src/main/resources/AutomatedPackageTool/samples/apt-rules.xml new file mode 100644 index 0000000..0d13346 --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/samples/apt-rules.xml @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + + + + + + + + + + DataItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataItem + + + + + + + + + + + + + + + + + + + + + + DataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MetadataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/AutomatedPackageTool/samples/metadata.properties b/src/main/resources/AutomatedPackageTool/samples/metadata.properties new file mode 100644 index 0000000..cfa1b1b --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/samples/metadata.properties @@ -0,0 +1,6 @@ +Domain-Profile = http://dataconservancy.org/ptg-profiles/dcs-bo-1.0 +Package-Name = PackageName +Contact-Name = User Name +Contact-Email = user@organization +Bag-Count = 1 of 1 +Bagging-Date = 2017-01-01 \ No newline at end of file diff --git a/src/main/resources/AutomatedPackageTool/samples/packageGenerationParameters b/src/main/resources/AutomatedPackageTool/samples/packageGenerationParameters new file mode 100644 index 0000000..36ee91f --- /dev/null +++ b/src/main/resources/AutomatedPackageTool/samples/packageGenerationParameters @@ -0,0 +1,48 @@ +# Copyright 2017 Johns Hopkins University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +#*************************************************** +# The following fields are REQUIRED to be supplied +#*************************************************** + +Package-Format-Id = BOREM + +BagIt-Profile-Identifier = http://dataconservancy.org/formats/data-conservancy-pkg-1.0 + +#*************************************************** +# The following fields SHOULD be supplied +#*************************************************** + +#Options for Checksum algorimth are: md5, sha1 +Checksum-Algs = md5 + +#Options for Archiving-format are: tar, zip, none +Archiving-Format = tar + +#Options for Compression-format are: gz, none +Compression-Format = gz + +#Options for ReM-Serialization-Format are: json, turtle, xml +ReM-Serialization-Format = TURTLE + +#*************************************************** +# The following fields MAY be supplied +#*************************************************** + +# Package-Location = / +# Package-Staging-Location = / +# Package-Name = MyPackage +# External-Project-Id = Id +# Domain-Profile = profile \ No newline at end of file diff --git a/src/main/resources/org/dataconservancy/apt/config/apt-rules.xml b/src/main/resources/org/dataconservancy/apt/config/apt-rules.xml new file mode 100644 index 0000000..cb68311 --- /dev/null +++ b/src/main/resources/org/dataconservancy/apt/config/apt-rules.xml @@ -0,0 +1,367 @@ + + + + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + + + + + + + + + + + + DataItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataItem + + + + + + + + + + + + + + + + + + + + + + DataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MetadataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/org/dataconservancy/apt/config/packageGenerationParameters b/src/main/resources/org/dataconservancy/apt/config/packageGenerationParameters new file mode 100644 index 0000000..d2f940d --- /dev/null +++ b/src/main/resources/org/dataconservancy/apt/config/packageGenerationParameters @@ -0,0 +1,32 @@ +# Copyright 2015 Johns Hopkins University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +#*************************************************** +# The following fields are REQUIRED to be supplied +#*************************************************** +Package-Format-Id = BOREM +BagIt-Profile-Identifier = http://dataconservancy.org/formats/data-conservancy-pkg-1.0 + +#*************************************************** +# The following fields SHOULD be supplied +#*************************************************** +#Options for Checksum algorimth are: md5, sha1 +Checksum-Algs = md5 +#Options for Archiving-format are: tar, zip, none +Archiving-Format = tar +#Options for Compression-format are: gz, none +Compression-Format = gz +#Options for ReM-Serialization-Format are: json, turtle, xml +ReM-Serialization-Format = TURTLE diff --git a/src/test/java/org/dataconservancy/packaging/tool/cli/RdfContentProviderTest.java b/src/test/java/org/dataconservancy/packaging/tool/cli/RdfContentProviderTest.java index 1840b82..01334c8 100644 --- a/src/test/java/org/dataconservancy/packaging/tool/cli/RdfContentProviderTest.java +++ b/src/test/java/org/dataconservancy/packaging/tool/cli/RdfContentProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Johns Hopkins University + * Copyright 2017 Johns Hopkins University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,15 +20,21 @@ import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.riot.Lang; import org.apache.jena.riot.RDFDataMgr; -import org.junit.Test; import org.dataconservancy.packaging.shared.IpmPackager; +import org.dataconservancy.packaging.tool.api.RulesEngine; +import org.dataconservancy.packaging.tool.impl.RulesEngineImpl; +import org.dataconservancy.packaging.tool.model.builder.xstream.JaxbPackageDescriptionRulesBuilder; +import org.dataconservancy.packaging.tool.model.PackageDescriptionRulesBuilder; +import org.dataconservancy.packaging.tool.model.rules.RulesSpec; +import java.io.File; import java.io.InputStream; import java.net.URI; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import org.junit.Test; /** @@ -41,16 +47,16 @@ public class RdfContentProviderTest { // to pass to an IpmPackager to create a package. // Compare the package contents to that of the original source. @Test - public void testCreateRdfPackage() throws Exception { + public void testCreateRdfPackageFromJenaFile() throws Exception { final String dataResource = "/testCreateRdfPackage/"; final String jenaResource = dataResource + "state/DOMAIN_OBJECTS"; - final String bagResource = dataResource + "Hanh-test/data/bin"; + final String bagResource = dataResource + "TestPackageForCLI/data/bin"; // Read Jena model from sample DOMAIN_OBJECTS file. final String jenaFile = RdfContentProviderTest.class.getResource(jenaResource).getPath(); final Model jenaModel = ModelFactory.createDefaultModel(); RDFDataMgr.read(jenaModel, jenaFile, Lang.TTL); - assertEquals(148, jenaModel.size()); + assertEquals(63, jenaModel.size()); // Metadata final InputStream metadataStream = @@ -60,6 +66,7 @@ public void testCreateRdfPackage() throws Exception { final InputStream paramStream = RdfContentProviderTest.class.getResourceAsStream("/PackageGenerationParams.properties"); + // Create content provider using local data path String contentPath = RdfContentProviderTest.class.getResource(bagResource).getPath(); contentPath = contentPath.replaceFirst("^/(.:/)", "$1"); // Remove leading "/" on Windows final URI contentURI = new URI(contentPath); @@ -75,4 +82,52 @@ public void testCreateRdfPackage() throws Exception { assertNotNull(pkg); } + + // Create a Jena model, package metadata and generation parameters + // to pass to an IpmPackager to create a package. + // Compare the package contents to that of the original source. + @Test + public void testCreateRdfPackageFromRules() throws Exception { + final String rootFolder = "/testCreateRdfPackage/narwhal"; + final String dataResource = rootFolder + "/eloka-arctic.org"; + + // Rules engine creates Jena model from rules and local data + final InputStream rulesStream = + RdfContentProviderTest.class.getClassLoader() + .getResourceAsStream("default-engine-rules.xml"); + + final PackageDescriptionRulesBuilder builder = new JaxbPackageDescriptionRulesBuilder(); + final RulesSpec rulesSpec = builder.buildPackageDescriptionRules(rulesStream); + final RulesEngine engine = new RulesEngineImpl(rulesSpec); + + String dataPath = RdfContentProviderTest.class.getResource(dataResource).getPath(); + dataPath = dataPath.replaceFirst("^/(.:/)", "$1"); // Remove leading "/" on Windows + final File dataFolder = new File(dataPath); + final Model jenaModel = engine.generateRdf(dataFolder); + assertEquals(610, jenaModel.size()); + + // Metadata + final InputStream metadataStream = + RdfContentProviderTest.class.getResourceAsStream("/metadata.properties"); + + // Read package generation parameters from a resource file. + final InputStream paramStream = + RdfContentProviderTest.class.getResourceAsStream("/PackageGenerationParams.properties"); + + // Create content provider using local data path + String rootPath = RdfContentProviderTest.class.getResource(rootFolder).getPath(); + rootPath = rootPath.replaceFirst("^/(.:/)", "$1"); // Remove leading "/" on Windows + final URI contentURI = new URI(rootPath); + + final RdfContentProvider contentProvider = new RdfContentProvider(jenaModel, contentURI); + + // Create the package + final IpmPackager packager = new IpmPackager(); + final org.dataconservancy.packaging.tool.api.Package pkg = + packager.buildPackage(contentProvider, metadataStream, paramStream); + + // TODO - Test the package contents + assertNotNull(pkg); + } + } diff --git a/src/test/resources/default-engine-rules.xml b/src/test/resources/default-engine-rules.xml new file mode 100644 index 0000000..cb68311 --- /dev/null +++ b/src/test/resources/default-engine-rules.xml @@ -0,0 +1,367 @@ + + + + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + + + + + + + + + + + + DataItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataItem + + + + + + + + + + + + + + + + + + + + + + DataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MetadataFile + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl deleted file mode 100644 index c8ba077..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix ore: . - -<> a ore:ResourceMap ; - ore:describes <#Aggregation> . - -<#Aggregation> a ore:Aggregation ; - ore:aggregates , , , , , , , , , , , , , , , . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/STATE/pkgState.bin b/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/STATE/pkgState.bin deleted file mode 100644 index 30a519a..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/STATE/pkgState.bin and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/bag-info.txt b/src/test/resources/testCreateRdfPackage/Hanh-test/bag-info.txt deleted file mode 100644 index a2321d7..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/bag-info.txt +++ /dev/null @@ -1,10 +0,0 @@ -Bag-Count: 1 of 1 -Bag-Size: 163 MB -BagIt-Profile-Identifier: http://dataconservancy.org/formats/data-conservancy-pkg-1.0 -Bagging-Date: 2016-01-04 -Contact-Email: hanh@jhu.edu -Contact-Name: Hanh vu -Domain-Profile: http://dataconservancy.org/ptg-profiles/dcs-bo-1.0 -Package-Name: Hanh-test -Payload-Oxum: 170692702.30 -Resource-Manifest: bag://Hanh-test/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0858.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0858.jpg deleted file mode 100644 index 7cabca2..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0858.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0899.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0899.jpg deleted file mode 100644 index e4fbda7..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0899.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0960.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0960.jpg deleted file mode 100644 index 0d22afb..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_0960.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_1159.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_1159.jpg deleted file mode 100644 index feb7304..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_1159.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9184.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9184.jpg deleted file mode 100644 index 4ebd2d1..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9184.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9189.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9189.jpg deleted file mode 100644 index e7f2bb4..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9189.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9202.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9202.jpg deleted file mode 100644 index 4ea06de..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9202.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9248.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9248.jpg deleted file mode 100644 index 2fce557..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9248.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9302.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9302.jpg deleted file mode 100644 index 92c7aa3..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9302.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9313.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9313.jpg deleted file mode 100644 index 3ac3d8f..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9313.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9321.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9321.jpg deleted file mode 100644 index 8877bcc..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9321.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9342.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9342.jpg deleted file mode 100644 index 4472540..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9342.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9380.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9380.jpg deleted file mode 100644 index 16bf600..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9380.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9455.jpg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9455.jpg deleted file mode 100644 index 2fce557..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/IMG_9455.jpg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/installers/DC Package Tool-1.0.2.dmg b/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/installers/DC Package Tool-1.0.2.dmg deleted file mode 100644 index 29b69c9..0000000 Binary files a/src/test/resources/testCreateRdfPackage/Hanh-test/data/bin/To Print/installers/DC Package Tool-1.0.2.dmg and /dev/null differ diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print.ttl deleted file mode 100644 index 5897e42..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - -<> a bom:Collection ; - bom:hasContact [ a ] ; - bom:hasCreateDate "2014-09-10T04:00:00Z"^^ ; - bom:hasCreator [ a ] ; - bom:hasMember ; - bom:hasMetadata , , , , , , , , , , , , ; - bom:hasModifiedDate "2015-12-30T04:15:28Z"^^ ; - bom:hasTitle "To Print" . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0858.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0858.jpg.ttl deleted file mode 100644 index 4298b6c..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0858.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2014-09-10T17:41:45Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2014-09-10T17:41:46Z"^^ ; - bom:hasSize "6437931"^^ ; - bom:hasTitle "IMG_0858.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0899.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0899.jpg.ttl deleted file mode 100644 index 18f1459..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0899.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2014-09-10T17:39:37Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2014-09-10T17:39:38Z"^^ ; - bom:hasSize "5718363"^^ ; - bom:hasTitle "IMG_0899.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0960.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0960.jpg.ttl deleted file mode 100644 index c0fb413..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_0960.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2014-09-10T17:42:47Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2014-09-10T17:42:47Z"^^ ; - bom:hasSize "8255112"^^ ; - bom:hasTitle "IMG_0960.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_1159.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_1159.jpg.ttl deleted file mode 100644 index 03a738a..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_1159.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2014-09-10T17:43:51Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2014-09-10T17:43:51Z"^^ ; - bom:hasSize "4029906"^^ ; - bom:hasTitle "IMG_1159.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9184.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9184.jpg.ttl deleted file mode 100644 index 53ee7b0..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9184.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:20:35Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:20:35Z"^^ ; - bom:hasSize "6565477"^^ ; - bom:hasTitle "IMG_9184.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9189.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9189.jpg.ttl deleted file mode 100644 index a676880..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9189.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:21:29Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:21:30Z"^^ ; - bom:hasSize "4991733"^^ ; - bom:hasTitle "IMG_9189.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9202.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9202.jpg.ttl deleted file mode 100644 index 266a465..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9202.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:20:03Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:20:03Z"^^ ; - bom:hasSize "5758095"^^ ; - bom:hasTitle "IMG_9202.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9248.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9248.jpg.ttl deleted file mode 100644 index db9e94b..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9248.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:15:38Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:15:39Z"^^ ; - bom:hasSize "7294566"^^ ; - bom:hasTitle "IMG_9455.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9302.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9302.jpg.ttl deleted file mode 100644 index f68b8a8..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9302.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:18:28Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:18:28Z"^^ ; - bom:hasSize "6022116"^^ ; - bom:hasTitle "IMG_9302.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9313.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9313.jpg.ttl deleted file mode 100644 index b7dbcef..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9313.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:18:01Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:18:01Z"^^ ; - bom:hasSize "6247196"^^ ; - bom:hasTitle "IMG_9313.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9321.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9321.jpg.ttl deleted file mode 100644 index 2c17503..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9321.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:17:49Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:17:49Z"^^ ; - bom:hasSize "4358654"^^ ; - bom:hasTitle "IMG_9321.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9342.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9342.jpg.ttl deleted file mode 100644 index 635ccee..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9342.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:17:16Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:17:16Z"^^ ; - bom:hasSize "2839211"^^ ; - bom:hasTitle "IMG_9342.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9380.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9380.jpg.ttl deleted file mode 100644 index 4d33511..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9380.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:02:43Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:02:43Z"^^ ; - bom:hasSize "4813513"^^ ; - bom:hasTitle "IMG_9380.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9455.jpg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9455.jpg.ttl deleted file mode 100644 index db9e94b..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/IMG_9455.jpg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:Metadata ; - bom:hasCreateDate "2015-12-23T02:15:38Z"^^ ; - bom:hasFormat "info:pronom/fmt/43" , "image/jpeg" ; - bom:hasModifiedDate "2015-12-23T02:15:39Z"^^ ; - bom:hasSize "7294566"^^ ; - bom:hasTitle "IMG_9455.jpg" ; - bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/installers.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/installers.ttl deleted file mode 100644 index 0145b2e..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/installers.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix bom: . - -<> a bom:DataItem ; - bom:hasCreateDate "2015-12-22T20:37:13Z"^^ ; - bom:hasMember ; - bom:hasModifiedDate "2015-12-22T20:37:25Z"^^ ; - bom:hasTitle "installers" ; - bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/installers/DC Package Tool-1.0.2.dmg.ttl b/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/installers/DC Package Tool-1.0.2.dmg.ttl deleted file mode 100644 index bb33ca0..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/data/obj/To Print/installers/DC Package Tool-1.0.2.dmg.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix bom: . - - - a bom:File ; - bom:hasCreateDate "2015-12-22T20:28:31Z"^^ ; - bom:hasFormat "application/octet-stream" ; - bom:hasModifiedDate "2015-12-22T20:28:37Z"^^ ; - bom:hasSize "97350112"^^ ; - bom:hasTitle "DC Package Tool-1.0.2.dmg" ; - bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/manifest-md5.txt b/src/test/resources/testCreateRdfPackage/Hanh-test/manifest-md5.txt deleted file mode 100644 index f80e240..0000000 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/manifest-md5.txt +++ /dev/null @@ -1,30 +0,0 @@ -b6e1b57993d42adc152583eb754bf306 data/obj/To Print/IMG_0858.jpg.ttl -22f519a5f364f4e140683c68d0308471 data/bin/To Print/IMG_9313.jpg -0d1d19e02c3eeb98bb156776928515d2 data/bin/To Print/IMG_0858.jpg -41d6c795547769a18cf34eaf5383e006 data/bin/To Print/IMG_9321.jpg -bba18e142aa70656c22fbd629c917fa8 data/bin/To Print/IMG_1159.jpg -0fdc4265d55834a60ca89b7d8c309295 data/obj/To Print/IMG_9313.jpg.ttl -38e9b597759246b1a7f854cb9ebf408c data/bin/To Print/IMG_9202.jpg -a10b9f296fc81625670149e6bc81dc75 data/bin/To Print/IMG_9342.jpg -64aafec1e91a95920f1ef79b7815cdc8 data/obj/To Print/IMG_0960.jpg.ttl -16e177a02698445a755b55001863a6b6 data/bin/To Print/IMG_9380.jpg -587b30ebffba5fc3aafba5fc07c692cb data/bin/To Print/IMG_0960.jpg -666d22817e8e2dab94fc6480397eee67 data/obj/To Print/IMG_0899.jpg.ttl -075e29d9cc9e761da8c59c541966e434 data/bin/To Print/installers/DC Package Tool-1.0.2.dmg -c9f84016369cb995d2a943af46272c24 data/obj/To Print/IMG_9380.jpg.ttl -d45717407954496e4cee39f2e21f68e8 data/obj/To Print/IMG_9302.jpg.ttl -76a06c6212089b6aac85e16a9f208565 data/obj/To Print/IMG_9455.jpg.ttl -475355780b2415396bcfff5dec636a36 data/bin/To Print/IMG_0899.jpg -8769ac673a739e5ba3b1c576e7799420 data/obj/To Print/IMG_9184.jpg.ttl -810dc1c82add9c1d2feaa78bf6cdf386 data/bin/To Print/IMG_9302.jpg -8f2fd86ac4a7510a19164cf7a0c2473e data/bin/To Print/IMG_9189.jpg -89a71f8cde20994d94cc51f8d842b473 data/obj/To Print/IMG_9321.jpg.ttl -2258e99295b8d5596e82a7d21e10a39c data/bin/To Print/IMG_9455.jpg -6d953c203721bad0b97bf0759a52b67e data/obj/To Print.ttl -40a443d234911ceee9201b8a510a6391 data/obj/To Print/installers.ttl -3c9f230a8311006acadf99a8b10d23df data/bin/To Print/IMG_9184.jpg -c2272f1b17bc7b6218761798e862599b data/obj/To Print/IMG_9202.jpg.ttl -89f6c527ab2f344de3fb310308468c31 data/obj/To Print/IMG_9342.jpg.ttl -1cf67a87f2563298cb0ccfe9216e73af data/obj/To Print/IMG_9189.jpg.ttl -397f5c393cf8971ce867e981d7fd81e4 data/obj/To Print/IMG_1159.jpg.ttl -32defb870951a6e9887d321af60fdee1 data/obj/To Print/installers/DC Package Tool-1.0.2.dmg.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcam.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcam.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcam.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcam.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcelements.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcelements.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcelements.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcelements.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcmitype.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcmitype.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcmitype.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcmitype.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl similarity index 64% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl index 34f7626..ca22dc7 100644 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl @@ -1,347 +1,328 @@ +@prefix bom: . @prefix dcterms: . +@prefix foaf: . -_:b0 a ; - - "1"^^ ; - - . - -_:b1 a ; - - "0"^^ ; - - . - - - a ; +bom:hasPublisher a ; "A data property specifying a publisher for a Project."@en ; - ; + bom:Project ; "has publisher"@en ; . -_:b2 a ; - - "1"^^ ; - - . - -_:b3 a ; - - "1"^^ ; - - . - - - a ; +bom:MetadataFile a ; [ a ; "0"^^ ; - + bom:isMemberOf ] . -_:b4 a ; - - "0"^^ ; - - . - -_:b5 a ; - - "1"^^ ; - - . - - - a , ; +bom:hasBusinessId a , ; "A data property specifying a business identifier for the BusinessObject."@en ; - ; + bom:BusinessObject ; "has business id"@en ; . - - a ; +bom:hasTitle a ; "A data property specifying a title for a Project, Collection, DataItem or File."@en ; - ; + bom:ContentEntity ; "has title"@en ; . -_:b6 a ; - - "1"^^ ; +_:b0 a ; + + bom:Collection ; - . + bom:hasMember . - - a ; +bom:ContentEntity a ; [ a ; - ( _:b6 _:b0 ) + ( _:b1 _:b2 ) ] . - - a ; +bom:hasDescription a ; "A data property specifying a description for a Project, Collection, DataItem or File."@en ; - ; + bom:ContentEntity ; "has description"@en ; . - - a ; +bom:NamedPerson a ; - ; + foaf:Person ; [ a ; "1"^^ ; - + foaf:name ] . - - a ; +_:b3 a ; + + "1"^^ ; + + bom:hasEndDate . + +bom:hasStartDate a ; "A data property specifying the start date for the Project."@en ; - ; + bom:Project ; "has start date"@en ; . -_:b7 a ; +_:b4 a ; "0"^^ ; - . + bom:isMemberOf . -_:b8 a ; - - ; +_:b5 a ; "1"^^ ; - . + bom:hasUsedStorage . -_:b9 a ; +_:b6 a ; + + bom:File ; + + bom:hasMember . + +_:b7 a ; "0"^^ ; - . + foaf:name . -_:b10 a ; - +_:b8 a ; + "1"^^ ; - . + bom:hasDepositDate . - - a ; +bom:hasAlternateId a ; "A data property specifying an alternate identifier for the BusinessObject."@en ; - ; + bom:BusinessObject ; "has alternate id"@en ; . - - a ; +_:b9 a ; + + "1"^^ ; + + bom:hasPublisher . + +bom:hasCreateDate a ; "A data property specifying the create date for a Collection, DataItem or File."@en ; - ; + bom:MemberEntity ; "has create date"@en ; . - +bom:hasCitableLocator a ; "A data property specifying a citable locator for the Collection or DataItem."@en ; - ; + bom:DataAggregator ; "has citable locator"@en ; . - +bom:hasPrincipalInvestigator a ; "A data property specifying a principal investigator for a Project."@en ; - ; + bom:Project ; "has principal investigator"@en ; . - - a ; +bom:hasContact a ; "A data property specifying a contact for the Collection or DataItem."@en ; - ; + bom:DataAggregator ; "has contact"@en ; - . + bom:NamedPerson . - - a ; +bom:hasDiscipline a ; "A data property specifying a discipline for a Collection."@en ; - ; + bom:Collection ; "has discipline"@en ; . - - a ; +_:b10 a ; + + bom:DataAggregator ; + + bom:hasMember . + +bom:Person a ; "A Person is a person."@en ; "Person"@en ; - , ; + bom:NamedPerson , bom:BusinessObject ; [ a ; ( _:b11 ) ] . - - a ; +bom:hasFundingEntity a ; "A data property specifying a funding entity for a Project."@en ; - ; + bom:Project ; "has funding entity"@en ; . -_:b12 a ; - - ; +_:b11 a ; + + "0"^^ ; - . + bom:hasFixity . -_:b13 a ; +_:b12 a ; "0"^^ ; - . + bom:hasFixity . - - a ; +bom:hasUsedStorage a ; "A data property specifying the amount of storage used by the Project."@en ; - ; + bom:Project ; "has used storage"@en ; . -_:b14 a ; - +_:b13 a ; + + bom:CollectionAggregator ; + "1"^^ ; - . + bom:isMemberOf . - - a . +bom:MemberEntity a . + +_:b14 a ; + + "1"^^ ; + + bom:hasSize . _:b15 a ; - - ; + + "1"^^ ; - . + bom:hasFixity . - - a ; +bom:hasSize a ; "A data property specifying the size of a File"@en ; - ; + bom:File ; "has size"@en ; . - - a ; +_:b16 a ; + + "1"^^ ; + + bom:hasStartDate . + +bom:hasEndDate a ; "A data property specifying the end date for the Project."@en ; - ; + bom:Project ; "has end date"@en ; . - - a ; +bom:hasContentModel a ; "A data property specifying the content model for a DataItem."@en ; - ; + bom:DataItem ; "has content model"@en ; . - - a ; +_:b17 a ; + + "1"^^ ; + + bom:hasAllottedStorage . + +bom:hasMember a ; "Links an aggregating object to a constituent member."@en ; - ; + bom:ContentEntity ; "has member"@en ; - . + bom:MemberEntity . -_:b16 a ; - - ; - - . - - - a ; +bom:hasCreator a ; "A data property specifying a creator for the Collection or DataItem."@en ; - ; + bom:DataAggregator ; "has creator"@en ; - . + bom:NamedPerson . a ; @@ -351,28 +332,22 @@ _:b16 a ; dcterms:publisher ; dcterms:title "Data Conservancy Business Object Model Ontology"@en ; - ; + foaf: ; "2015/11/03" . -_:b17 a ; - - "0"^^ ; - - . - _:b18 a ; - "0"^^ ; + "1"^^ ; - . + bom:hasDepositor . - +bom:hasPublicationDate a ; "A data property specifying the publication date for a Collection."@en ; - ; + bom:Collection ; "has publication date"@en ; @@ -380,279 +355,268 @@ _:b18 a ; _:b19 a ; - "1"^^ ; + "0"^^ ; - . + foaf:name . _:b20 a ; - - ; - - . - -_:b21 a ; - "0"^^ ; + "1"^^ ; - . + bom:hasModifiedDate . - - a ; +bom:hasFormat a ; "A data property specifying a format for a DataItem."@en ; - ; + bom:File ; "has format"@en ; . - - a ; +bom:File a ; "A File is a sequence of binary data. "@en ; "File"@en ; - , , , ; + bom:MemberEntity , bom:DataEntity , bom:ContentEntity , bom:BusinessObject ; [ a ; - ( _:b17 _:b12 _:b22 _:b2 _:b1 ) + ( _:b21 _:b22 _:b14 _:b15 _:b7 ) ] . - - a ; +bom:hasFixity a ; "A data property specifying the fixity of a File"@en ; - ; + bom:File ; "has fixity"@en ; . - - a ; +bom:hasDepositDate a ; "A data property specifying the deposit date for a Collection, DataItem or File."@en ; - ; + bom:MemberEntity ; "has deposit date"@en ; . - +bom:CollectionAggregator a . -_:b22 a ; - +_:b23 a ; + "1"^^ ; - . + bom:hasFundingEntity . - - a , ; +bom:isMemberOf a , ; "Links from a constituent member to an aggregating object."@en ; - ; + bom:MemberEntity ; "is member of"@en ; - ; + bom:ContentEntity ; - . + bom:hasMember . -_:b23 a ; +_:b24 a ; + + bom:Collection ; + + bom:isMemberOf . + +_:b21 a ; - "1"^^ ; + "0"^^ ; - . + bom:hasMember . - - a ; +bom:Project a ; " A Project aggregates Collections "@en ; "Project"@en ; - , , ; + bom:ContentEntity , bom:CollectionAggregator , bom:BusinessObject ; [ a ; - ( _:b16 _:b18 _:b24 _:b25 _:b19 _:b3 _:b14 _:b26 _:b27 _:b7 ) + ( _:b0 _:b4 _:b9 _:b17 _:b5 _:b16 _:b3 _:b23 _:b25 _:b19 ) ] . -_:b24 a ; - - "1"^^ ; - - . - - - a ; +bom:Collection a ; "\n A Collection is a group of Collections and DataItems.\n "@en ; "Collection"@en ; - , , , , ; + bom:MemberEntity , bom:DataAggregator , bom:ContentEntity , bom:CollectionAggregator , bom:BusinessObject ; [ a ; - ( _:b20 _:b8 _:b10 _:b9 _:b21 ) + ( _:b10 _:b13 _:b26 _:b27 _:b28 ) ] . - - a ; +bom:DataEntity a ; [ a ; - ( _:b23 _:b5 _:b28 _:b29 ) + ( _:b29 _:b8 _:b20 _:b18 ) ] . - - a . +_:b29 a ; + + "1"^^ ; + + bom:hasCreateDate . -_:b11 a ; +bom:DataAggregator a . + +_:b2 a ; - "0"^^ ; + "1"^^ ; - . + bom:hasTitle . - - a ; +bom:hasVersion a ; "A data property specifying a version for the BusinessObject."@en ; - ; + bom:BusinessObject ; "has version"@en ; . +_:b30 a ; + + "0"^^ ; + + foaf:name . + _:b26 a ; "1"^^ ; - . + bom:hasPublicationDate . + +_:b28 a ; + + "0"^^ ; + + foaf:name . + +_:b22 a ; + + bom:DataItem ; + + bom:isMemberOf . + +_:b1 a ; + + "1"^^ ; + + bom:hasDescription . - +bom:hasAllottedStorage a ; "A data property specifying the amount of allotted storage for the Project."@en ; - ; + bom:Project ; "has allotted storage"@en ; . -_:b30 a ; - - ; - - . - - - a ; +bom:hasMetadata a ; "Links from a BusinessObject to a metadata File"@en ; - ; + bom:BusinessObject ; "has metadata"@en ; - . + bom:MetadataFile . -_:b29 a ; +_:b27 a ; - "1"^^ ; + "0"^^ ; - . + bom:hasFixity . - - a ; +bom:hasDepositor a ; "A data type specifying a depositor for a Collection, DataItem or File."@en ; - ; + bom:MemberEntity ; "has depositor"@en ; - . + bom:Person . -_:b28 a ; - - "1"^^ ; - - . - - - a ; +bom:DataItem a ; "\n A DataItem is an aggregation of Files. \n "@en ; "DataItem"@en ; - , , , , ; + bom:MemberEntity , bom:DataEntity , bom:DataAggregator , bom:ContentEntity , bom:BusinessObject ; [ a ; - ( _:b30 _:b15 _:b13 _:b4 ) + ( _:b6 _:b24 _:b12 _:b30 ) ] . - - a ; +bom:hasAwardNumber a ; "A data property specifying the award number of a grant provided by a funding agency."@en ; - ; + bom:Project ; "has award number"@en ; . - - a , ; +_:b25 a ; + + "0"^^ ; + + bom:hasFixity . + +bom:isMetadataFor a , ; "Links from a metadata File to a Businsess Object."@en ; - ; + bom:File ; "is metadata for"@en ; - ; + bom:BusinessObject ; - . + bom:hasMetadata . - - a ; +bom:hasModifiedDate a ; "A data property specifying the modification date for a Collection, DataItem or File."@en ; - ; + bom:MemberEntity ; "has modified date"@en ; . -_:b27 a ; - - "0"^^ ; - - . - -_:b25 a ; - - "1"^^ ; - - . - - - a ; +bom:BusinessObject a ; "\n A BusinessObject is a common superclass for objects which must have a business ID\n "@en ; @@ -662,5 +626,5 @@ _:b25 a ; "1"^^ ; - + bom:hasBusinessId ] . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl similarity index 99% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl index 8490cab..419ec3d 100644 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl @@ -1,4 +1,5 @@ @prefix dcterms: . +@prefix foaf: . dcterms:medium a ; @@ -399,7 +400,7 @@ dcterms:creator a ; dcterms:modified "2010-10-11"^^ ; - . + foaf:maker . dcterms:accessRights a ; diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/foaf.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/foaf.ttl similarity index 69% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/foaf.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/foaf.ttl index dd49df6..a87a9ef 100644 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/foaf.ttl +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/foaf.ttl @@ -1,26 +1,27 @@ - - a , ; +@prefix dcterms: . +@prefix foaf: . + +foaf:knows a , ; "A person known by this person (indicating some level of reciprocated interaction between the parties)." ; - ; + foaf:Person ; - ; + foaf: ; "knows" ; - ; + foaf:Person ; "stable" . - - a , ; +foaf:firstName a , ; "The first name of a person." ; - ; + foaf:Person ; - ; + foaf: ; "firstName" ; @@ -28,31 +29,29 @@ "testing" . - - a , , ; +foaf:icqChatID a , , ; "An ICQ chat ID" ; - ; + foaf:Agent ; - ; + foaf: ; "ICQ chat ID" ; ; - ; + foaf:nick ; "testing" . - - a , , ; +foaf:birthday a , , ; "The birthday of this Agent, represented in mm-dd string form, eg. '12-31'." ; - ; + foaf:Agent ; - ; + foaf: ; "birthday" ; @@ -60,25 +59,23 @@ "unstable" . - - a , ; +foaf:givenname a , ; "The given name of some person." ; - ; + foaf: ; "Given name" ; "archaic" . - - a , ; +foaf:focus a , ; "The underlying or 'focal' entity associated with some SKOS-described concept." ; ; - ; + foaf: ; "focus" ; @@ -86,192 +83,182 @@ "testing" . - - a , ; +foaf:phone a , ; "A phone, specified using fully qualified tel: URI scheme (refs: http://www.w3.org/Addressing/schemes.html#tel)." ; - ; + foaf: ; "phone" ; "testing" . - +foaf:accountServiceHomepage a , ; "Indicates a homepage of the service provide for this online account." ; - ; + foaf:OnlineAccount ; - ; + foaf: ; "account service homepage" ; - ; + foaf:Document ; "testing" . - - a , , ; +foaf:openid a , , ; "An OpenID for an Agent." ; - ; + foaf:Agent ; - ; + foaf: ; "openid" ; - ; + foaf:Document ; - ; + foaf:isPrimaryTopicOf ; "testing" . - +foaf:isPrimaryTopicOf a , ; "A document that this thing is the primary topic of." ; ; - ; + foaf: ; "is primary topic of" ; - ; + foaf:Document ; - ; + foaf:page ; - ; + foaf:primaryTopic ; "stable" . - - a , ; +foaf:givenName a , ; "The given name of some person." ; - ; + foaf: ; "Given name" ; "testing" . - - a , ; +foaf:depicts a , ; "A thing depicted in this representation." ; - ; + foaf:Image ; - ; + foaf: ; "depicts" ; ; - ; + foaf:depiction ; "testing" . - - a , ; +foaf:Project a , ; "A project (a collective endeavour of some kind)." ; - ; + foaf: ; "Project" ; - , ; + foaf:Person , foaf:Document ; "testing" . - - a , ; +foaf:account a , ; "Indicates an account held by this agent." ; - ; + foaf:Agent ; - ; + foaf: ; "account" ; - ; + foaf:OnlineAccount ; "testing" . - - a , ; +foaf:skypeID a , ; "A Skype ID" ; - ; + foaf:Agent ; - ; + foaf: ; "Skype ID" ; ; - ; + foaf:nick ; "testing" . - - a , ; +foaf:Image a , ; "An image." ; - ; + foaf: ; "Image" ; - ; + foaf:Document ; "testing" . - - a , ; +foaf:page a , ; "A page or document about this thing." ; ; - ; + foaf: ; "page" ; - ; + foaf:Document ; - ; + foaf:topic ; "testing" . - +foaf:OnlineEcommerceAccount a , ; "An online e-commerce account." ; - ; + foaf: ; "Online E-commerce Account" ; - ; + foaf:OnlineAccount ; "unstable" . - - a , ; +foaf:lastName a , ; "The last name of a person." ; - ; + foaf:Person ; - ; + foaf: ; "lastName" ; @@ -279,62 +266,58 @@ "testing" . - - a , , ; +foaf:yahooChatID a , , ; "A Yahoo chat ID" ; - ; + foaf:Agent ; - ; + foaf: ; "Yahoo chat ID" ; ; - ; + foaf:nick ; "testing" . - - a , ; +foaf:membershipClass a , ; "Indicates the class of individuals that are a member of a Group" ; - ; + foaf: ; "membershipClass" ; "unstable" . - - a , , ; +foaf:homepage a , , ; "A homepage for some thing." ; ; - ; + foaf: ; "homepage" ; - ; + foaf:Document ; - , ; + foaf:page , foaf:isPrimaryTopicOf ; "stable" . a . - - a , ; +foaf:topic_interest a , ; "A thing of interest to this person." ; - ; + foaf:Agent ; - ; + foaf: ; "topic_interest" ; @@ -342,12 +325,11 @@ "testing" . - - a , ; +foaf:dnaChecksum a , ; "A checksum for the DNA of some thing. Joke." ; - ; + foaf: ; "DNA checksum" ; @@ -355,14 +337,13 @@ "archaic" . - - a , , ; +foaf:gender a , , ; "The gender of this Agent (typically but not necessarily 'male' or 'female')." ; - ; + foaf:Agent ; - ; + foaf: ; "gender" ; @@ -370,14 +351,13 @@ "testing" . - - a , , ; +foaf:mbox_sha1sum a , , ; "The sha1sum of the URI of an Internet mailbox associated with exactly one owner, the first owner of the mailbox." ; - ; + foaf:Agent ; - ; + foaf: ; "sha1sum of a personal mailbox URI name" ; @@ -385,14 +365,13 @@ "testing" . - - a , , ; +foaf:logo a , , ; "A logo representing some thing." ; ; - ; + foaf: ; "logo" ; @@ -403,31 +382,29 @@ a . - - a , ; +foaf:img a , ; "An image that can be used to represent some thing (ie. those depictions which are particularly representative of something, eg. one's photo on a homepage)." ; - ; + foaf:Person ; - ; + foaf: ; "image" ; - ; + foaf:Image ; - ; + foaf:depiction ; "testing" . - - a , ; +foaf:fundedBy a , ; "An organization funding a project or person." ; ; - ; + foaf: ; "funded by" ; @@ -435,18 +412,17 @@ "archaic" . - - a , ; +foaf:interest a , ; "A page about a topic of interest to this person." ; - ; + foaf:Agent ; - ; + foaf: ; "interest" ; - ; + foaf:Document ; "testing" . @@ -454,14 +430,13 @@ "Concept" . - - a , ; +foaf:familyName a , ; "The family name of some person." ; - ; + foaf:Person ; - ; + foaf: ; "familyName" ; @@ -469,14 +444,13 @@ "testing" . - - a , ; +foaf:status a , ; "A string expressing what the user is happy for the general public (normally) to know about their current activity." ; - ; + foaf:Agent ; - ; + foaf: ; "status" ; @@ -484,70 +458,67 @@ "unstable" . - - a , , ; +foaf:msnChatID a , , ; "An MSN chat ID" ; - ; + foaf:Agent ; - ; + foaf: ; "MSN chat ID" ; ; - ; + foaf:nick ; "testing" . - - a , ; +foaf:sha1 a , ; "A sha1sum hash, in hex." ; - ; + foaf:Document ; - ; + foaf: ; "sha1sum (hex)" ; "unstable" . - +foaf:PersonalProfileDocument a , ; "A personal profile RDF document." ; "PersonalProfileDocument" ; - ; + foaf:Document ; "testing" . - +foaf:workInfoHomepage a , ; "A work info homepage of some person; a page about their work for some organization." ; - ; + foaf:Person ; - ; + foaf: ; "work info homepage" ; - ; + foaf:Document ; "testing" . - - a , ; +foaf:currentProject a , ; "A current project this person works on." ; - ; + foaf:Person ; - ; + foaf: ; "current project" ; @@ -555,14 +526,13 @@ "testing" . - - a , , ; +foaf:mbox a , , ; "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox. This is a 'static inverse functional property', in that there is (across time and change) at most one individual that ever has any particular value for foaf:mbox." ; - ; + foaf:Agent ; - ; + foaf: ; "personal mailbox" ; @@ -573,23 +543,21 @@ a . - - a , ; +foaf:schoolHomepage a , ; "A homepage of a school attended by the person." ; - ; + foaf:Person ; - ; + foaf: ; "schoolHomepage" ; - ; + foaf:Document ; "testing" . - - a ; +foaf: a ; "The Friend of a Friend (FOAF) RDF vocabulary, described using W3C RDF Schema and the Web Ontology Language." ; @@ -601,63 +569,59 @@ "Thing" . - - a , ; +foaf:Organization a , ; "An organization." ; - ; + foaf: ; "Organization" ; - ; + foaf:Agent ; - , ; + foaf:Person , foaf:Document ; "stable" . - - a , ; +foaf:maker a , ; "An agent that made this thing." ; ; - ; + foaf: ; "maker" ; - ; + foaf:Agent ; - ; + dcterms:creator ; - ; + foaf:made ; "stable" . - - a , ; +foaf:holdsAccount a , ; "Indicates an account held by this agent." ; - ; + foaf:Agent ; - ; + foaf: ; "account" ; - ; + foaf:OnlineAccount ; "archaic" . - - a , ; +foaf:pastProject a , ; "A project this person has previously worked on." ; - ; + foaf:Person ; - ; + foaf: ; "past project" ; @@ -665,14 +629,13 @@ "testing" . - - a , , ; +foaf:jabberID a , , ; "A jabber ID for something." ; - ; + foaf:Agent ; - ; + foaf: ; "jabber ID" ; @@ -680,27 +643,26 @@ "testing" . - +foaf:OnlineChatAccount a , ; "An online chat account." ; - ; + foaf: ; "Online Chat Account" ; - ; + foaf:OnlineAccount ; "unstable" . - - a , ; +foaf:accountName a , ; "Indicates the name (identifier) associated with this online account." ; - ; + foaf:OnlineAccount ; - ; + foaf: ; "account name" ; @@ -708,14 +670,13 @@ "testing" . - - a , ; +foaf:name a , ; "A name for some thing." ; ; - ; + foaf: ; "name" ; @@ -725,12 +686,11 @@ "testing" . - - a , ; +foaf:OnlineAccount a , ; "An online account." ; - ; + foaf: ; "Online Account" ; @@ -741,20 +701,19 @@ a . - - a , ; +foaf:tipjar a , ; "A tipjar document for this agent, describing means for payment and reward." ; - ; + foaf:Agent ; - ; + foaf: ; "tipjar" ; - ; + foaf:Document ; - ; + foaf:page ; "testing" . @@ -763,31 +722,29 @@ "Spatial Thing" . - - a , , ; +foaf:primaryTopic a , , ; "The primary topic of some page or document." ; - ; + foaf:Document ; - ; + foaf: ; "primary topic" ; ; - ; + foaf:isPrimaryTopicOf ; "stable" . - - a , ; +foaf:myersBriggs a , ; "A Myers Briggs (MBTI) personality classification." ; - ; + foaf:Person ; - ; + foaf: ; "myersBriggs" ; @@ -795,14 +752,13 @@ "testing" . - - a , , ; +foaf:age a , , ; "The age in years of some agent." ; - ; + foaf:Agent ; - ; + foaf: ; "age" ; @@ -813,30 +769,29 @@ a . - - a , ; +foaf:Agent a , ; "An agent (eg. person, group, software or physical artifact)." ; "Agent" ; - ; + dcterms:Agent ; "stable" . a . - +foaf:OnlineGamingAccount a , ; "An online gaming account." ; - ; + foaf: ; "Online Gaming Account" ; - ; + foaf:OnlineAccount ; "unstable" . @@ -845,143 +800,134 @@ "Person" . - - a , ; +foaf:depiction a , ; "A depiction of some thing." ; ; - ; + foaf: ; "depiction" ; - ; + foaf:Image ; - ; + foaf:depicts ; "testing" . - +foaf:workplaceHomepage a , ; "A workplace homepage of some person; the homepage of an organization they work for." ; - ; + foaf:Person ; - ; + foaf: ; "workplace homepage" ; - ; + foaf:Document ; "testing" . - - a , , ; +foaf:weblog a , , ; "A weblog of some thing (whether person, group, company etc.)." ; - ; + foaf:Agent ; - ; + foaf: ; "weblog" ; - ; + foaf:Document ; - ; + foaf:page ; "testing" . - - a , ; +foaf:title a , ; "Title (Mr, Mrs, Ms, Dr. etc)" ; - ; + foaf: ; "title" ; "testing" . - - a , ; +foaf:thumbnail a , ; "A derived thumbnail image." ; - ; + foaf:Image ; - ; + foaf: ; "thumbnail" ; - ; + foaf:Image ; "testing" . - - a , ; +foaf:Person a , ; "A person." ; - ; + foaf: ; "Person" ; - , , ; + , , foaf:Agent ; - , ; + foaf:Project , foaf:Organization ; "stable" . - - a , ; +foaf:nick a , ; "A short informal nickname characterising an agent (includes login identifiers, IRC and other chat nicknames)." ; - ; + foaf: ; "nickname" ; "testing" . - - a , ; +foaf:made a , ; "Something that was made by this agent." ; - ; + foaf:Agent ; - ; + foaf: ; "made" ; ; - ; + foaf:maker ; "stable" . - - a , ; +foaf:LabelProperty a , ; "A foafrdfs:labelProperty is any RDF property with texual values that serve as labels." ; - ; + foaf: ; "Label Property" ; "unstable" . - - a , ; +foaf:based_near a , ; "A location that something is based near, for some broadly human notion of near." ; ; - ; + foaf: ; "based near" ; @@ -989,14 +935,13 @@ "testing" . - - a , ; +foaf:surname a , ; "The surname of some person." ; - ; + foaf:Person ; - ; + foaf: ; "Surname" ; @@ -1004,14 +949,13 @@ "archaic" . - - a , ; +foaf:plan a , ; "A .plan comment, in the tradition of finger and '.plan' files." ; - ; + foaf:Person ; - ; + foaf: ; "plan" ; @@ -1019,42 +963,39 @@ "testing" . - - a , , ; +foaf:aimChatID a , , ; "An AIM chat ID" ; - ; + foaf:Agent ; - ; + foaf: ; "AIM chat ID" ; ; - ; + foaf:nick ; "testing" . - - a , ; +foaf:Group a , ; "A class of Agents." ; "Group" ; - ; + foaf:Agent ; "stable" . - - a , ; +foaf:geekcode a , ; "A textual geekcode for this person, see http://www.geekcode.com/geek.html" ; - ; + foaf:Person ; - ; + foaf: ; "geekcode" ; @@ -1065,44 +1006,41 @@ a . - - a , ; +foaf:Document a , ; "A document." ; - ; + foaf: ; "Document" ; - , ; + foaf:Project , foaf:Organization ; "testing" . - - a , ; +foaf:topic a , ; "A topic of some page or document." ; - ; + foaf:Document ; - ; + foaf: ; "topic" ; ; - ; + foaf:page ; "testing" . - - a , ; +foaf:family_name a , ; "The family name of some person." ; - ; + foaf:Person ; - ; + foaf: ; "family_name" ; @@ -1110,29 +1048,27 @@ "archaic" . - - a , ; +foaf:member a , ; "Indicates a member of a Group" ; - ; + foaf:Group ; - ; + foaf: ; "member" ; - ; + foaf:Agent ; "stable" . - - a , ; +foaf:theme a , ; "A theme." ; ; - ; + foaf: ; "theme" ; @@ -1140,17 +1076,16 @@ "archaic" . - - a , ; +foaf:publications a , ; "A link to the publications of this person." ; - ; + foaf:Person ; - ; + foaf: ; "publications" ; - ; + foaf:Document ; "testing" . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/ldp.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/ldp.ttl similarity index 77% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/ldp.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/ldp.ttl index 56b00b7..4334615 100644 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/ldp.ttl +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/ldp.ttl @@ -1,13 +1,13 @@ +@prefix ldp: . @prefix dcterms: . - - a ; +ldp:pageSortOrder a ; "The ascending/descending/etc order used to order the members across pages in a page sequence." ; - ; + ldp:PageSortCriterion ; - ; + ldp: ; "pageSortOrder" ; @@ -15,62 +15,58 @@ "testing" . - +ldp:PageSortCriterion a ; "Element in the list of sorting criteria used by the server to assign container members to pages." ; - ; + ldp: ; "PageSortCriterion" ; "testing" . - - a ; +ldp:Container a ; "A Linked Data Platform RDF Source (LDP-RS) that also conforms to additional patterns and conventions for managing membership. Readers should refer to the specification defining this ontology for the list of behaviors associated with it." ; - ; + ldp: ; "Container" ; - ; + ldp:RDFSource ; "stable" . - - a ; +ldp:RDFSource a ; "A Linked Data Platform Resource (LDPR) whose state is represented as RDF." ; - ; + ldp: ; "RDFSource" ; - ; + ldp:Resource ; "stable" . - - a ; +ldp:PreferMembership a ; "URI identifying a LDPC's membership triples, for example to allow clients to express interest in receiving them." ; - ; + ldp: ; "PreferMembership" ; "stable" . - - a ; +ldp:pageSortCriteria a ; "Link to the list of sorting criteria used by the server in a representation. Typically used on Link response headers as an extension link relation URI in the rel= parameter." ; - ; + ldp:Page ; - ; + ldp: ; "pageSortCriteria" ; @@ -78,53 +74,52 @@ "testing" . - +ldp:PreferEmptyContainer a ; "Archaic alias for ldp:PreferMinimalContainer" ; - ; + ldp: ; "PreferEmptyContainer" ; - ; + ldp:PreferMinimalContainer ; - ; + ldp:PreferMinimalContainer ; "archaic" . - - a ; +ldp:MemberSubject a ; "Used to indicate default and typical behavior for ldp:insertedContentRelation, where the member-URI value in the membership triple added when a creation request is successful is the URI assigned to the newly created resource." ; - ; + ldp: ; "MemberSubject" ; "stable" . - +ldp:IndirectContainer a ; "An LDPC that has the flexibility of choosing what form the membership triples take." ; - ; + ldp: ; "IndirectContainer" ; - ; + ldp:Container ; "stable" . - +ldp:pageSortCollation a ; "The collation used to order the members across pages in a page sequence when comparing strings." ; - ; + ldp:PageSortCriterion ; - ; + ldp: ; "pageSortCollation" ; @@ -132,25 +127,24 @@ "testing" . - - a ; +ldp:Resource a ; "A HTTP-addressable resource whose lifecycle is managed by a LDP server." ; - ; + ldp: ; "Resource" ; "stable" . - +ldp:membershipResource a ; "Indicates the membership-constant-URI in a membership triple. Depending upon the membership triple pattern a container uses, as indicated by the presence of ldp:hasMemberRelation or ldp:isMemberOfRelation, the membership-constant-URI might occupy either the subject or object position in membership triples." ; - ; + ldp:Container ; - ; + ldp: ; "membershipResource" ; @@ -158,25 +152,23 @@ "stable" . - - a ; +ldp:Page a ; "URI signifying that the resource is an in-sequence page resource, as defined by LDP Paging. Typically used on Link rel='type' response headers." ; - ; + ldp: ; "Page" ; "testing" . - - a ; +ldp:member a ; "LDP servers should use this predicate as the membership predicate if there is no obvious predicate from an application vocabulary to use." ; - ; + ldp:Resource ; - ; + ldp: ; "member" ; @@ -184,21 +176,19 @@ "stable" . - - a ; +ldp:NonRDFSource a ; "A Linked Data Platform Resource (LDPR) whose state is NOT represented as RDF." ; - ; + ldp: ; "NonRDFSource" ; - ; + ldp:Resource ; "stable" . - - a ; +ldp: a ; "This ontology provides an informal representation of the concepts and terms as defined in the LDP specification. Consult the LDP specification for normative reference." ; @@ -208,36 +198,35 @@ dcterms:description "Vocabulary URIs defined in the Linked Data Platform (LDP) namespace." ; dcterms:title "The W3C Linked Data Platform (LDP) Vocabulary" . - - a ; +ldp:Ascending a ; "Ascending order." ; - ; + ldp: ; "Ascending" ; "testing" . - +ldp:PreferContainment a ; "URI identifying a LDPC's containment triples, for example to allow clients to express interest in receiving them." ; - ; + ldp: ; "PreferContainment" ; "stable" . - +ldp:hasMemberRelation a ; "Indicates which predicate is used in membership triples, and that the membership triple pattern is < membership-constant-URI , object-of-hasMemberRelation, member-URI >." ; - ; + ldp:Container ; - ; + ldp: ; "hasMemberRelation" ; @@ -245,27 +234,26 @@ "stable" . - - a ; +ldp:DirectContainer a ; "An LDPC that is similar to a LDP-DC but it allows an indirection with the ability to list as member a resource, such as a URI representing a real-world object, that is different from the resource that is created." ; - ; + ldp: ; "DirectContainer" ; - ; + ldp:Container ; "stable" . - +ldp:pageSortPredicate a ; "Predicate used to specify the order of the members across a page sequence's in-sequence page resources; it asserts nothing about the order of members in the representation of a single page." ; - ; + ldp:PageSortCriterion ; - ; + ldp: ; "pageSortPredicate" ; @@ -273,14 +261,14 @@ "testing" . - +ldp:insertedContentRelation a ; "Indicates which triple in a creation request should be used as the member-URI value in the membership triple added when the creation request is successful." ; - ; + ldp:Container ; - ; + ldp: ; "insertedContentRelation" ; @@ -288,14 +276,13 @@ "stable" . - - a ; +ldp:contains a ; "Links a container with resources created through the container." ; - ; + ldp:Container ; - ; + ldp: ; "contains" ; @@ -303,60 +290,57 @@ "stable" . - - a ; +ldp:BasicContainer a ; "An LDPC that uses a predefined predicate to simply link to its contained resources." ; - ; + ldp: ; "BasicContainer" ; - ; + ldp:Container ; "stable" . - - a ; +ldp:Descending a ; "Descending order." ; - ; + ldp: ; "Descending" ; "testing" . - +ldp:PreferMinimalContainer a ; "URI identifying the subset of a LDPC's triples present in an empty LDPC, for example to allow clients to express interest in receiving them. Currently this excludes containment and membership triples, but in the future other exclusions might be added. This definition is written to automatically exclude those new classes of triples." ; - ; + ldp: ; "PreferMinimalContainer" ; "stable" . - - a ; +ldp:pageSequence a ; "Link to a page sequence resource, as defined by LDP Paging. Typically used to communicate the sorting criteria used to allocate LDPC members to pages." ; - ; + ldp: ; "Page" ; "testing" . - +ldp:isMemberOfRelation a ; "Indicates which predicate is used in membership triples, and that the membership triple pattern is < member-URI , object-of-isMemberOfRelation, membership-constant-URI >." ; - ; + ldp:Container ; - ; + ldp: ; "isMemmberOfRelation" ; @@ -364,14 +348,13 @@ "stable" . - - a ; +ldp:constrainedBy a ; "Links a resource with constraints that the server requires requests like creation and update to conform to." ; - ; + ldp:Resource ; - ; + ldp: ; "constrainedBy" ; diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/ore.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/ore.ttl similarity index 69% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/ore.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/ore.ttl index db2530f..dd1007e 100644 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/ore.ttl +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/ore.ttl @@ -1,68 +1,63 @@ +@prefix ore: . @prefix dcterms: . - - a ; +ore:Aggregation a ; "A set of related resources (Aggregated Resources), grouped together such that the set can be treated as a single resource. This is the entity described within the ORE interoperability framework by a Resource Map." ; - ; + ore: ; "Aggregation" ; . - - a ; +ore:Proxy a ; "A Proxy represents an Aggregated Resource as it exists in a specific Aggregation. All assertions made about an entity are globally true, not only within the context of the Aggregation. As such, in order to make assertions which are only true of a resource as it exists in an Aggregation, a Proxy object is required. For example, one might want to cite an article as it appears in a specific journal, or assign aggregation-specific metadata to a Resource." ; - ; + ore: ; "Proxy" . - - a ; +ore:similarTo a ; "The subject of this relationship MUST be an Aggregation. This Aggregation should be considered an expression within the ORE context of the object of the relationship, as it is broadly equivalent to the resource. For example, the Aggregation may consist of the resources which, together, make up a journal article which has a DOI assigned to it. The Aggregation is not the article to which the DOI was assigned, but is a representation of it in some manner." ; - ; + ore:Aggregation ; - ; + ore: ; "Similar To" . - - a ; +ore:isAggregatedBy a ; "The inverse relationship of ore:aggregates, ore:isAggregatedBy asserts that an Aggregated Resource is aggregated by an Aggregation." ; - ; + ore:AggregatedResource ; - ; + ore: ; "Is Aggregated By" ; - ; + ore:Aggregation ; dcterms:isPartOf ; - . + ore:aggregates . - - a ; +ore:proxyFor a ; "Proxy objects are used to represent a Resource as it is aggregated in a particular Aggregation. The ore:proxyFor relationship is used to link the proxy to the Aggregated Resource it is a proxy for. The subject of the relationship is a Proxy object, and the object of the relationship is the Aggregated Resource." ; - ; + ore:Proxy ; - ; + ore: ; "Proxy For" ; - . + ore:AggregatedResource . - - +ore: "The set of terms provided by the OAI ORE initiative" ; "The OAI ORE terms vocabulary" ; @@ -73,95 +68,89 @@ "The Open Archives Initiative ORE Project" ] ; dcterms:title "The OAI ORE terms vocabulary" . - - a ; +ore:ResourceMap a ; "A description of an Aggregation according to the OAI-ORE data model. Resource Maps are serialised to a machine readable format according to the implementation guidelines." ; - ; + ore: ; "Resource Map" ; . - - a ; +ore:isDescribedBy a ; "The inverse relationship of ore:describes, in this case the object of the relationship is the Resource Map and the subject is the Aggregation which it describes." ; - ; + ore:Aggregation ; - ; + ore: ; "Is Described By" ; - ; + ore:ResourceMap ; - . + ore:describes . - - a ; +ore:proxyIn a ; "Proxy objects must link to the Aggregation in which the resource being proxied is aggregated. The ore:proxyIn relationship is used for this purpose. The subject of the relationship is a Proxy object, and the object of the relationship is the Aggregation." ; - ; + ore:Proxy ; - ; + ore: ; "Proxy In" ; - . + ore:Aggregation . - - a ; +ore:describes a ; "This relationship asserts that the subject (a Resource Map) describes the object (an Aggregation)." ; - ; + ore:ResourceMap ; - ; + ore: ; "Describes" ; - ; + ore:Aggregation ; - . + ore:isDescribedBy . - - a ; +ore:lineage a ; "ore:lineage is a relationship between two Proxy objects, both of which MUST have the same Resource for which they are proxies. The meaning is that the Resource for which the subject of the relationship is a Proxy was discovered in the Aggregation in which the object Proxy's resource is aggregated." ; - ; + ore:Proxy ; - ; + ore: ; "Lineage" ; - . + ore:Proxy . - - a ; +ore:aggregates a ; "Aggregations, by definition, aggregate resources. The ore:aggregates relationship expresses that the object resource is a member of the set of Aggregated Resources of the subject (the Aggregation). This relationship between the Aggregation and its Aggregated Resources is thus more specific than a simple part/whole relationship, as expressed by dcterms:hasPart for example." ; - ; + ore:Aggregation ; - ; + ore: ; "Aggregates" ; - ; + ore:AggregatedResource ; dcterms:hasPart ; - . + ore:isAggregatedBy . - +ore:AggregatedResource a ; "A resource which is included in an Aggregation. Note that asserting that a resource is a member of the class of Aggregated Resources does not imply anything other than that it is aggregated by at least one Aggregation." ; - ; + ore: ; "Aggregated Resource" . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/owl.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/owl.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/owl.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/owl.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl similarity index 69% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl index 8485255..9a7f74f 100644 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl @@ -1,85 +1,82 @@ +@prefix ore: . +@prefix pcdm: . +@prefix ldp: . @prefix dcterms: . - +pcdm:hasRelatedObject a ; "Links to a related Object that is not a component part, such as an object representing a donor agreement or policies that govern the resource."@en ; - ; + ore:Aggregation ; - ; + pcdm: ; "has related object"@en ; - ; + pcdm:Object ; - . + ore:aggregates . - - a ; +pcdm:AlternateOrder a ; "\n An AlternateOrder is an alternate ordering of its parent's members. It should only order the\n parent's members, and otherwise has all of the features of ordering (some members may be\n omitted from the order, members may appear more than once in the order, etc.).\n "@en ; - ; + pcdm: ; "Alternate Order"@en ; - . + pcdm:Object . - - a ; +pcdm:File a ; "\n A File is a sequence of binary data and is described by some accompanying metadata.\n The metadata typically includes at least basic technical metadata (size, content type,\n modification date, etc.), but can also include properties related to preservation,\n digitization process, provenance, etc. Files MUST be contained by exactly one Object.\n "@en ; - ; + pcdm: ; "File"@en . - - a ; +pcdm:fileOf a ; "Links from a File to its containing Object."@en ; - ; + pcdm:File ; - ; + pcdm: ; "is file of"@en ; - ; + pcdm:Object ; - ; + ore:isAggregatedBy ; - . + pcdm:hasFile . - - a ; +pcdm:Object a ; "\n An Object is an intellectual entity, sometimes called a \"work\", \"digital object\", etc.\n Objects have descriptive metadata, access metadata, may contain files and other Objects as\n member \"components\". Each level of a work is therefore represented by an Object instance,\n and is capable of standing on its own, being linked to from Collections and other Objects.\n Member Objects can be ordered using the ORE Proxy class.\n "@en ; - ; + pcdm: ; "Object"@en ; - . + ore:Aggregation . - - a ; +pcdm:hasMember a ; "Links to a subsidiary Object or Collection. Typically used to link\n to component parts, such as a book linking to a page. Note on transitivity: hasMember is\n not defined as transitive, but applications may treat it as transitive as local needs\n dictate."@en ; - ; + ore:Aggregation ; - ; + pcdm: ; "has member"@en ; - ; + ore:Aggregation ; - . + ore:aggregates . - - +pcdm: "Ontology for the Portland Common Data Model, intended to underlie a wide array of repository and DAMS applications."@en ; ; @@ -91,73 +88,69 @@ "2015/10/14" . - +pcdm:AdministrativeSet a ; "\n An Administrative Set is a grouping of resources that an administrative unit is ultimately\n responsible for managing. The set itself helps to manage the items within it. An Object\n or Collection may be contained by only one AdministrativeSet.\n "@en ; - ; + pcdm: ; "Administrative Set"@en ; - . + ldp:Container . - - a ; +pcdm:Collection a ; "\n A Collection is a group of resources. Collections have descriptive metadata, access metadata,\n and may links to works and/or collections. By default, member works and collections are an\n unordered set, but can be ordered using the ORE Proxy class.\n "@en ; - ; + pcdm: ; "Collection"@en ; - . + ore:Aggregation . - - a ; +pcdm:relatedObjectOf a ; "Links from an Object to a Object or Collection that it is related to."@en ; - ; + pcdm:Object ; - ; + pcdm: ; "is related object of"@en ; - ; + ore:Aggregation ; - ; + ore:isAggregatedBy ; - . + pcdm:hasRelatedObject . - - a ; +pcdm:memberOf a ; "Links from an Object or Collection to a containing Object or Collection."@en ; - ; + ore:Aggregation ; - ; + pcdm: ; "is member of"@en ; - ; + ore:Aggregation ; - ; + ore:isAggregatedBy ; - . + pcdm:hasMember . - - a ; +pcdm:hasFile a ; "Links to a File contained by this Object."@en ; - ; + pcdm:Object ; - ; + pcdm: ; "has file"@en ; - ; + pcdm:File ; - . + ore:aggregates . diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/rdf.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/rdf.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/rdf.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/rdf.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/rdfg.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/rdfg.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/rdfg.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/rdfg.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/rdfs.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/rdfs.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/rdfs.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/rdfs.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/xsd.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/xsd.ttl similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/META-INF/org.dataconservancy.packaging/ONT/xsd.ttl rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/ONT/xsd.ttl diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl new file mode 100644 index 0000000..8b19972 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl @@ -0,0 +1,48 @@ +@prefix ore: . +@prefix ldp: . +@prefix iana: . + +<> a ore:ResourceMap ; + ore:describes <#Aggregation> . + + + a ldp:Container ; + ldp:contains , , . + + + a ldp:Container ; + ldp:contains , . + + + iana:describes . + + + iana:describes . + +<#Aggregation> a ore:Aggregation ; + ore:aggregates , , , , , , , , , , . + + + a ldp:Container ; + ldp:contains . + + + a ldp:Container . + + + a ldp:Container ; + ldp:contains . + + + a ldp:Container ; + ldp:contains , . + + + a ldp:Container . + + + iana:describes . + + + a ldp:Container ; + ldp:contains . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/STATE/pkgState.bin b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/STATE/pkgState.bin new file mode 100644 index 0000000..a226d30 Binary files /dev/null and b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/META-INF/org.dataconservancy.packaging/STATE/pkgState.bin differ diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/bag-info.txt b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/bag-info.txt new file mode 100644 index 0000000..075dbeb --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/bag-info.txt @@ -0,0 +1,13 @@ +Bag-Count: 1 of 1 +Bag-Size: 3 MB +BagIt-Profile-Identifier: http://dataconservancy.org/formats/data-conservancy-pkg-1.0 +Bagging-Date: 2017-11-07 +Contact-Email: willard@jhu.edu +Contact-Name: Willard Sirk +Contact-Phone: +1 505-555-5555 +Domain-Profile: http://dataconservancy.org/ptg-profiles/dcs-bo-1.0 +Keyword: test +Keyword: data +Package-Name: TestPackageForCLI +Payload-Oxum: 2859647.14 +Resource-Manifest: bag://TestPackageForCLI/META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/bagit.txt b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/bagit.txt similarity index 100% rename from src/test/resources/testCreateRdfPackage/Hanh-test/bagit.txt rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/bagit.txt diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir2/IMG_2061.JPG b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir2/IMG_2061.JPG new file mode 100644 index 0000000..8231dab Binary files /dev/null and b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir2/IMG_2061.JPG differ diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD new file mode 100644 index 0000000..17f8e3e --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD @@ -0,0 +1,230 @@ +{ + "@context" : { + "dc" : "http://dataconservancy.org/ns/types/" + }, + "@graph" : [ { + "@id" : "_:t0", + "@type" : "dc:Property", + "dc:hasName" : "format", + "dc:hasValue" : "info:pronom/fmt/394" + }, { + "@id" : "_:t1", + "@type" : "dc:Property", + "dc:hasName" : "title", + "dc:hasValue" : "TestCollection" + }, { + "@id" : "_:t10", + "@type" : "dc:Property", + "dc:hasName" : "createDate", + "dc:hasValue" : "2014-08-12T17:35:01Z" + }, { + "@id" : "_:t11", + "@type" : "dc:Property", + "dc:hasName" : "description", + "dc:hasValue" : "Summary" + }, { + "@id" : "_:t12", + "@type" : "dc:Relationship", + "dc:hasTarget" : "file:/Users/hvu/Desktop/TestCollection/", + "dc:hasType" : "isMemberOf", + "dc:requiresURI" : "true" + }, { + "@id" : "_:t13", + "@type" : "dc:Property", + "dc:hasName" : "phone", + "dc:hasValue" : "tel:+1-540-444-4445" + }, { + "@id" : "_:t14", + "@type" : "dc:Property", + "dc:hasName" : "modifiedDate", + "dc:hasValue" : "2014-08-12T17:35:01Z" + }, { + "@id" : "_:t15", + "@type" : "dc:Property", + "dc:hasName" : "createDate", + "dc:hasValue" : "2014-08-12T17:35:01Z" + }, { + "@id" : "_:t16", + "@type" : "dc:Property", + "dc:hasName" : "personName", + "dc:hasValue" : "Hanh" + }, { + "@id" : "_:t17", + "@type" : "dc:Property", + "dc:hasName" : "size", + "dc:hasValue" : "6148" + }, { + "@id" : "_:t18", + "@type" : "dc:Property", + "dc:hasName" : "modifiedDate", + "dc:hasValue" : "2014-08-12T17:35:01Z" + }, { + "@id" : "_:t19", + "@type" : "dc:Artifact", + "dc:hasId" : "file:/Users/hvu/Desktop/TestCollection/Screen1.png#1562623505", + "dc:hasProperty" : [ { + "@id" : "_:t2" + }, { + "@id" : "_:t20" + }, { + "@id" : "_:t21" + } ], + "dc:hasRef" : "file:/Users/hvu/Desktop/TestCollection/Screen1.png#1562623505", + "dc:hasRelationship" : { + "@id" : "_:t12" + }, + "dc:hasType" : "DataItem", + "dc:isByteStream" : "false", + "dc:isIgnored" : "false" + }, { + "@id" : "_:t2", + "@type" : "dc:Property", + "dc:hasName" : "modifiedDate", + "dc:hasValue" : "2014-07-24T17:36:06Z" + }, { + "@id" : "_:t20", + "@type" : "dc:Property", + "dc:hasName" : "createDate", + "dc:hasValue" : "2014-07-24T17:36:06Z" + }, { + "@id" : "_:t21", + "@type" : "dc:Property", + "dc:hasName" : "name", + "dc:hasValue" : "Synthesized DI" + }, { + "@id" : "_:t22", + "@type" : "dc:Relationship", + "dc:hasTarget" : "file:/Users/hvu/Desktop/TestCollection/", + "dc:hasType" : "isMetadataFor", + "dc:requiresURI" : "true" + }, { + "@id" : "_:t23", + "@type" : "dc:Artifact", + "dc:hasId" : "file:/Users/hvu/Desktop/TestCollection/.DS_Store", + "dc:hasProperty" : [ { + "@id" : "_:t0" + }, { + "@id" : "_:t14" + }, { + "@id" : "_:t24" + }, { + "@id" : "_:t17" + }, { + "@id" : "_:t10" + } ], + "dc:hasRef" : "file:/Users/hvu/Desktop/TestCollection/.DS_Store", + "dc:hasRelationship" : { + "@id" : "_:t22" + }, + "dc:hasType" : "MetadataFile", + "dc:isByteStream" : "true", + "dc:isIgnored" : "true" + }, { + "@id" : "_:t24", + "@type" : "dc:Property", + "dc:hasName" : "fileName", + "dc:hasValue" : ".DS_Store" + }, { + "@id" : "_:t25", + "@type" : "dc:Property", + "dc:hasName" : "creator", + "dc:hasProperty" : [ { + "@id" : "_:t16" + }, { + "@id" : "_:t13" + } ] + }, { + "@id" : "_:t26", + "@type" : "dc:PackageDescription", + "dc:hasArtifact" : [ { + "@id" : "_:t19" + }, { + "@id" : "_:t27" + }, { + "@id" : "_:t23" + }, { + "@id" : "_:t3" + } ], + "dc:hasProperty" : { + "@id" : "_:t28" + }, + "dc:hasSpecificaitonId" : "http://dataconservancy.org/spec/dcs-pkg-desc" + }, { + "@id" : "_:t27", + "@type" : "dc:Artifact", + "dc:hasId" : "file:/Users/hvu/Desktop/TestCollection/", + "dc:hasProperty" : [ { + "@id" : "_:t18" + }, { + "@id" : "_:t1" + }, { + "@id" : "_:t15" + }, { + "@id" : "_:t11" + }, { + "@id" : "_:t25" + } ], + "dc:hasRef" : "file:/Users/hvu/Desktop/TestCollection/", + "dc:hasType" : "Collection", + "dc:isByteStream" : "false", + "dc:isIgnored" : "false" + }, { + "@id" : "_:t28", + "@type" : "dc:Property", + "dc:hasName" : "root", + "dc:hasValue" : "file:/Users/hvu/Desktop/TestCollection/" + }, { + "@id" : "_:t3", + "@type" : "dc:Artifact", + "dc:hasId" : "file:/Users/hvu/Desktop/TestCollection/Screen1.png", + "dc:hasProperty" : [ { + "@id" : "_:t4" + }, { + "@id" : "_:t5" + }, { + "@id" : "_:t6" + }, { + "@id" : "_:t8" + }, { + "@id" : "_:t9" + } ], + "dc:hasRef" : "file:/Users/hvu/Desktop/TestCollection/Screen1.png", + "dc:hasRelationship" : { + "@id" : "_:t7" + }, + "dc:hasType" : "DataFile", + "dc:isByteStream" : "true", + "dc:isIgnored" : "false" + }, { + "@id" : "_:t4", + "@type" : "dc:Property", + "dc:hasName" : "createDate", + "dc:hasValue" : "2014-07-24T17:36:06Z" + }, { + "@id" : "_:t5", + "@type" : "dc:Property", + "dc:hasName" : "fileName", + "dc:hasValue" : "Screen1.png" + }, { + "@id" : "_:t6", + "@type" : "dc:Property", + "dc:hasName" : "format", + "dc:hasValue" : [ "info:pronom/fmt/13", "image/png" ] + }, { + "@id" : "_:t7", + "@type" : "dc:Relationship", + "dc:hasTarget" : "file:/Users/hvu/Desktop/TestCollection/Screen1.png#1562623505", + "dc:hasType" : "isMemberOf", + "dc:requiresURI" : "true" + }, { + "@id" : "_:t8", + "@type" : "dc:Property", + "dc:hasName" : "modifiedDate", + "dc:hasValue" : "2014-07-24T17:36:06Z" + }, { + "@id" : "_:t9", + "@type" : "dc:Property", + "dc:hasName" : "size", + "dc:hasValue" : "1877418" + } ] +} \ No newline at end of file diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators new file mode 100644 index 0000000..1c75b16 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/bin/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators @@ -0,0 +1,192 @@ +{ + "@context" : { + "dc" : "http://dataconservancy.org/ns/types/" + }, + "@graph" : [ { + "@id" : "_:t0", + "@type" : "dc:Property", + "dc:hasName" : "createDate", + "dc:hasValue" : "2014-07-24T17:36:06Z" + }, { + "@id" : "_:t1", + "@type" : "dc:PackageDescription", + "dc:hasArtifact" : [ { + "@id" : "_:t2" + }, { + "@id" : "_:t3" + } ], + "dc:hasProperty" : { + "@id" : "_:t4" + }, + "dc:hasSpecificaitonId" : "http://dataconservancy.org/spec/dcs-pkg-desc" + }, { + "@id" : "_:t10", + "@type" : "dc:Property", + "dc:hasName" : "personName", + "dc:hasValue" : "Willard Sirk" + }, { + "@id" : "_:t11", + "@type" : "dc:Property", + "dc:hasName" : "page", + "dc:hasValue" : "http://www.DachshundsRuns.paw" + }, { + "@id" : "_:t12", + "@type" : "dc:Property", + "dc:hasName" : "phone", + "dc:hasValue" : "tel:+1-540-456-1233" + }, { + "@id" : "_:t13", + "@type" : "dc:Relationship", + "dc:hasTarget" : "http://localhost:8080/project/1", + "dc:hasType" : "http://purl.org/dc/terms/isPartOf", + "dc:requiresURI" : "true" + }, { + "@id" : "_:t14", + "@type" : "dc:Property", + "dc:hasName" : "size", + "dc:hasValue" : "1877418" + }, { + "@id" : "_:t15", + "@type" : "dc:Property", + "dc:hasName" : "description", + "dc:hasValue" : "summary " + }, { + "@id" : "_:t16", + "@type" : "dc:Property", + "dc:hasName" : "title", + "dc:hasValue" : "TestCollection" + }, { + "@id" : "_:t17", + "@type" : "dc:Property", + "dc:hasName" : "creator", + "dc:hasProperty" : [ { + "@id" : "_:t6" + }, { + "@id" : "_:t22" + }, { + "@id" : "_:t23" + }, { + "@id" : "_:t24" + } ] + }, { + "@id" : "_:t18", + "@type" : "dc:Property", + "dc:hasName" : "createDate", + "dc:hasValue" : "2014-08-12T17:35:01Z" + }, { + "@id" : "_:t19", + "@type" : "dc:Property", + "dc:hasName" : "format", + "dc:hasValue" : [ "info:pronom/fmt/13", "image/png" ] + }, { + "@id" : "_:t2", + "@type" : "dc:Artifact", + "dc:hasId" : "file:/Users/hvu/Desktop/TestCollection/Screen1.png", + "dc:hasProperty" : [ { + "@id" : "_:t19" + }, { + "@id" : "_:t20" + }, { + "@id" : "_:t14" + }, { + "@id" : "_:t8" + }, { + "@id" : "_:t0" + } ], + "dc:hasRef" : "file:/Users/hvu/Desktop/TestCollection/Screen1.png", + "dc:hasRelationship" : { + "@id" : "_:t21" + }, + "dc:hasType" : "MetadataFile", + "dc:isByteStream" : "true", + "dc:isIgnored" : "false" + }, { + "@id" : "_:t20", + "@type" : "dc:Property", + "dc:hasName" : "fileName", + "dc:hasValue" : "Screen1.png" + }, { + "@id" : "_:t21", + "@type" : "dc:Relationship", + "dc:hasTarget" : "file:/Users/hvu/Desktop/TestCollection/", + "dc:hasType" : "isMetadataFor", + "dc:requiresURI" : "true" + }, { + "@id" : "_:t22", + "@type" : "dc:Property", + "dc:hasName" : "email", + "dc:hasValue" : "mailto:alfee@email.com" + }, { + "@id" : "_:t23", + "@type" : "dc:Property", + "dc:hasName" : "page", + "dc:hasValue" : "http://www.DachshundsRuns.paw" + }, { + "@id" : "_:t24", + "@type" : "dc:Property", + "dc:hasName" : "phone", + "dc:hasValue" : "tel:+1-540-888-5555" + }, { + "@id" : "_:t3", + "@type" : "dc:Artifact", + "dc:hasId" : "file:/Users/hvu/Desktop/TestCollection/", + "dc:hasProperty" : [ { + "@id" : "_:t15" + }, { + "@id" : "_:t16" + }, { + "@id" : "_:t5" + }, { + "@id" : "_:t9" + }, { + "@id" : "_:t17" + }, { + "@id" : "_:t18" + } ], + "dc:hasRef" : "file:/Users/hvu/Desktop/TestCollection/", + "dc:hasRelationship" : { + "@id" : "_:t13" + }, + "dc:hasType" : "Collection", + "dc:isByteStream" : "false", + "dc:isIgnored" : "false" + }, { + "@id" : "_:t4", + "@type" : "dc:Property", + "dc:hasName" : "root", + "dc:hasValue" : "file:/Users/hvu/Desktop/TestCollection/" + }, { + "@id" : "_:t5", + "@type" : "dc:Property", + "dc:hasName" : "modifiedDate", + "dc:hasValue" : "2014-08-12T17:35:01Z" + }, { + "@id" : "_:t6", + "@type" : "dc:Property", + "dc:hasName" : "personName", + "dc:hasValue" : "Alfee Sirk" + }, { + "@id" : "_:t7", + "@type" : "dc:Property", + "dc:hasName" : "email", + "dc:hasValue" : "mailto:willard@email.com" + }, { + "@id" : "_:t8", + "@type" : "dc:Property", + "dc:hasName" : "modifiedDate", + "dc:hasValue" : "2014-07-24T17:36:06Z" + }, { + "@id" : "_:t9", + "@type" : "dc:Property", + "dc:hasName" : "creator", + "dc:hasProperty" : [ { + "@id" : "_:t10" + }, { + "@id" : "_:t7" + }, { + "@id" : "_:t11" + }, { + "@id" : "_:t12" + } ] + } ] +} \ No newline at end of file diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4.ttl new file mode 100644 index 0000000..51f13c5 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4.ttl @@ -0,0 +1,6 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasMember , ; + bom:hasTitle "Collection4" . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory.ttl new file mode 100644 index 0000000..ba4c94b --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory.ttl @@ -0,0 +1,7 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasMember , , ; + bom:hasTitle "Directory" ; + bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir.ttl new file mode 100644 index 0000000..a88118e --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir.ttl @@ -0,0 +1,6 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:48Z"^^ ; + bom:hasTitle "SubDir" ; + bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2.ttl new file mode 100644 index 0000000..6fc06b9 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2.ttl @@ -0,0 +1,8 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasMember ; + bom:hasMetadata ; + bom:hasTitle "SubDir2" ; + bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/IMG_2061.JPG.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/IMG_2061.JPG.ttl new file mode 100644 index 0000000..c3cf3a6 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/IMG_2061.JPG.ttl @@ -0,0 +1,10 @@ +@prefix bom: . + + + a bom:Metadata ; + bom:hasCreateDate "2016-02-28T04:02:48Z"^^ ; + bom:hasFormat "info:pronom/fmt/41" , "image/jpeg" ; + bom:hasModifiedDate "2016-02-28T04:02:48Z"^^ ; + bom:hasSize "2843551"^^ ; + bom:hasTitle "IMG_2061.JPG" ; + bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/SubDir5.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/SubDir5.ttl new file mode 100644 index 0000000..08cb825 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/SubDir5.ttl @@ -0,0 +1,7 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasMetadata ; + bom:hasTitle "SubDir5" ; + bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD.ttl new file mode 100644 index 0000000..fc099dc --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD.ttl @@ -0,0 +1,10 @@ +@prefix bom: . + + + a bom:Metadata ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasFormat "application/octet-stream" ; + bom:hasModifiedDate "2016-02-28T04:02:49Z"^^ ; + bom:hasSize "5760"^^ ; + bom:hasTitle "testSimpleSynthesizedPD" ; + bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3.ttl new file mode 100644 index 0000000..2d2b491 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3.ttl @@ -0,0 +1,7 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasMember ; + bom:hasTitle "SubDir3" ; + bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3/SubDir4.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3/SubDir4.ttl new file mode 100644 index 0000000..ad56562 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3/SubDir4.ttl @@ -0,0 +1,7 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasMetadata ; + bom:hasTitle "SubDir4" ; + bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators.ttl new file mode 100644 index 0000000..79c2546 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators.ttl @@ -0,0 +1,10 @@ +@prefix bom: . + + + a bom:Metadata ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasFormat "application/octet-stream" ; + bom:hasModifiedDate "2016-02-28T04:02:49Z"^^ ; + bom:hasSize "4649"^^ ; + bom:hasTitle "TestPDTwoCreators" ; + bom:metadataFor . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory2.ttl b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory2.ttl new file mode 100644 index 0000000..122c0a2 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/data/obj/Collection4/Directory2.ttl @@ -0,0 +1,6 @@ +@prefix bom: . + +<> a bom:Collection ; + bom:hasCreateDate "2016-02-28T04:02:49Z"^^ ; + bom:hasTitle "Directory2" ; + bom:isMemberOf . diff --git a/src/test/resources/testCreateRdfPackage/TestPackageForCLI/manifest-md5.txt b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/manifest-md5.txt new file mode 100644 index 0000000..a3e1e44 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/manifest-md5.txt @@ -0,0 +1,14 @@ +1669f812dc3999324c0c7cf92dd52eda data/obj/Collection4/Directory/SubDir2/SubDir5.ttl +6ab3c67b798485ba5cd7cda87d526850 data/obj/Collection4/Directory/SubDir2.ttl +fdc2aa671d445a0bfbc8858a606c23c5 data/obj/Collection4/Directory/SubDir2/IMG_2061.JPG.ttl +0ccf68fd7241f71f010d2fe5d0c65f53 data/bin/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD +24c4b04fa258eca9fa9605bde327d66a data/obj/Collection4/Directory/SubDir.ttl +8b8ec8fc7069229c6d4fbb672e73c0e2 data/obj/Collection4/Directory/SubDir3/SubDir4.ttl +f7532dbb0dc45821cb30c84d6a278794 data/obj/Collection4/Directory/SubDir2/SubDir5/testSimpleSynthesizedPD.ttl +7c9eac72aaabd5219dbf34d45907216b data/bin/Collection4/Directory/SubDir2/IMG_2061.JPG +21271a75cf224ff2622b786c2d6a6648 data/obj/Collection4/Directory/SubDir3.ttl +ef0b66f41f6574dcff469ec8e59c3034 data/obj/Collection4/Directory.ttl +f08d37133ee6c4e892ff8a706ffbd165 data/obj/Collection4.ttl +00053c45ba6c066d7002cf0810139925 data/obj/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators.ttl +e94741fb101acfc5f99b36b887bd78d7 data/bin/Collection4/Directory/SubDir3/SubDir4/TestPDTwoCreators +9e0005d7c102cce4f6a5075ccfd5f5fb data/obj/Collection4/Directory2.ttl diff --git a/src/test/resources/testCreateRdfPackage/Hanh-test/tagmanifest-md5.txt b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/tagmanifest-md5.txt similarity index 60% rename from src/test/resources/testCreateRdfPackage/Hanh-test/tagmanifest-md5.txt rename to src/test/resources/testCreateRdfPackage/TestPackageForCLI/tagmanifest-md5.txt index 47e35bb..1542df1 100644 --- a/src/test/resources/testCreateRdfPackage/Hanh-test/tagmanifest-md5.txt +++ b/src/test/resources/testCreateRdfPackage/TestPackageForCLI/tagmanifest-md5.txt @@ -1,19 +1,19 @@ -70df1e3353687f0ade1705f7122ff21e META-INF/org.dataconservancy.packaging/STATE/pkgState.bin +553fb29b0cfea896a702883f259aa8d5 META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl 85c46e7f44517838bd4826380c02af10 META-INF/org.dataconservancy.packaging/ONT/dcmitype.ttl +1e87ee544929fdaffc5f37c008af15d2 META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl bb40361eb39b3211f93b6aa910a90873 META-INF/org.dataconservancy.packaging/ONT/xsd.ttl -e2f98c62c132a86aea72e65f26f30b83 META-INF/org.dataconservancy.packaging/ONT/foaf.ttl -907ba1469f5cdee76b6220133e9e4ae4 META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl -8ab473350bc8c857a7871db6f75fda90 bagit.txt -8f11800d1c8fee56f28258c1923f1fef bag-info.txt -3e02d30bdc673e1ac3e1da7a56ac8d19 META-INF/org.dataconservancy.packaging/ONT/rdfg.ttl -314b71b4a32ffa7cb9398ddeedf3aa0d META-INF/org.dataconservancy.packaging/ONT/ore.ttl -e0700812b703c0246d39d6827b3f0ebd META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl +f0db16f05b02cc7c7f643ea07e93f549 META-INF/org.dataconservancy.packaging/PKG-INFO/ORE-REM/ORE-REM.ttl +bf9e1e40a03c072ea22833eed18428a4 META-INF/org.dataconservancy.packaging/ONT/ore.ttl 08bc21e6ffe3dec6a0b097acdee5b55c META-INF/org.dataconservancy.packaging/ONT/rdfs.ttl 13aaea8ad0bb9c4227167f6effdd4187 META-INF/org.dataconservancy.packaging/ONT/dcam.ttl -f817a60fb0094627e3b3606eae13b88d META-INF/org.dataconservancy.packaging/ONT/owl.ttl -24660b947540870826446a3716c57b7e META-INF/org.dataconservancy.packaging/ONT/pcdm.ttl -84053b7ff036f13e574d6cbd21c59384 META-INF/org.dataconservancy.packaging/ONT/dcelements.ttl -7020ff4523cb2921caabdd997b4e1864 META-INF/org.dataconservancy.packaging/ONT/ldp.ttl -6de4e9ae81539108c9150f655e092e8d META-INF/org.dataconservancy.packaging/ONT/dcs-bo.ttl +a48bdf3ae203d41b8bca9b8b87e40563 manifest-md5.txt +8ab473350bc8c857a7871db6f75fda90 bagit.txt +2c43f4bd2052239e65a30c0b23cce053 META-INF/org.dataconservancy.packaging/ONT/ldp.ttl +6a47f68d7e5f4e4cf6042e7d7f80b326 META-INF/org.dataconservancy.packaging/ONT/foaf.ttl 8822bc1a8f087a08e98490d03b3682f5 META-INF/org.dataconservancy.packaging/ONT/rdf.ttl -2534c80db0471936ad646136b4234e7e manifest-md5.txt +84053b7ff036f13e574d6cbd21c59384 META-INF/org.dataconservancy.packaging/ONT/dcelements.ttl +1104e8af614a6feb64c3c832dd6979a7 META-INF/org.dataconservancy.packaging/STATE/pkgState.bin +f817a60fb0094627e3b3606eae13b88d META-INF/org.dataconservancy.packaging/ONT/owl.ttl +dd95f04f59b42df84d727d70247af02c bag-info.txt +3e02d30bdc673e1ac3e1da7a56ac8d19 META-INF/org.dataconservancy.packaging/ONT/rdfg.ttl +ef73992afcc0a8a5f01cdbeebdfbf371 META-INF/org.dataconservancy.packaging/ONT/dcterms.ttl diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/about_narwhals.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/about_narwhals.html new file mode 100644 index 0000000..2447949 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/about_narwhals.html @@ -0,0 +1,244 @@ + + + + + + + + + + + + + About Narwhals | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

About Narwhals

+ + +
+
+ +
+ + +
+

Narwhals are whales that live exclusively in Arctic and sub-Arctic waters. They feed primarily on halibut, cod, shrimp and squid. During the summer, they prefer feeding near coastlines, but during winter, they migrate away from shore, living beneath the ice-covered surface of the Arctic Ocean and surviving through sea ice leads and breathing holes in the ice.

+ +

The long spiral tusk that narwhals are known for is actually a single tooth that protrudes from their upper left jaw. Although narwhals are classified as toothed whales, they have no teeth in their mouth other than the tusk. Rare instances of double-tusked narwhals have been discovered, but males typically sport a single tusk; females rarely grow tusks. Adult male narwhals are up to 5 meters long (16 feet), not including their tusks, which can grow up to 3 meters (10 feet) long.

+ +

Narwhal top and side viewsThis illustration shows top and side views of a male narwhal. The long tusk is in fact a tooth that protrudes from the upper left side of the male narwhal’s jaw.

+ +

Unraveling the Tusk

+ +

The purpose of the narwhal’s tusk has stumped scientists for centuries. Scientists have long thought that the tusk was used for fighting, or as visual display of male dominance to attract females. Some researchers have also theorized that narwhals might use their tusk to break through sea ice or fend off other predators, such as polar bears and orca whales.

+ +

The tusk is not just an extension of tooth-like material. It is filled with sensitive pulp for nearly the entire length. Martin Nweeia’s investigations, in combination with Inuit observations and traditional knowledge, have revealed that the tusk may be a sensory organ. Narwhals may use their tusks to detect temperature, water pressure, particle gradients, and motion. In addition, the tusk is flexible, capable of flexing about 30 centimeters (1 foot) in all directions.

+ +

TusksLike teeth, narwhal tusks contain living pulp. This pulp forms a sensory organ through which the whale can sense a variety of environmental conditions.

+ +

Because of the sensitivity to salinity concentrations in sea water, the male narwhal tusk may have the ability to read and navigate ice formation in Arctic waters. The whale’s migration and behavior patterns may thus be potential indicators of arctic climate and environmental change.

+
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/canada.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/canada.html new file mode 100644 index 0000000..282f68f --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/canada.html @@ -0,0 +1,254 @@ + + + + + + + + + + + + + Narwhal Research Communities in Canada | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Narwhal Research Communities in Canada

+ + +
+
+ +
+ + +
+

The region surrounding Baffin Bay is composed of many Inuit communities. Hunters and elders in these communities have a long history of traditional knowledge regarding Arctic wildlife. Because many residents rely in part on narwhals for food, and hunters have developed extensive knowledge about narwhal behavior.

+

Communities in the Canadian Territory of Nunavut

+

Arctic Bay (Ipiarjuk)

+

Arctic Bay photoArctic Bay, Nunavut, Canada.

+

Population: 690

+

Geography: This high arctic community is surrounded by high hills creating a land-locked bay which gives rise to its Inuktitut name, Ipiarjuk, meaning “pocket” or “bag.” Much of the community is located near a gravel beach. Sea ice formation typically begins in October and thaw occurs in mid-July. Precipitation in this area is 0.7 meters (2.3 feet) of snow with an annual rainfall of 5 centimeters (2 inches).

+

Hunting: Traditional hunting of caribou, seals, and narwhal are all prevalent, though caribou sightings have become less frequent. Fishing is also common. Residents report frequent sightings of polar bears.

+

Broughton Island (Qikiqtarjuaq)

+

Population: 473

+

Geography: Qikiqtarjuaq is named for the community and the island in the Qikiqtaaluk Region of Nunavut. This northern access for Auyuittuq National Park is part of the Baffin Mountains which form part of the Arctic Cordillera mountain range.

+

Hunting: Traditional hunting and fishing are prevalent. There is diverse marine mammal wildlife including narwhal, killer whales, beluga, white whales, walruses, harp seals, and ringed seals.

+

Pangnirtung

+

Population: 1,325

+

Geography: This coastal plain community is part of the Pangnirtung Fjord, which eventually merges with Cumberland Sound.

+

Hunting: Subsistence hunting of seals, fish, caribou, whales and walruses is common. Cumberland Sound has a long history of commercial whaling.

+

Pond Inlet (Mittimatalik)

+

Population: 1,315

+

Geography: Mittimatalik is a high Arctic community on the northeastern tip of Baffin Island facing the mountains of Bylot Island. Because of its location on the north side of surrounding mountains, Pond Inlet has also been called Tununiq, meaning “the place that faces away from the sun.” For approximately three months in the summer, the sun never sets and in the winter there are three months when the sun never rises.

+

Hunting: A diverse assortment of wildlife inhabits the areas around Pond Inlet. Terrestrial animals include arctic terns, snowy owls, murres, snow geese, ptarmigan, jaegers, falcons, weasels, caribou, arctic foxes, hares, and wolves. Marine mammals include polar bear, narwhal, ringed seals, and walruses. Fish, such as Arctic cod and char are also prevalent.

+

Traditional knowledge about the Narwhal: Hunter David Angnatisiak notes that the size and length of a tusk is related to the skin patterns of narwhal of the same age. For example, the dark-skinned whales have very thick or wide tusks, while the tusks of more white colored whales are thinner in size. When asked about male narwhals using their tusks in any aggressive manor, David states that he has never seen narwhals fight using their tusks. However, he did hear one story of a boat being punctured from the bottom from a narwhal tusk. When asked about how tusk size relates to body size, elder Paniloo Sangoya said “They don’t relate to the size of the whale. They could be small and have a large tusk or visa versa.”

+

Repulse Bay

+

Population: 748

+

Geography: Repulse Bay is located on the Arctic Circle and on the south shore of Rae Isthmus.

+

Hunting: Traditional hunting and fishing is prevalent and includes narwhals, walrus, seals, caribou, and polar bears. There are over one hundred different species of birds, including peregrine falcons and gyrfalcons.

+

Traditional knowledge about the narwhal: Hunter Mark Tagoranak states, “One day, I saw one narwhal making loud noises at other narwhals who were in a lead inside the flow edge. A few minutes later, those narwhals left that lead and went to more open water. At this time, the ice was cracking and moving in such a way that the ice lead closed. I could see that this whale making the loud noises was telling the other whales to leave before the ice lead closed, saving their lives.”

+
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/greenland.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/greenland.html new file mode 100644 index 0000000..0b32381 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/greenland.html @@ -0,0 +1,257 @@ + + + + + + + + + + + + + Narwhal Research Communities in Greenland | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Narwhal Research Communities in Greenland

+ + +
+
+ +
+ + +
+

The region surrounding Baffin Bay is composed of many Inuit communities. Hunters and elders in these communities have a long history of traditional knowledge regarding Arctic wildlife. Because many residents rely in part on narwhals for food, and hunters have developed extensive knowledge about narwhal behavior.

+

Disko Island (Qeqertarsuaq)

+

Disko IslandDisko Island, Greenland.

+

Population: 925

+

Geography: Disko Island is located in the Davis Strait off the western coast of Greenland. Its Inuktitut name, Qeqertarsuaq, means “the large island” as it has an area of 8,578 square kilometers (3,312 square miles).

+

Hunting: Most of the meat and fish consumed by the inhabitants are from the local surroundings. Only 14 percent of the community are occupational hunters, and 35 percent are casual hunters. A wide spectrum of terrestrial and marine life is on or near the island. Residents also have a long history hunting whales, including fin, minke, and narwhal.

+

Traditional knowledge of the narwhal: Hunter Richard Broberg said, “The narwhal skin is very sensitive. You can’t even use an ice mattock (tooq: a tool to get a feeling how the ice is), and you can’t make a noise when there are narwhals. Even if the narwhals are far away, they will fly when an ignorant person uses an ice mattock. When we were hunting narwhals from ice close to land, early in the morning, and with an elder among us, we catch narwhals several times. When the ice is wet and humid, they are easily alerted under the ice. The hunters must take steps in the same time. The first one takes step and with him the others, not in different times. When they are not under the ice, we move faster, because they are not alert like when they are under ice. But when they dive, their hearing is much better, a noise, or if a dog sledge start on ice on the beach, they will warn each other and then they will swim away in big hurry, so you see only fog after them.”

+

Hunde Ejland

+

Population: 109

+

Geography: This small and relatively flat group of islands is located in the southern portion of Disko Bay.

+

Hunting: The waters surrounding this small group of islands are rich with a wide assortment of sea birds and whales.

+

Qaanaaq

+

QaanaaqQaanaaq, Greenland.

+

Population: 645

+

Geography: Qaanaaq is the northernmost town in the Avanaa district of north Greenland. It is located on the Mares Strait, which separates Ellesmere Island in Canada from north Greenland.

+

Hunting: Most of the residents hunt a wide array of marine mammals and terrestrial wildlife. Hunting trips that last several weeks are common, and traditional methods allow hunters to utilize most of what is hunted.

+

Traditional knowledge of the narwhal: Hunter Kissuk said “Though many scientists describe the migration of narwhal to specific locations around Qaanaaq, we Inuit understand that the whales are nomadic like us; they go where the food is.”

+

Saqqaq

+

SaqqaqSaqqaq, Greenland.

+

Population: 200

+

Geography: Saqqaq is located northwest of Ilulissat on the southwestern shore of Nuussauq Peninsula.

+

Hunting: Residents hunt terrestrial animals such as hares, ducks, geese, and caribou. Residents also fish and hunt marine mammals such as beluga whales and seals.

+

Uummannaq

+

UummannaqUummannaq, Greenland.

+

Population: 1,296

+

Geography: Located 590 kilometers (367 miles) north of the Arctic Circle, the municipality of Qaasuitsup is located on Uummannaq Island in the Fjord separating mainland Greenland from Nuussuaq Peninsula.

+

Hunting: Hunters and fishermen set off on their dog sleds, hack holes in the ice, and drop long lines holding 200 to 400 hooks. The fish are pulled up manually some hours later. Modern times have brought some changes: hunters now use motorized vehicles, such as cars and snowmobiles. They also hunt for seals and whales.

+

Traditional knowledge about the narwhal: At the International Polar Year Conference in 2006, hunter Pavia Nielsen said, “When the whale arrives at our position, it is already getting dark for the winter. So, practically, we only have two hours of light to hunt. That way the nature already sets limits for our hunting. Therefore we can not hunt every single day. The force of nature which always given us a hard time in form of stronger and stronger wind, is getting even harder, because of global warming. When the wind is so strong, it means less hunting.”

+
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/index.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/index.html new file mode 100644 index 0000000..2a85972 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/index.html @@ -0,0 +1,247 @@ + + + + + + + + + + + + + Baffin Bay Region Narwhal Research | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Baffin Bay Region Narwhal Research

+ + +
+
+ +
+ + +
+

Photo collageThe Narwhal Tusk Research project integrates traditional knowledge and interdisciplinary science to study the narwhal's unique tusk. Photo credits: Glenn Williams and Joseph Meehan

+ +

High Arctic communities in Nunavut, Canada, and in Northwestern Greenland have long been familiar with narwhals. For centuries, the narwhal has been part of the Inuit diet, providing food and nourishment. Although the Arctic is home to many unique animals, it is the narwhal's long, protruding tusk that has inspired legends and stumped scientists for centuries.

+ +
+ +

Interview videos: Part 1 - Part 2

+ +

Inuit hunters and elders discuss narwhal behavior, accompanied by traditional drumming and singing.

+
+ +

Scientists have partnered with various Arctic communities to understand the purpose of the narwhal’s tusk. By combining scientific research with Inuit Qaujimajatuqangit, or Inuit knowledge, researchers hope to learn why narwhals have tusks and how they use them. It was long thought that narwhal tusks determined rank or dominance, or were perhaps used in fighting, but this collaborative approach reveals that there is much more to the narwhal tusk than scientists ever imagined.

+ +

The Narwhal Tusk Research Project is one of the collaborative data sharing projects facilitated by ELOKA, and is representative of the types of communities and projects ELOKA expects to serve. They include international projects, projects with diverse data and data needs, and data with varying accessibility. These projects are similar in that they all involve working with Arctic communities and residents in order to collect local observations and knowledge (LTK or community-based monitoring). The projects differ in the regions and cultures they represent, the data with which they are working, and their interests, needs, and goals for their data.

+ +

Baffin Bay Region Narwhal Community Data will be available soon.

+ +

Several narwhals surface through an ice lead to breathe. Photo credit: Glenn Williams

+
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews.html new file mode 100644 index 0000000..fe10db4 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews.html @@ -0,0 +1,319 @@ + + + + + + + + + + + + + Narwhal Tusk Research Interviews | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Narwhal Tusk Research Interviews

+ + +
+
+ +
+ + +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. Each interviewee contributed knowledge that helped Nweeia and his fellow researchers understand the purpose of the narwhal's tusk. Interviews are conducted in several dialects of both Inuktitut and Greenlandic, but are conducted with the aid of an English translator. More interviews will be added when translations are completed.

+ +

Interviews with written English translations

+ +

Stay tuned for interview videos and transcripts.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HunterCommunityDate AddedKeywords
Cornelius Nutarak
Cornelius Nutarak
Pond Inlet,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, beluga whales, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, niksiulangata avataaniinginnaqtuq, qaulluvisat, arnanngaliit, hunting
Elisapee Ootova
Elisapee Ootova
Pond Inlet,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, uses of tusk, tusk length, tusk size, double tusks, tiggak, arnarluk, ugiuqu, hunting
Ikey Kigutikakjuk
Ikey Kigutikakjuk
Artic Bay,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting
Jayko Peterloosie
Jayko Peterloosie
Pond Inlet,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, beluga whales, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, niksiulangata avataaniinginnaqtuq, qaulluvisat, arnanngaliit, hunting
Jaypeetee Qarpik
Jaypeetee Qarpik
Pangnirtung,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting
Joanasie M
Joanasie M
Pangnirtung,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting
Lisha Levi
Lisha Levi
Artic Bay,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting
Mucktar Akumalik
Mucktar Akumalik
Artic Bay,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting
Peteroosie Qappik
Peteroosie Qappik
Pangnirtung,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting
Ragelee Arnaquq
Ragelee Arnaquq
Broughton Island,
+ Canada
4 June 2010Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting
Seetee Nattiapik
Seetee Nattiapik
Broughton Island,
+ Canada
4 June 2010 +

Narwhal behavior, narwhal migration, tusk differences, differences between male and female narwhals, qirnajuktat, uses of tusk, tusk length, tusk size, double tusks, hunting

+

Untranslated interviews

+ +

Stay tuned for interview videos.

+ + + + + + + + + + + + + + + + + +
HunterCommunityDate AddedKeywords
Disko Island,
+ Greenland
4 June 2010Narwhal tusks, narwhal behavior
Qaanaaq,
+ Greenland
4 June 2010Narwhal tusks, narwhal behavior
Uummannaq,
+ Greenland
4 June 2010Narwhal tusks, narwhal behavior
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/akumalik.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/akumalik.html new file mode 100644 index 0000000..55b496b --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/akumalik.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Mucktar Akumalik Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Mucktar Akumalik Interview

+ + +
+
+ +
+ + +
+

+

+ + +
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Mucktar Akumalik of Artic Bay, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/arnaquq.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/arnaquq.html new file mode 100644 index 0000000..a7c9c9e --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/arnaquq.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Ragelee Arnaquq Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Ragelee Arnaquq Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Ragelee Arnaquq of Broughton Island, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/joanasie.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/joanasie.html new file mode 100644 index 0000000..5253b53 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/joanasie.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Joanasie M Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Joanasie M Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Joanasie M of Pangnirtung, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/kigutikakjuk.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/kigutikakjuk.html new file mode 100644 index 0000000..8162c22 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/kigutikakjuk.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Ikey Kigutikakjuk Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Ikey Kigutikakjuk Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Ikey Kigutikakjuk of Arctic Bay, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/levi.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/levi.html new file mode 100644 index 0000000..23b9250 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/levi.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Lisha Levi Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Lisha Levi Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Lisha Levi of Artic Bay, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/nattiapik.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/nattiapik.html new file mode 100644 index 0000000..2f2a5a2 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/nattiapik.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Seetee Nattiapik Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Seetee Nattiapik Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Seetee Nattiapik of Broughton Island, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/nutarak.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/nutarak.html new file mode 100644 index 0000000..3710a7c --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/nutarak.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Cornelius Nutarak Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Cornelius Nutarak Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Cornelius Nutarak of Pond Inlet, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/ootova.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/ootova.html new file mode 100644 index 0000000..14afd49 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/ootova.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Elisapee Ootova Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Elisapee Ootova Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Elisapee Ootova of Pond Inlet, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/peterloosie.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/peterloosie.html new file mode 100644 index 0000000..0a5b472 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/peterloosie.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Jayko Peterloosie Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Jayko Peterloosie Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Jayko Peterloosie of Pond Inlet, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/qappik.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/qappik.html new file mode 100644 index 0000000..06191ff --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/qappik.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Peteroosie Qappik Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Peteroosie Qappik Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Peteroosie Qappik of Pangnirtung, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/qarpik.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/qarpik.html new file mode 100644 index 0000000..e4aa93d --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/interviews/qarpik.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + Jaypeetee Qarpik Interview | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Jaypeetee Qarpik Interview

+ + +
+
+ +
+ + +
+

+

+ +
 
+
+ +
+

Harvard researcher Martin Nweeia interviewed 55 elders and hunters from Inuit communities in Canada and Greenland. This video shows a narwhal tusk research interview with Inuit elder Jaypeetee Qarpik of Pangnirtung, Canada.

+
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/narwhal_tusk_research.html b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/narwhal_tusk_research.html new file mode 100644 index 0000000..0e6f556 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/communities/narwhal/narwhal_tusk_research.html @@ -0,0 +1,300 @@ + + + + + + + + + + + + + Narwhal Tusk Research | eloka-arctic.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ + + + + + +

Narwhal Tusk Research

+ + +
+
+ +
+ + +
+

Dr. Martin Nweeia, from the Harvard School of Dental Medicine, initiated the Narwhal Tusk Research project in 2000. It is a broad based, interdisciplinary, and cross cultural investigation to solve one of nature’s most perplexing mysteries. Today, more than 60 scientists have joined the effort to explore the secrets of the narwhal’s mysterious tusk. This project integrates Inuit Qaujimajatuqangit, or traditional knowledge, with interdisciplinary studies of science to enable a more comprehensive understanding of the narwhal and the sensory capabilities of its extraordinary tusk.

+ +

In addition to conducting laboratory and field studies directly investigating the physical and dental properties of the narwhal tusk, Nweeia conducted 7 field expeditions and collected 55 interviews from Inuit community members. Together, they investigate a fascinating marine mammal that is important to the Inuit who revere its place in their shared environment.

+ +

Why do tusks break?

+ +

Traditional knowledge: Inuit observations describe narwhals that are threatened or frantic and immediately dive in shallow waters, hitting the bottom and breaking their tusks against the ocean floor. This same behavior occurs when killer whales threaten an area as they hunt narwhals. Elders describe “tusking” behavior as a delicate rubbing movement and they seldom observed aggressive contact or behavior.

+
+ +

Science: Estimates of broken tusks in the scientific literature range from 6 percent (Gerson and Hickie, 1985) to 30 percent (Silverman and Dunbar, 1980). Many studies report aggressive male tusk use when vying for a mate (“tusking behavior”) or in defense against predators (Buckland, 1882; Gray, 1889; Freuchen, 1935; Breummer, 1966; Ford 1986).

+
+ +

Does the tusk bend?

+ +

Traditional knowledge: Inuit observations of living narwhals document tusk flexibility of extraordinary magnitude. Hunters describe one of the traditional uses of the tusk is to help pry a sledge from the ice.

+
+ +

Science: References in the literature describe very little about flexibility of the narwhal tusk. Collaborators at the National Institute of Standards and Technology have recently documented structural characteristics of the narwhal tusk that indicate a remarkably flexible and strong structure. Initial reconstruction data describes a six-foot tusk having an overall bending flexibility, from its base to the tip, of one foot in all directions. Results of these findings were submitted to the International Journal of Dental Research for publication in 2005.

+
+ +

How did the narwhal get its name?

+ +

Traditional knowledge: In Inuktitut, the narwhal is described as qilalugaq qernertaq, which translates to the “one that is good at curving itself toward the sky.” Narwhal can curve their back dramatically when diving downward and likewise can curve their head upward when lying on their back with their tusk pointed straight toward the sky.

+
+ +

Science: According to most references, the word narwhal in western culture is derived from the old norse word, naar, meaning cadaver or corpse, thus the translation to corpse-like whale. A lesser known interpretation comes from the old norse, nafarr, referring to the corkscrew which describes the spiraled tusk. Kings and emperors used a powder ground from the tusk on their food and in their wine as an antidote to poisons. Danish lore, however, indicated that the body would assume a corpse-like state if the meat was ingested.

+
+ +

What determines the shape of the tusks?

+ +

Traditional knowledge: The Inuit are detailed in their descriptions of the various expressions of tusk shape and form in relation to adult classification. For example, the tusks of females are described as thinner, shorter, and more evenly and tightly spiraled. Morphology of the tusk in different narwhal populations has also been noted and may characterize populations from different geographical regions.

+
+ +

Science: Scientific investigators have only briefly described narwhal tusk morphology, commenting about different expressions, but with no correlations to anatomic variation among adult narwhal.

+
+ +

Are there variations among narwhal?

+ +

Traditional knowledge: Within Canadian Inuit culture, there are several words to describe adult narwhal. These terms are also used by Greenlandic Eskimo.

+ +
  • Adult narwhal: tiggar
  • +
  • Female with tusk: arningali
  • +
  • Female and male without tusk: tuugaittuq
  • +
  • Male with white color: qakuyuktuq
  • +
  • Male with black color: qinnijuktuq
  • +
  • Male with long tusk and black: tuujrinnirsait
  • +
  • Male with shorter and wider tusk: tuugaitun
  • +
  • Double tusked the same size tusks: iglugiit
  • +
  • The left tusk is longer than the right tusk: nikingaj ut
  • +
+ +

Science: The Encyclopedia of Marine Mammals (Academic Press, 2002) describes the adult narwhal as “completely mottled on the dorsum [back] but with increasing white fields on the ventral [front] side. Old adult males only maintain a narrow dark-spotted pattern on the top of the back, whereas the rest of the body is white.” Additional descriptions of the anatomic variation are similar.

+
+ +

References

+ +

Breummer, F. 1966. Narwhal. Fabled unicorn of Canada's Arctic seas. Star Weekly, 12 March, pages 8-11.

+ +

Buckland, F. 1882. Notes and Jottings from Animal Life. London: Smith, Elder.

+ +

Ford, D. 1986. Narwhal: Unicorn of the Arctic Seas. National Geographic, March 1986, pages 354-63.

+ +

Freuchen, P. 1935. Mammals. Part II. Field notes and biological observations. Report of the Fifth Thule Expedition, 1921-1924 2(4-5): 68-278.

+ +

Gerson, H. B., and J. P. Hickie. 1985. Head scarring on male narwhals (Monodon monoceros): Evidence for aggressive tusk use. Canadian Journal of Zoology 63: 2,083-2,087.

+ +

Gray, R. 1889. Notes on a voyage to the Greenland Sea in 1888. Zoologist 13: 1-9, 41-51, 95-104.

+ +

Perrin, W. F., B. Wursig, and J. G. M. Thewissen (eds). 2002. Encyclopedia of Marine Mammals. Academic Press.

+ +

Silverman, H. B., and M. J. Dunbar. 1980. Aggressive tusk use by the Narwhal (Monodon monoceros L.). Nature 284: 57.

+
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/robots.txt b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/robots.txt new file mode 100644 index 0000000..ff9e286 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/robots.txt @@ -0,0 +1,57 @@ +# +# robots.txt +# +# This file is to prevent the crawling and indexing of certain parts +# of your site by web crawlers and spiders run by sites like Yahoo! +# and Google. By telling these "robots" where not to go on your site, +# you save bandwidth and server resources. +# +# This file will be ignored unless it is at the root of your host: +# Used: http://example.com/robots.txt +# Ignored: http://example.com/site/robots.txt +# +# For more information about the robots.txt standard, see: +# http://www.robotstxt.org/robotstxt.html + +User-agent: * +Crawl-delay: 10 +# Directories +Disallow: /includes/ +Disallow: /misc/ +Disallow: /modules/ +Disallow: /profiles/ +Disallow: /scripts/ +Disallow: /themes/ +# Files +Disallow: /CHANGELOG.txt +Disallow: /cron.php +Disallow: /INSTALL.mysql.txt +Disallow: /INSTALL.pgsql.txt +Disallow: /INSTALL.sqlite.txt +Disallow: /install.php +Disallow: /INSTALL.txt +Disallow: /LICENSE.txt +Disallow: /MAINTAINERS.txt +Disallow: /update.php +Disallow: /UPGRADE.txt +Disallow: /xmlrpc.php +# Paths (clean URLs) +Disallow: /admin/ +Disallow: /comment/reply/ +Disallow: /filter/tips/ +Disallow: /node/add/ +Disallow: /search/ +Disallow: /user/register/ +Disallow: /user/password/ +Disallow: /user/login/ +Disallow: /user/logout/ +# Paths (no clean URLs) +Disallow: /?q=admin/ +Disallow: /?q=comment/reply/ +Disallow: /?q=filter/tips/ +Disallow: /?q=node/add/ +Disallow: /?q=search/ +Disallow: /?q=user/password/ +Disallow: /?q=user/register/ +Disallow: /?q=user/login/ +Disallow: /?q=user/logout/ diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/modules/caption_filter/js/caption-filter.js@ofm559 b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/modules/caption_filter/js/caption-filter.js@ofm559 new file mode 100644 index 0000000..5e1bc8b --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/modules/caption_filter/js/caption-filter.js@ofm559 @@ -0,0 +1,52 @@ +/** + * @file + * JavaScript integrations between the Caption Filter module and particular + * WYSIWYG editors. This file also implements Insert module hooks to respond + * to the insertion of content into a WYSIWYG or textarea. + */ +(function ($) { + +$(document).bind('insertIntoActiveEditor', function(event, options) { + if (options['fields']['title'] && Drupal.settings.captionFilter.widgets[options['widgetType']]) { + options['content'] = '[caption]' + options['content'] + options['fields']['title'] + '[/caption]'; + } +}); + +Drupal.captionFilter = Drupal.captionFilter || {}; + +Drupal.captionFilter.toHTML = function(co, editor) { + return co.replace(/(?:

)?\[caption([^\]]*)\]([\s\S]+?)\[\/caption\](?:<\/p>)?[\s\u00a0]*/g, function(a,b,c){ + var id, cls, w, tempClass; + + b = b.replace(/\\'|\\'|\\'/g, ''').replace(/\\"|\\"/g, '"'); + c = c.replace(/\\'|\\'/g, ''').replace(/\\"/g, '"'); + id = b.match(/id=['"]([^'"]+)/i); + cls = b.match(/align=['"]([^'"]+)/i); + w = c.match(/width=['"]([0-9]+)/); + + id = ( id && id[1] ) ? id[1] : ''; + cls = ( cls && cls[1] ) ? 'caption-' + cls[1] : ''; + w = ( w && w[1] ) ? w[1] : ''; + + if (editor == 'tinymce') + tempClass = (cls == 'caption-center') ? 'mceTemp mceIEcenter' : 'mceTemp'; + else if (editor == 'ckeditor') + tempClass = (cls == 'caption-center') ? 'mceTemp mceIEcenter' : 'mceTemp'; + else + tempClass = ''; + + return '

' + c + '
'; + }); +}; + +Drupal.captionFilter.toTag = function(co) { + return co.replace(/(
)\s*]+>(.+?)<\/div>\s*<\/div>\s*/gi, function(match, captionWrapper, contents) { + var align; + align = captionWrapper.match(/class=.*?caption-(left|center|right)/i); + align = (align && align[1]) ? align[1] : ''; + + return '[caption' + (align ? (' align="' + align + '"') : '') + ']' + contents + '[/caption]'; + }); +}; + +})(jQuery); diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/modules/qtip/js/qtip.js@ofm559 b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/modules/qtip/js/qtip.js@ofm559 new file mode 100644 index 0000000..4a10c8b --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/modules/qtip/js/qtip.js@ofm559 @@ -0,0 +1,52 @@ +(function ($) { + Drupal.behaviors.qtip = { + attach: function (context, settings) { + $(function () { + var instances = $.parseJSON(settings.instances); + var debug = $.parseJSON(settings.qtipDebug); + + $('.qtip-link', context).each(function() { // Call .each() so we can access $(this) in the settings/config + // Check for a sibling .qtip-tooltip containing the tooltip information, otherwise (for forms) + // go to the element's parent and look for .qtip-tooltip container as a sibling of the parent + if ($(this, context).next('.qtip-tooltip').length) { + var tooltipElement = $(this).next('.qtip-tooltip'); + } + else { + var tooltipElement = $(this).parent().siblings('.qtip-tooltip'); + } + var tooltip = tooltipElement; + + if (!debug.leaveElement) { + // Remove the tooltip element to keep the DOM clean + tooltipElement.remove(); + } + + var text = tooltip.html(); + var title = (tooltip.data('qtip-title') != undefined) ? tooltip.data('qtip-title') + '' : ''; // Concatenate an empty string to make sure that the value being passed as the title is a string, otherwise it will not display + var instance = (tooltip.data('qtip-instance') != undefined) ? tooltip.data('qtip-instance') : ''; + var settings = (instances[instance] != undefined) ? instances[instance] : ''; + + if (settings) { + $(this).qtip(settings); + $(this).qtip('option', 'content.text', text); + if (title) { + $(this).qtip('option', 'content.title', title); + } + } + // If no settings have been passed through, we still want to display a tooltip + else { + $(this).qtip({ + content: { + text: text, + title: title, + } + }); + } + + // Add instance class to the container to aid in styling + $(this).addClass('qtip-instance-' + instance); + }); + }); + } + }; +})(jQuery); diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/background_rotate.js@ofm559 b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/background_rotate.js@ofm559 new file mode 100644 index 0000000..eddfc53 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/background_rotate.js@ofm559 @@ -0,0 +1,9 @@ +jQuery(document).ready(function($) { +var randomImages = ['background_dogsled','background_meltponds_0','background_lakes_0','background_volcanic_0','background_copper','background_liverpool','background_braided_0','background_aurora_0','background_reindeer_0','background_cookinlet_0','background_hudson','background_takuinlet_0']; +var rndNum = Math.floor(Math.random() * randomImages.length); +$("html").css({ +'background' : "#cddfe5 url(/sites/eloka-arctic.org/files/" + randomImages[rndNum] + ".jpg) top center fixed no-repeat", +'background-size' : "cover" +}); + +}); \ No newline at end of file diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/eloka-main-nav.js@ofm559 b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/eloka-main-nav.js@ofm559 new file mode 100644 index 0000000..c7176e8 --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/eloka-main-nav.js@ofm559 @@ -0,0 +1,45 @@ +/** +* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+ +* +* +* @param f onMouseOver function || An object with configuration options +* @param g onMouseOut function || Nothing (use configuration options object) +* @author Brian Cherne brian(at)cherne(dot)net +*/ +(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:75,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY)) li:first > a:first'); + else { + var path = pathname.split('/')[1]; + if (path) + highlight = $('#navigation ul.menu li a[href$="' + path + '"]'); + } + + + highlight.parent('li').addClass('active-nav'); + + + $('#navigation ul.menu li.expanded').hoverIntent(function() { + $(this).stop().animate({ backgroundColor: "#0095cc"}, 600); + $(this).addClass('open'); + $('ul', this) + .stop(true, true) + .slideDown(1200, 'easeOutBack'); + }, function() { + $(this).stop().animate({ backgroundColor: "#918682"}, 600); + $(this).removeClass("open") + $('ul', this) + .stop(true, true) + .slideUp(100); + }); + + +}); \ No newline at end of file diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/subtitle.js@ofm559 b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/subtitle.js@ofm559 new file mode 100644 index 0000000..4a8c66d --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/subtitle.js@ofm559 @@ -0,0 +1,37 @@ +jQuery(document).ready(function($) { + + var player_id = "eloka-video"; + var options = { "controls": true, "autoplay": false, "preload": "auto" } + var video_player = videojs(player_id, options); + var textTrack = video_player.textTracks()[0]; + + videojs(player_id).on('play', function(e) { + + // Switch location of captions based on existence of 'subtitle_display' div. + // 'showing' for captions inside video, 'hidden' for captions outside video. + // TODO: Find a way to override behavior of subtitles button so + // that it hides/shows captions when displayed outside video. + if ($('#subtitle_display').length) { + textTrack.hide(); + $('#subtitle_display').hide(); + videojs(player_id).getChild('controlBar').subtitlesButton.hide(); + } else { + textTrack.show(); + $('#subtitle_display').hide(); + videojs(player_id).getChild('controlBar').subtitlesButton.show(); + } + + var cue = textTrack.activeCues()[0]; + + if (cue) { + $('#subtitle_display').show(); + $('#subtitle_display').text(cue.text); + } + + textTrack.on('cuechange', function () { + $('#subtitle_display').show(); + var cue = this.activeCues()[0]; + $('#subtitle_display').text(cue.text); + }); + }, true); +}); diff --git a/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/video.js@ofm559 b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/video.js@ofm559 new file mode 100644 index 0000000..9c0ec1c --- /dev/null +++ b/src/test/resources/testCreateRdfPackage/narwhal/eloka-arctic.org/sites/all/themes/eloka/js/video.js@ofm559 @@ -0,0 +1,155 @@ +/*! Video.js v4.7.3 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */ +(function() {var b=void 0,f=!0,k=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function r(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Ca[a])return t.Ca[a];a=t.w(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)} +var videojs=window.videojs=t;t.Vb="4.7";t.Uc="https:"==document.location.protocol?"https://":"http://";t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.Va&&navigator.Va[0]||navigator.ve||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."}; +"GENERATED_CDN_VSN"!==t.Vb&&(videojs.options.flash.swf=t.Uc+"vjs.zencdn.net/"+t.Vb+"/video-js.swf");t.fd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.ha.Wa(t.options.languages[a],c):c;return t.options.languages};t.Ca={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.ra=t.CoreObject=m(); +t.ra.extend=function(a){var c,d;a=a||{};c=a.init||a.i||this.prototype.init||this.prototype.i||m();d=function(){c.apply(this,arguments)};d.prototype=t.h.create(this.prototype);d.prototype.constructor=d;d.extend=t.ra.extend;d.create=t.ra.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.ra.create=function(){var a=t.h.create(this.prototype);this.apply(a,arguments);return a}; +t.d=function(a,c,d){if(t.h.isArray(c))return u(t.d,a,c,d);var e=t.getData(a);e.D||(e.D={});e.D[c]||(e.D[c]=[]);d.z||(d.z=t.z++);e.D[c].push(d);e.Y||(e.disabled=l,e.Y=function(c){if(!e.disabled){c=t.qc(c);var d=e.D[c.type];if(d)for(var d=d.slice(0),j=0,n=d.length;jt.Ub;t.Xc=/Firefox/i.test(t.M);t.ne=/Chrome/i.test(t.M);t.ec=!!("ontouchstart"in window||window.Vc&&document instanceof window.Vc);t.Ic=function(a,c){t.h.Z(c,function(c,e){e===k||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})}; +t.Aa=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.jd=function(){document.body.focus();document.onselectstart=r(l)};t.ie=function(){document.onselectstart=r(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)}; +t.Ab=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}}; +t.get=function(a,c,d,e){var g,h,j,n;d=d||m();"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});h=new XMLHttpRequest;j=t.Vd(a);n=window.location;j.protocol+j.host!==n.protocol+n.host&&window.XDomainRequest&&!("withCredentials"in +h)?(h=new window.XDomainRequest,h.onload=function(){c(h.responseText)},h.onerror=d,h.onprogress=m(),h.ontimeout=d):(g="file:"==j.protocol||"file:"==n.protocol,h.onreadystatechange=function(){4===h.readyState&&(200===h.status||g&&0===h.status?c(h.responseText):d(h.responseText))});try{h.open("GET",a,f),e&&(h.withCredentials=f)}catch(q){d(q);return}try{h.send()}catch(w){d(w)}}; +t.Zd=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.sc=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'x'}).firstChild.href);return a}; +t.Vd=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;he&&(a.preventDefault(),this.m("tap")))})} +t.t=t.a.extend({i:function(a,c){t.a.call(this,a,c);G(this);this.d("tap",this.r);this.d("click",this.r);this.d("focus",this.Za);this.d("blur",this.Ya)}});s=t.t.prototype; +s.e=function(a,c){var d;c=t.h.A({className:this.T(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.v=t.e("div",{className:"vjs-control-content"}),this.yb=t.e("span",{className:"vjs-control-text",innerHTML:this.s(this.ua)||"Need Text"}),this.v.appendChild(this.yb),d.appendChild(this.v));return d};s.T=function(){return"vjs-control "+t.a.prototype.T.call(this)};s.r=m();s.Za=function(){t.d(document,"keyup",t.bind(this,this.ea))}; +s.ea=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.r()};s.Ya=function(){t.p(document,"keyup",t.bind(this,this.ea))}; +t.Q=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.hd=this.la(this.l.barName);this.handle=this.la(this.l.handleName);this.d("mousedown",this.$a);this.d("touchstart",this.$a);this.d("focus",this.Za);this.d("blur",this.Ya);this.d("click",this.r);this.c.d("controlsvisible",t.bind(this,this.update));a.d(this.Cc,t.bind(this,this.update));this.S={};this.S.move=t.bind(this,this.ab);this.S.end=t.bind(this,this.Mb)}});s=t.Q.prototype; +s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.h.A({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};s.$a=function(a){a.preventDefault();t.jd();this.n("vjs-sliding");t.d(document,"mousemove",this.S.move);t.d(document,"mouseup",this.S.end);t.d(document,"touchmove",this.S.move);t.d(document,"touchend",this.S.end);this.ab(a)};s.ab=m(); +s.Mb=function(){t.ie();this.q("vjs-sliding");t.p(document,"mousemove",this.S.move,l);t.p(document,"mouseup",this.S.end,l);t.p(document,"touchmove",this.S.move,l);t.p(document,"touchend",this.S.end,l);this.update()};s.update=function(){if(this.b){var a,c=this.Gb(),d=this.handle,e=this.hd;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.w().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.w().style.left=t.round(100*c,2)+"%"}e&&(e.w().style.width=t.round(100*a,2)+"%")}}; +function H(a,c){var d,e,g,h;d=a.b;e=t.xd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.w().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.w().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.Za=function(){t.d(document,"keyup",t.bind(this,this.ea))}; +s.ea=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.Lc();else if(38==a.which||39==a.which)a.preventDefault(),this.Mc()};s.Ya=function(){t.p(document,"keyup",t.bind(this,this.ea))};s.r=function(a){a.stopImmediatePropagation();a.preventDefault()};t.$=t.a.extend();t.$.prototype.defaultValue=0; +t.$.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.h.A({innerHTML:''+this.defaultValue+""},c);return t.a.prototype.e.call(this,"div",c)};t.ia=t.a.extend();function ca(a,c){a.R(c);c.d("click",t.bind(a,function(){E(this)}))} +t.ia.prototype.e=function(){var a=this.options().lc||"ul";this.v=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.v,className:"vjs-menu"});a.appendChild(this.v);t.d(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.I=t.t.extend({i:function(a,c){t.t.call(this,a,c);this.selected(c.selected)}});t.I.prototype.e=function(a,c){return t.t.prototype.e.call(this,"li",t.h.A({className:"vjs-menu-item",innerHTML:this.l.label},c))}; +t.I.prototype.r=function(){this.selected(f)};t.I.prototype.selected=function(a){a?(this.n("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.q("vjs-selected"),this.b.setAttribute("aria-selected",l))};t.L=t.t.extend({i:function(a,c){t.t.call(this,a,c);this.Ba=this.xa();this.R(this.Ba);this.O&&0===this.O.length&&this.W();this.d("keyup",this.ea);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});s=t.L.prototype;s.ta=l; +s.xa=function(){var a=new t.ia(this.c);this.options().title&&a.ka().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.options().title),fe:-1}));if(this.O=this.createItems())for(var c=0;ca&&(a=Infinity),this.duration(a),Infinity===a?this.n("vjs-live"):this.q("vjs-live"))};s.Md=function(){this.isFullscreen()?this.n("vjs-fullscreen"):this.q("vjs-fullscreen")};function S(a,c,d){if(a.k&&!a.k.ma)a.k.J(function(){this[c](d)});else try{a.k[c](d)}catch(e){throw t.log(e),e;}} +function R(a,c){if(a.k&&a.k.ma)try{return a.k[c]()}catch(d){throw a.k[c]===b?t.log("Video.js: "+c+" method not defined for "+a.fb+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.fb+" playback technology element.",d),a.k.ma=l):t.log(d),d;}}s.play=function(){S(this,"play");return this};s.pause=function(){S(this,"pause");return this};s.paused=function(){return R(this,"paused")===l?l:f}; +s.currentTime=function(a){return a!==b?(S(this,"setCurrentTime",a),this):this.G.currentTime=R(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.G.duration=parseFloat(a),this;this.G.duration===b&&this.Ac();return this.G.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=R(this,"buffered");if(!a||!a.length)a=t.Ab(0,0);return a}; +s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;ha&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.G.volume=a,S(this,"setVolume",a),t.Zd(a),this;a=parseFloat(R(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(S(this,"setMuted",a),this):R(this,"muted")||l};s.Ea=function(){return R(this,"supportsFullScreen")||l};s.wc=l; +s.isFullscreen=function(a){return a!==b?(this.wc=!!a,this):this.wc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)}; +s.requestFullscreen=function(){var a=t.Pa.Fb;this.isFullscreen(f);a?(t.d(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.p(document,a.fullscreenchange,arguments.callee);this.m("fullscreenchange")})),this.b[a.requestFullscreen]()):this.k.Ea()?S(this,"enterFullScreen"):(this.pc(),this.m("fullscreenchange"));return this}; +s.exitFullscreen=function(){var a=t.Pa.Fb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.k.Ea()?S(this,"exitFullScreen"):(this.Db(),this.m("fullscreenchange"));return this};s.pc=function(){this.Cd=f;this.td=document.documentElement.style.overflow;t.d(document,"keydown",t.bind(this,this.rc));document.documentElement.style.overflow="hidden";t.n(document.body,"vjs-full-window");this.m("enterFullWindow")}; +s.rc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Db())};s.Db=function(){this.Cd=l;t.p(document,"keydown",this.rc);document.documentElement.style.overflow=this.td;t.q(document.body,"vjs-full-window");this.m("exitFullWindow")}; +s.selectSource=function(a){for(var c=0,d=this.l.techOrder;c'+this.s("Stream Type")+""+this.s("LIVE"),"aria-live":"off"});a.appendChild(this.v);return a};t.ac=t.t.extend({i:function(a,c){t.t.call(this,a,c);a.d("play",t.bind(this,this.Ob));a.d("pause",t.bind(this,this.Nb))}});s=t.ac.prototype;s.ua="Play"; +s.T=function(){return"vjs-play-control "+t.t.prototype.T.call(this)};s.r=function(){this.c.paused()?this.c.play():this.c.pause()};s.Ob=function(){t.q(this.b,"vjs-paused");t.n(this.b,"vjs-playing");this.b.children[0].children[0].innerHTML=this.s("Pause")};s.Nb=function(){t.q(this.b,"vjs-playing");t.n(this.b,"vjs-paused");this.b.children[0].children[0].innerHTML=this.s("Play")};t.ib=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("timeupdate",t.bind(this,this.ga))}}); +t.ib.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00',"aria-live":"off"});a.appendChild(this.v);return a};t.ib.prototype.ga=function(){var a=this.c.cb?this.c.G.currentTime:this.c.currentTime();this.v.innerHTML=''+this.s("Current Time")+" "+t.za(a,this.c.duration())}; +t.jb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("timeupdate",t.bind(this,this.ga))}});t.jb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-duration-display",innerHTML:''+this.s("Duration Time")+" 0:00","aria-live":"off"});a.appendChild(this.v);return a}; +t.jb.prototype.ga=function(){var a=this.c.duration();a&&(this.v.innerHTML=''+this.s("Duration Time")+" "+t.za(a))};t.gc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.gc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"
/
"})};t.qb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("timeupdate",t.bind(this,this.ga))}}); +t.qb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-remaining-time-display",innerHTML:''+this.s("Remaining Time")+" -0:00","aria-live":"off"});a.appendChild(this.v);return a};t.qb.prototype.ga=function(){this.c.duration()&&(this.v.innerHTML=''+this.s("Remaining Time")+" -"+t.za(this.c.remainingTime()))}; +t.Ka=t.t.extend({i:function(a,c){t.t.call(this,a,c)}});t.Ka.prototype.ua="Fullscreen";t.Ka.prototype.T=function(){return"vjs-fullscreen-control "+t.t.prototype.T.call(this)};t.Ka.prototype.r=function(){this.c.isFullscreen()?(this.c.exitFullscreen(),this.yb.innerHTML=this.s("Fullscreen")):(this.c.requestFullscreen(),this.yb.innerHTML=this.s("Non-Fullscreen"))};t.pb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.pb.prototype.l={children:{seekBar:{}}}; +t.pb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.cc=t.Q.extend({i:function(a,c){t.Q.call(this,a,c);a.d("timeupdate",t.bind(this,this.pa));a.J(t.bind(this,this.pa))}});s=t.cc.prototype;s.l={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Cc="timeupdate";s.e=function(){return t.Q.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})}; +s.pa=function(){var a=this.c.cb?this.c.G.currentTime:this.c.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.Gb(),2));this.b.setAttribute("aria-valuetext",t.za(a,this.c.duration()))};s.Gb=function(){return this.c.currentTime()/this.c.duration()};s.$a=function(a){t.Q.prototype.$a.call(this,a);this.c.cb=f;this.ke=!this.c.paused();this.c.pause()};s.ab=function(a){a=H(this,a)*this.c.duration();a==this.c.duration()&&(a-=0.1);this.c.currentTime(a)}; +s.Mb=function(a){t.Q.prototype.Mb.call(this,a);this.c.cb=l;this.ke&&this.c.play()};s.Mc=function(){this.c.currentTime(this.c.currentTime()+5)};s.Lc=function(){this.c.currentTime(this.c.currentTime()-5)};t.mb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("progress",t.bind(this,this.update))}});t.mb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.s("Loaded")+": 0%"})}; +t.mb.prototype.update=function(){var a,c,d,e,g=this.c.buffered();a=this.c.duration();var h,j=this.c;h=j.buffered();j=j.duration();h=h.end(h.length-1);h>j&&(h=j);j=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;ag.length;a--)this.b.removeChild(j[a-1])};t.$b=t.a.extend({i:function(a,c){t.a.call(this,a,c)}}); +t.$b.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:''+this.s("Progress")+": 0%"})};t.Ma=t.$.extend({i:function(a,c){t.$.call(this,a,c);a.d("timeupdate",t.bind(this,this.ga))}});t.Ma.prototype.defaultValue="00:00";t.Ma.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})}; +t.Ma.prototype.ga=function(){var a=this.c.cb?this.c.G.currentTime:this.c.currentTime();this.b.innerHTML=''+t.za(a,this.c.duration())+""};t.sb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.k&&(a.k.o&&a.k.o.volumeControl===l)&&this.n("vjs-hidden");a.d("loadstart",t.bind(this,function(){a.k.o&&a.k.o.volumeControl===l?this.n("vjs-hidden"):this.q("vjs-hidden")}))}});t.sb.prototype.l={children:{volumeBar:{}}}; +t.sb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.rb=t.Q.extend({i:function(a,c){t.Q.call(this,a,c);a.d("volumechange",t.bind(this,this.pa));a.J(t.bind(this,this.pa))}});s=t.rb.prototype;s.pa=function(){this.b.setAttribute("aria-valuenow",t.round(100*this.c.volume(),2));this.b.setAttribute("aria-valuetext",t.round(100*this.c.volume(),2)+"%")};s.l={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"}; +s.Cc="volumechange";s.e=function(){return t.Q.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.ab=function(a){this.c.muted()&&this.c.muted(l);this.c.volume(H(this,a))};s.Gb=function(){return this.c.muted()?0:this.c.volume()};s.Mc=function(){this.c.volume(this.c.volume()+0.1)};s.Lc=function(){this.c.volume(this.c.volume()-0.1)};t.hc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}}); +t.hc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};t.tb=t.$.extend();t.tb.prototype.defaultValue="00:00";t.tb.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-volume-handle"})}; +t.ja=t.t.extend({i:function(a,c){t.t.call(this,a,c);a.d("volumechange",t.bind(this,this.update));a.k&&(a.k.o&&a.k.o.volumeControl===l)&&this.n("vjs-hidden");a.d("loadstart",t.bind(this,function(){a.k.o&&a.k.o.volumeControl===l?this.n("vjs-hidden"):this.q("vjs-hidden")}))}});t.ja.prototype.e=function(){return t.t.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'
'+this.s("Mute")+"
"})}; +t.ja.prototype.r=function(){this.c.muted(this.c.muted()?l:f)};t.ja.prototype.update=function(){var a=this.c.volume(),c=3;0===a||this.c.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.c.muted()?this.b.children[0].children[0].innerHTML!=this.s("Unmute")&&(this.b.children[0].children[0].innerHTML=this.s("Unmute")):this.b.children[0].children[0].innerHTML!=this.s("Mute")&&(this.b.children[0].children[0].innerHTML=this.s("Mute"));for(a=0;4>a;a++)t.q(this.b,"vjs-vol-"+a);t.n(this.b,"vjs-vol-"+c)}; +t.sa=t.L.extend({i:function(a,c){t.L.call(this,a,c);a.d("volumechange",t.bind(this,this.update));a.k&&(a.k.o&&a.k.o.Sc===l)&&this.n("vjs-hidden");a.d("loadstart",t.bind(this,function(){a.k.o&&a.k.o.Sc===l?this.n("vjs-hidden"):this.q("vjs-hidden")}));this.n("vjs-menu-button")}});t.sa.prototype.xa=function(){var a=new t.ia(this.c,{lc:"div"}),c=new t.rb(this.c,t.h.A({vertical:f},this.l.we));a.R(c);return a};t.sa.prototype.r=function(){t.ja.prototype.r.call(this);t.L.prototype.r.call(this)}; +t.sa.prototype.e=function(){return t.t.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'
'+this.s("Mute")+"
"})};t.sa.prototype.update=t.ja.prototype.update;t.bc=t.L.extend({i:function(a,c){t.L.call(this,a,c);this.Rc();this.Qc();a.d("loadstart",t.bind(this,this.Rc));a.d("ratechange",t.bind(this,this.Qc))}});s=t.bc.prototype; +s.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-playback-rate vjs-menu-button vjs-control",innerHTML:'
'+this.s("Playback Rate")+"
"});this.yc=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.yc);return a};s.xa=function(){var a=new t.ia(this.j()),c=this.j().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.R(new t.ob(this.j(),{rate:c[d]+"x"}));return a}; +s.pa=function(){this.w().setAttribute("aria-valuenow",this.j().playbackRate())};s.r=function(){for(var a=this.j().playbackRate(),c=this.j().options().playbackRates,d=c[0],e=0;ea){d=c[e];break}this.j().playbackRate(d)};function U(a){return a.j().k&&a.j().k.o.playbackRate&&a.j().options().playbackRates&&0