All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencastproject.mediapackage.MediaPackageReference Maven / Gradle / Ivy

There is a newer version: 16.6
Show newest version
/*
 * Licensed to The Apereo Foundation under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 *
 * The Apereo Foundation licenses this file to you under the Educational
 * Community 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://opensource.org/licenses/ecl2.txt
 *
 * 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.
 *
 */


package org.opencastproject.mediapackage;

import java.util.Map;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * A MediaPackageElementRef provides means of pointing to other elements in the media package.
 * 

* A metadata catalog could for example contain a reference to the track that was used to extract the data contained in * it. *

*/ @XmlJavaTypeAdapter(MediaPackageReferenceImpl.Adapter.class) public interface MediaPackageReference extends Cloneable { String TYPE_MEDIAPACKAGE = "mediapackage"; String TYPE_TRACK = "track"; String TYPE_CATALOG = "catalog"; String TYPE_ATTACHMENT = "attachment"; String TYPE_SERIES = "series"; String SELF = "self"; String ANY = "*"; /** * Returns the reference type. *

* There is a list of well known types describing media package elements: *

    *
  • mediapackage a reference to the parent media package
  • *
  • track referes to a track inside the media package
  • *
  • catalog referes to a catalog inside the media package
  • *
  • attachment referes to an attachment inside the media package
  • *
  • series referes to a series
  • *
* * @return the reference type */ String getType(); /** * Returns the reference identifier. *

* The identifier will usually refer to the id of the media package element, should the reference point to an element * inside the media package (see {@link MediaPackageElement#getIdentifier()}). *

* In case of a reference to another media package, this will reflect the media package id (see * {@link MediaPackage#getIdentifier()}) or self if it refers to the parent media package. * * @return the reference identifier */ String getIdentifier(); /** * Returns true if this reference matches reference by means of type and identifier. * * @param reference * the media package reference * @return true if the reference matches */ boolean matches(MediaPackageReference reference); /** * Returns additional properties that further define what the object is referencing. *

* An example would be the point in time for a slide preview: * *

   *  <attachment ref="track:track-7;time=8764">
   *  </attachment>
   * 
* * @return the properties of this reference */ Map getProperties(); /** * Returns the property with name key or null if no such property exists. * * @param key * the property name * @return the property value */ String getProperty(String key); /** * Adds an additional property to further define the object reference. Set the value to null in order to remove a * property. * * @param key * The unique key * @param value * The value of the property */ void setProperty(String key, String value); /** * Returns a deep copy of this reference. * * @return the clone */ Object clone(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy