All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.infrastructurebuilder.data.model.DataStream Maven / Gradle / Ivy
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.11,
// any modifications will be overwritten.
// ==============================================================
package org.infrastructurebuilder.data.model;
/**
*
*
* The <dataSet>
element contains
* information about a set of DataStream instances.
*
*
*
* @version $Revision$ $Date$
*/
public class DataStream
implements
org.infrastructurebuilder.data.IBDataStreamIdentifier
,
java.lang.Comparable
, java.io.Serializable, java.lang.Cloneable, org.infrastructurebuilder.data.model.DataSetInputLocationTracker
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* UUID identifier of the datastream, which is the UUID of the
* bytes of the checksum of the data.
*/
private String uuid;
/**
* The full name of the datastream.
*/
private String dataStreamName;
/**
* A detailed description of the datastream.
*/
private String dataStreamDescription;
/**
* Stringified version of a MIME type for the datastream.
*/
private String mimeType = "application/octet-stream";
/**
* Creation date of this stream, required.
*/
private java.util.Date creationDate;
/**
* URL of the source of this stream, if available.
*/
private String sourceURL;
/**
* Sha-512 Checksum of the source of this stream.
*/
private String sha512;
/**
* Describes a path to the stream.
*/
private String path;
/**
* Optional DataStreamStructuredMetadata element for datastream.
*/
private DataStreamStructuredMetadata structuredDataDescriptor;
/**
* Length of the original stream, if known.
*/
private String originalLength;
/**
* Number of rows of the stream.
*/
private String originalRowCount;
/**
* Additional metadata.
*/
private Object metadata;
/**
* Datastream provenance.
*/
private DataStreamProvenance provenance;
/**
* Field locations.
*/
private java.util.Map locations;
/**
* Field location.
*/
private DataSetInputLocation location;
/**
* Field uuidLocation.
*/
private DataSetInputLocation uuidLocation;
/**
* Field dataStreamNameLocation.
*/
private DataSetInputLocation dataStreamNameLocation;
/**
* Field dataStreamDescriptionLocation.
*/
private DataSetInputLocation dataStreamDescriptionLocation;
/**
* Field mimeTypeLocation.
*/
private DataSetInputLocation mimeTypeLocation;
/**
* Field creationDateLocation.
*/
private DataSetInputLocation creationDateLocation;
/**
* Field sourceURLLocation.
*/
private DataSetInputLocation sourceURLLocation;
/**
* Field sha512Location.
*/
private DataSetInputLocation sha512Location;
/**
* Field pathLocation.
*/
private DataSetInputLocation pathLocation;
/**
* Field structuredDataDescriptorLocation.
*/
private DataSetInputLocation structuredDataDescriptorLocation;
/**
* Field originalLengthLocation.
*/
private DataSetInputLocation originalLengthLocation;
/**
* Field originalRowCountLocation.
*/
private DataSetInputLocation originalRowCountLocation;
/**
* Field metadataLocation.
*/
private DataSetInputLocation metadataLocation;
/**
* Field provenanceLocation.
*/
private DataSetInputLocation provenanceLocation;
//-----------/
//- Methods -/
//-----------/
/**
* Method clone.
*
* @return DataStream
*/
public DataStream clone()
{
try
{
DataStream copy = (DataStream) super.clone();
if ( this.creationDate != null )
{
copy.creationDate = (java.util.Date) this.creationDate.clone();
}
if ( this.structuredDataDescriptor != null )
{
copy.structuredDataDescriptor = (DataStreamStructuredMetadata) this.structuredDataDescriptor.clone();
}
if ( this.metadata != null )
{
copy.metadata = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.metadata );
}
if ( this.provenance != null )
{
copy.provenance = (DataStreamProvenance) this.provenance.clone();
}
if ( copy.locations != null )
{
copy.locations = new java.util.LinkedHashMap( copy.locations );
}
mutatingDataStreamCloneHook( copy );
return copy;
}
catch ( java.lang.Exception ex )
{
throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
+ " does not support clone()" ).initCause( ex );
}
} //-- DataStream clone()
/**
* Get creation date of this stream, required.
*
* @return Date
*/
public java.util.Date getCreationDate()
{
return this.creationDate;
} //-- java.util.Date getCreationDate()
/**
* Get a detailed description of the datastream.
*
* @return String
*/
public String getDataStreamDescription()
{
return this.dataStreamDescription;
} //-- String getDataStreamDescription()
/**
* Get the full name of the datastream.
*
* @return String
*/
public String getDataStreamName()
{
return this.dataStreamName;
} //-- String getDataStreamName()
/**
*
*
* @param key
* @return DataSetInputLocation
*/
public DataSetInputLocation getLocation( Object key )
{
if ( key instanceof String )
{
switch ( ( String ) key )
{
case "" :
{
return this.location;
}
case "uuid" :
{
return uuidLocation;
}
case "dataStreamName" :
{
return dataStreamNameLocation;
}
case "dataStreamDescription" :
{
return dataStreamDescriptionLocation;
}
case "mimeType" :
{
return mimeTypeLocation;
}
case "creationDate" :
{
return creationDateLocation;
}
case "sourceURL" :
{
return sourceURLLocation;
}
case "sha512" :
{
return sha512Location;
}
case "path" :
{
return pathLocation;
}
case "structuredDataDescriptor" :
{
return structuredDataDescriptorLocation;
}
case "originalLength" :
{
return originalLengthLocation;
}
case "originalRowCount" :
{
return originalRowCountLocation;
}
case "metadata" :
{
return metadataLocation;
}
case "provenance" :
{
return provenanceLocation;
}
default :
{
return getOtherLocation( key );
}
}
}
else
{
return getOtherLocation( key );
}
} //-- DataSetInputLocation getLocation( Object )
/**
* Get additional metadata.
*
* @return Object
*/
public Object getMetadata()
{
return this.metadata;
} //-- Object getMetadata()
/**
* Get stringified version of a MIME type for the datastream.
*
* @return String
*/
public String getMimeType()
{
return this.mimeType;
} //-- String getMimeType()
/**
* Get length of the original stream, if known.
*
* @return String
*/
public String getOriginalLength()
{
return this.originalLength;
} //-- String getOriginalLength()
/**
* Get number of rows of the stream.
*
* @return String
*/
public String getOriginalRowCount()
{
return this.originalRowCount;
} //-- String getOriginalRowCount()
/**
*
*
* @param key
* @param location
*/
public void setLocation( Object key, DataSetInputLocation location )
{
if ( key instanceof String )
{
switch ( ( String ) key )
{
case "" :
{
this.location = location;
return;
}
case "uuid" :
{
uuidLocation = location;
return;
}
case "dataStreamName" :
{
dataStreamNameLocation = location;
return;
}
case "dataStreamDescription" :
{
dataStreamDescriptionLocation = location;
return;
}
case "mimeType" :
{
mimeTypeLocation = location;
return;
}
case "creationDate" :
{
creationDateLocation = location;
return;
}
case "sourceURL" :
{
sourceURLLocation = location;
return;
}
case "sha512" :
{
sha512Location = location;
return;
}
case "path" :
{
pathLocation = location;
return;
}
case "structuredDataDescriptor" :
{
structuredDataDescriptorLocation = location;
return;
}
case "originalLength" :
{
originalLengthLocation = location;
return;
}
case "originalRowCount" :
{
originalRowCountLocation = location;
return;
}
case "metadata" :
{
metadataLocation = location;
return;
}
case "provenance" :
{
provenanceLocation = location;
return;
}
default :
{
setOtherLocation( key, location );
return;
}
}
}
else
{
setOtherLocation( key, location );
}
} //-- void setLocation( Object, DataSetInputLocation )
/**
*
*
* @param key
* @param location
*/
public void setOtherLocation( Object key, DataSetInputLocation location )
{
if ( location != null )
{
if ( this.locations == null )
{
this.locations = new java.util.LinkedHashMap();
}
this.locations.put( key, location );
}
} //-- void setOtherLocation( Object, DataSetInputLocation )
/**
*
*
* @param key
* @return DataSetInputLocation
*/
private DataSetInputLocation getOtherLocation( Object key )
{
return ( locations != null ) ? locations.get( key ) : null;
} //-- DataSetInputLocation getOtherLocation( Object )
/**
* Get describes a path to the stream.
*
* @return String
*/
public String getPath()
{
return this.path;
} //-- String getPath()
/**
* Get datastream provenance.
*
* @return DataStreamProvenance
*/
public DataStreamProvenance getProvenance()
{
return this.provenance;
} //-- DataStreamProvenance getProvenance()
/**
* Get sha-512 Checksum of the source of this stream.
*
* @return String
*/
public String getSha512()
{
return this.sha512;
} //-- String getSha512()
/**
* Get uRL of the source of this stream, if available.
*
* @return String
*/
public String getSourceURL()
{
return this.sourceURL;
} //-- String getSourceURL()
/**
* Get optional DataStreamStructuredMetadata element for
* datastream.
*
* @return DataStreamStructuredMetadata
*/
public DataStreamStructuredMetadata getStructuredDataDescriptor()
{
return this.structuredDataDescriptor;
} //-- DataStreamStructuredMetadata getStructuredDataDescriptor()
/**
* Get uUID identifier of the datastream, which is the UUID of
* the bytes of the checksum of the data.
*
* @return String
*/
public String getUuid()
{
return this.uuid;
} //-- String getUuid()
/**
* Set creation date of this stream, required.
*
* @param creationDate
*/
public void setCreationDate( java.util.Date creationDate )
{
this.creationDate = creationDate;
} //-- void setCreationDate( java.util.Date )
/**
* Set a detailed description of the datastream.
*
* @param dataStreamDescription
*/
public void setDataStreamDescription( String dataStreamDescription )
{
this.dataStreamDescription = dataStreamDescription;
} //-- void setDataStreamDescription( String )
/**
* Set the full name of the datastream.
*
* @param dataStreamName
*/
public void setDataStreamName( String dataStreamName )
{
this.dataStreamName = dataStreamName;
} //-- void setDataStreamName( String )
/**
* Set additional metadata.
*
* @param metadata
*/
public void setMetadata( Object metadata )
{
this.metadata = metadata;
} //-- void setMetadata( Object )
/**
* Set stringified version of a MIME type for the datastream.
*
* @param mimeType
*/
public void setMimeType( String mimeType )
{
this.mimeType = mimeType;
} //-- void setMimeType( String )
/**
* Set length of the original stream, if known.
*
* @param originalLength
*/
public void setOriginalLength( String originalLength )
{
this.originalLength = originalLength;
} //-- void setOriginalLength( String )
/**
* Set number of rows of the stream.
*
* @param originalRowCount
*/
public void setOriginalRowCount( String originalRowCount )
{
this.originalRowCount = originalRowCount;
} //-- void setOriginalRowCount( String )
/**
* Set describes a path to the stream.
*
* @param path
*/
public void setPath( String path )
{
this.path = path;
} //-- void setPath( String )
/**
* Set datastream provenance.
*
* @param provenance
*/
public void setProvenance( DataStreamProvenance provenance )
{
this.provenance = provenance;
} //-- void setProvenance( DataStreamProvenance )
/**
* Set sha-512 Checksum of the source of this stream.
*
* @param sha512
*/
public void setSha512( String sha512 )
{
this.sha512 = sha512;
} //-- void setSha512( String )
/**
* Set uRL of the source of this stream, if available.
*
* @param sourceURL
*/
public void setSourceURL( String sourceURL )
{
this.sourceURL = sourceURL;
} //-- void setSourceURL( String )
/**
* Set optional DataStreamStructuredMetadata element for
* datastream.
*
* @param structuredDataDescriptor
*/
public void setStructuredDataDescriptor( DataStreamStructuredMetadata structuredDataDescriptor )
{
this.structuredDataDescriptor = structuredDataDescriptor;
} //-- void setStructuredDataDescriptor( DataStreamStructuredMetadata )
/**
* Set uUID identifier of the datastream, which is the UUID of
* the bytes of the checksum of the data.
*
* @param uuid
*/
public void setUuid( String uuid )
{
this.uuid = uuid;
} //-- void setUuid( String )
// Default constructor
public DataStream() {
}
// "Copy constructor"
public DataStream(DataStream ds) {
this.setCreationDate(ds.getCreationDate());
this.setDataStreamDescription(ds.getDataStreamDescription());
this.setDataStreamName(ds.getDataStreamName());
this.setMetadata(ds.getMetadata());
this.setMimeType(ds.getMimeType());
this.setPath(ds.getPath());
this.setSha512(ds.getSha512());
this.setSourceURL(ds.getSourceURL());
this.setUuid(ds.getUuid());
this.setOriginalLength(ds.getOriginalLength());
this.setOriginalRowCount(ds.getOriginalRowCount());
}
// Clone hooks
private void mutatingDataStreamCloneHook(DataStream s) {
}
// hash and equals
@Override
public int hashCode() {
return java.util.Objects.hash(creationDate, dataStreamDescription, dataStreamName, metadata, mimeType, path, sha512,
sourceURL, uuid, originalLength, originalRowCount);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
DataStream other = (DataStream) obj;
return java.util.Objects.equals(creationDate, other.creationDate)
&& java.util.Objects.equals(dataStreamDescription, other.dataStreamDescription)
&& java.util.Objects.equals(dataStreamName, other.dataStreamName) && java.util.Objects.equals(metadata, other.metadata)
&& java.util.Objects.equals(mimeType, other.mimeType) && java.util.Objects.equals(path, other.path)
&& java.util.Objects.equals(sha512, other.sha512) && java.util.Objects.equals(sourceURL, other.sourceURL)
&& java.util.Objects.equals(uuid, other.uuid)
&& java.util.Objects.equals(originalLength, other.originalLength)
&& java.util.Objects.equals(originalRowCount, other.originalRowCount)
;
}
@Override
public int compareTo(org.infrastructurebuilder.data.IBDataStreamIdentifier that) {
return ibDataStreamComparator.compare(this, that);
}
//
// ID mapper Work
//
@Override
public java.util.UUID getId() {
return org.infrastructurebuilder.data.IBDataModelUtils.safeMapUUID.apply(getUuid()).orElse(null);
}
// Typed source url access
@Override
public java.util.Optional getURL() {
return java.util.Optional.ofNullable(getSourceURL());
}
@Override
public java.util.Optional getName() {
return java.util.Optional.ofNullable(getDataStreamName());
}
@Override
public java.util.Optional getDescription() {
return java.util.Optional.ofNullable(getDataStreamDescription());
}
public java.util.Optional getStructuredDataMetadata() {
return java.util.Optional.ofNullable(this.getStructuredDataDescriptor());
}
}