Package org.opencastproject.mediapackage
Class PublicationImpl
java.lang.Object
org.opencastproject.mediapackage.AbstractMediaPackageElement
org.opencastproject.mediapackage.PublicationImpl
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<MediaPackageElement>,ManifestContributor,MediaPackageElement,Publication
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.opencastproject.mediapackage.MediaPackageElement
MediaPackageElement.Type -
Field Summary
Fields inherited from class org.opencastproject.mediapackage.AbstractMediaPackageElement
checksum, description, elementType, flavor, id, mediaPackage, mimeType, reference, size, tags, uri -
Constructor Summary
ConstructorsConstructorDescriptionJAXB constructorPublicationImpl(String id, String channel, URI uri, MimeType mimeType) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachment(Attachment attachment) Adds an attachment to this publication.voidaddCatalog(Catalog catalog) Adds a catalog to this publication.static voidaddElementToPublication(Publication publication, MediaPackageElement element) Adds aMediaPackageElementto this publication by determining its type.voidAdds a track to this publication.voidRemoves all tracks from this publication.Returns the attachments that are part of this publication.Catalog[]Returns the catalogs associated with this publication.Returns the channel id.Track[]Returns the tracks that are part of this publication.static Publicationpublication(String id, String channel, URI uri, MimeType mimeType) voidremoveAttachmentById(String attachmentId) voidsetFlavor(MediaPackageElementFlavor flavor) Sets the flavor on this media package element.Methods inherited from class org.opencastproject.mediapackage.AbstractMediaPackageElement
addTag, clearReference, clearTags, clone, compareTo, containsTag, containsTag, equals, generateIdentifier, getChecksum, getElementDescription, getElementType, getFlavor, getIdentifier, getMediaPackage, getMimeType, getReference, getSize, getTags, getURI, hashCode, referTo, referTo, removeTag, setChecksum, setElementDescription, setIdentifier, setMimeType, setReference, setSize, setTags, setURI, toManifest, toString, verifyMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.opencastproject.mediapackage.ManifestContributor
toManifestMethods inherited from interface org.opencastproject.mediapackage.MediaPackageElement
addTag, clearReference, clearTags, clone, containsTag, containsTag, generateIdentifier, getChecksum, getElementDescription, getElementType, getFlavor, getIdentifier, getMediaPackage, getMimeType, getReference, getSize, getTags, getURI, referTo, referTo, removeTag, setChecksum, setElementDescription, setIdentifier, setMimeType, setReference, setSize, setTags, setURI, verify
-
Constructor Details
-
PublicationImpl
public PublicationImpl()JAXB constructor -
PublicationImpl
-
-
Method Details
-
publication
-
getChannel
Description copied from interface:PublicationReturns the channel id.- Specified by:
getChannelin interfacePublication
-
getTracks
Description copied from interface:PublicationReturns the tracks that are part of this publication.- Specified by:
getTracksin interfacePublication- Returns:
- the tracks
-
addTrack
Description copied from interface:PublicationAdds a track to this publication.- Specified by:
addTrackin interfacePublication- Parameters:
track- the track to add
-
getAttachments
Description copied from interface:PublicationReturns the attachments that are part of this publication.- Specified by:
getAttachmentsin interfacePublication- Returns:
- the attachments
-
addAttachment
Description copied from interface:PublicationAdds an attachment to this publication.- Specified by:
addAttachmentin interfacePublication- Parameters:
attachment- the attachment to add
-
removeAttachmentById
- Specified by:
removeAttachmentByIdin interfacePublication
-
getCatalogs
Description copied from interface:PublicationReturns the catalogs associated with this publication.- Specified by:
getCatalogsin interfacePublication- Returns:
- the catalogs
-
addCatalog
Description copied from interface:PublicationAdds a catalog to this publication.- Specified by:
addCatalogin interfacePublication- Parameters:
catalog- the catalog to add
-
clearTracks
public void clearTracks()Description copied from interface:PublicationRemoves all tracks from this publication.- Specified by:
clearTracksin interfacePublication
-
setFlavor
Description copied from interface:MediaPackageElementSets the flavor on this media package element.- Specified by:
setFlavorin interfaceMediaPackageElement- Overrides:
setFlavorin classAbstractMediaPackageElement- Parameters:
flavor- the new flavor- See Also:
-
addElementToPublication
Adds aMediaPackageElementto this publication by determining its type.- Parameters:
publication- ThePublicationto add theMediaPackageElementto.element- TheMediaPackageElementto add. If it is not aAttachment,CatalogorTrackit will not be added to thePublication.
-