return importArtifact(artifact, recognizer, helper, mimetype, true, upload);
}
private ArtifactObject importArtifact(URL artifact, ArtifactRecognizer recognizer, ArtifactHelper helper, String mimetype, boolean overwrite, boolean upload) throws IOException {
ArtifactResource resource = convertToArtifactResource(artifact);
Map<String, String> attributes = recognizer.extractMetaData(resource);
Map<String, String> tags = new HashMap<String, String>();
helper.checkAttributes(attributes);
attributes.put(ArtifactObject.KEY_ARTIFACT_DESCRIPTION, "");
attributes.put(ArtifactObject.KEY_SIZE, Long.toString(resource.getSize()));
if (overwrite) {
attributes.put(ArtifactObject.KEY_MIMETYPE, mimetype);
}
String artifactURL = artifact.toString();