public String getRemoteFilename() { return metadata.getType(); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
public URI getLocation( Metadata metadata, boolean upload ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( metadata.getType() ); return toUri( path.toString() ); }
private String getPath( Metadata metadata, String repositoryKey ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( insertRepositoryKey( metadata.getType(), repositoryKey ) ); return path.toString(); }
private String getPath( Metadata metadata, String repositoryKey ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( insertRepositoryKey( metadata.getType(), repositoryKey ) ); return path.toString(); }
public URI getLocation( Metadata metadata, boolean upload ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( metadata.getType() ); return toUri( path.toString() ); }
/** * Compares this metadata with the specified object. * * @param obj The object to compare this metadata against, may be {@code null}. * @return {@code true} if and only if the specified object is another {@link Metadata} with equal coordinates, * type, nature, properties and file, {@code false} otherwise. */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Metadata ) ) { return false; } Metadata that = (Metadata) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getType().equals( that.getType() ) && getNature().equals( that.getNature() ) && eq( getFile(), that.getFile() ) && eq( getProperties(), that.getProperties() ); }
/** * Compares this metadata with the specified object. * * @param obj The object to compare this metadata against, may be {@code null}. * @return {@code true} if and only if the specified object is another {@link Metadata} with equal coordinates, * type, nature, properties and file, {@code false} otherwise. */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Metadata ) ) { return false; } Metadata that = (Metadata) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getType().equals( that.getType() ) && getNature().equals( that.getNature() ) && eq( getFile(), that.getFile() ) && eq( getProperties(), that.getProperties() ); }
metadata = convertPathToMetadata(path); if (!"maven-metadata.xml".equals(metadata.getType()) || metdataMatcher.group(7) != null) { return null;