org.outerj.daisy.repository.schema
Interface PartType


public interface PartType


Method Summary
 void clearDescriptions()
           
 void clearLabels()
           
 java.lang.String getDescription(java.util.Locale locale)
           
 java.lang.String getDescriptionExact(java.util.Locale locale)
           
 java.util.Locale[] getDescriptionLocales()
          Returns the locales for which a description is set.
 long getId()
           
 java.lang.String getLabel(java.util.Locale locale)
          Gets the label in the given locale, using the usual locale fallback mechanisms if not found in the exactly specified locale, and finally returning the parttype's name if no label is available.
 java.lang.String getLabelExact(java.util.Locale locale)
           
 java.util.Locale[] getLabelLocales()
           
 java.util.Date getLastModified()
          When was this PartType last changed (persistently).
 long getLastModifier()
          Who (which user) last changed this PartType (persistently).
 java.lang.String getLinkExtractor()
          Returns the name of the link extractor to use for parts of this type, can be null.
 java.lang.String getMimeTypes()
          Returns a string describing limitations on the allowed mime-types.
 java.lang.String getName()
           
 long getUpdateCount()
           
 org.outerx.daisy.x10.PartTypeDocument getXml()
           
 boolean isDaisyHtml()
          Indicates if the content of the part is Daisy HTML (well-formed XML using HTML elements).
 boolean isDeprecated()
           
 boolean mimeTypeAllowed(java.lang.String mimeType)
           
 void save()
           
 void setAllFromXml(org.outerx.daisy.x10.PartTypeDocument.PartType partTypeXml)
          Changes the state of this object to match the given XML.
 void setDaisyHtml(boolean daisyHtml)
          Sets the Daisy-HTML flag.
 void setDeprecated(boolean deprecated)
           
 void setDescription(java.util.Locale locale, java.lang.String description)
           
 void setLabel(java.util.Locale locale, java.lang.String label)
           
 void setLinkExtractor(java.lang.String name)
           
 void setMimeTypes(java.lang.String mimeTypes)
          Specify the type of data that is allowed in parts of this type based on the mime-type.
 void setName(java.lang.String name)
           
 

Method Detail

getId

long getId()

getName

java.lang.String getName()

setName

void setName(java.lang.String name)

getLabel

java.lang.String getLabel(java.util.Locale locale)
Gets the label in the given locale, using the usual locale fallback mechanisms if not found in the exactly specified locale, and finally returning the parttype's name if no label is available.


getLabelExact

java.lang.String getLabelExact(java.util.Locale locale)

setLabel

void setLabel(java.util.Locale locale,
              java.lang.String label)
Parameters:
label - if null, the label for this locale will be removed.

clearLabels

void clearLabels()

getLabelLocales

java.util.Locale[] getLabelLocales()

getDescription

java.lang.String getDescription(java.util.Locale locale)

getDescriptionExact

java.lang.String getDescriptionExact(java.util.Locale locale)

setDescription

void setDescription(java.util.Locale locale,
                    java.lang.String description)
Parameters:
description - if null, the description for this locale will be removed.

clearDescriptions

void clearDescriptions()

getDescriptionLocales

java.util.Locale[] getDescriptionLocales()
Returns the locales for which a description is set.


getMimeTypes

java.lang.String getMimeTypes()
Returns a string describing limitations on the allowed mime-types. An empty string means no restrictions. Otherwise, the string contains a comma-separated list of allowed mime-types.


setMimeTypes

void setMimeTypes(java.lang.String mimeTypes)
Specify the type of data that is allowed in parts of this type based on the mime-type.

Parameters:
mimeTypes - A comma-separated list of mime-types. If empty, all mime-types are allowed.

mimeTypeAllowed

boolean mimeTypeAllowed(java.lang.String mimeType)

isDaisyHtml

boolean isDaisyHtml()
Indicates if the content of the part is Daisy HTML (well-formed XML using HTML elements).


setDaisyHtml

void setDaisyHtml(boolean daisyHtml)
Sets the Daisy-HTML flag.

Note: when the argument daisyHTML is true, the link extractor will be forced to "daisy-html", for reasons of back-compatibility (in the past, link extractors were not explicitely configurable, and link extraction always happened for daisy-html parts). It is possible to override this again by calling setLinkExtractor after setDaisyHtml.


setLinkExtractor

void setLinkExtractor(java.lang.String name)
Parameters:
name - allowed to be null

getLinkExtractor

java.lang.String getLinkExtractor()
Returns the name of the link extractor to use for parts of this type, can be null.


isDeprecated

boolean isDeprecated()

setDeprecated

void setDeprecated(boolean deprecated)

getLastModified

java.util.Date getLastModified()
When was this PartType last changed (persistently). Returns null on newly created PartTypes.


getLastModifier

long getLastModifier()
Who (which user) last changed this PartType (persistently). Returns -1 on newly created PartTypes.


getXml

org.outerx.daisy.x10.PartTypeDocument getXml()

setAllFromXml

void setAllFromXml(org.outerx.daisy.x10.PartTypeDocument.PartType partTypeXml)
Changes the state of this object to match the given XML. Note that this will only change properties otherwise changeable through methods of this interface, and not internal properties like id or lastModified.


save

void save()
          throws RepositoryException
Throws:
RepositoryException

getUpdateCount

long getUpdateCount()


Copyright © -2012 . All Rights Reserved.