|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.mediametadata.impl.RepositoryViewImpl
This class provides the way to manage the publishing of AMS asset definitions,
and instantiating
AssetView
objects for these definitions. An asset definition
defines the actual attributes and structure of an asset. Publishing such
a definition causes the AMS to generate the schema/tables necessary to
represent these assets. Once an asset definition has been published,
an AssetView
object can be created, which makes available
most of the apis for manipulating assets!
StandardAssetDefinition
Constructor Summary | |
RepositoryViewImpl(ClientConnector connector,
java.lang.String schemaName)
Public constructor for the view on a client machine of the AMS repository of interest. |
Method Summary | |
Infrastructure |
exposeDatabase()
Public accessor for the underlying database. |
AssetView |
getAssetView(java.lang.String assetUUName)
Creates/gets an AssetView from this repository, and for this
asset definition, as specified by uuname. |
DictionaryView |
getDictionaryView(AMSAsset asset,
java.lang.String attributeName)
Gets a DictionaryView for the dictionary definition, which is referenced by a particular field of an asset. |
DictionaryView |
getDictionaryView(java.lang.String dictionaryUUName)
Gets a DictionaryView for this dictionary type and definition. |
java.lang.String |
getStandardAssetName()
Get the uuName of the Standard Asset. |
AssetView |
getStandardAssetView()
Attention: Gets the asset view for the StandardAssetDefinition . |
java.lang.String[] |
listAssetTypeNames()
Return a list of uunames of all asset types that are currently available in this repository. |
java.lang.String[] |
listDictionaryTypeNames()
Returns a list of the universally unique names of all dictionary types that are currently available in this repository. |
void |
publishAssetType(java.net.URL codebase,
java.lang.String assetClassName)
Publishes a new asset class/type with the repository. |
void |
publishDictionaryType(java.net.URL context,
java.lang.String keyRecordClassName)
Register/publish a new dictionary with the repository. |
void |
publishStandardAssetType()
Attention: Publishes the StandardAssetDefinition of the AMS into
the repository. |
void |
transferAssets(java.lang.String assetUUName,
RepositoryView otherRepository,
java.lang.String otherAssetUUName)
Attention: This function copies asset metadata, including folder and dictionary links from one repository to another. |
void |
transferDictionary(java.lang.String sourceDictionaryUUName,
RepositoryView destionaryRepository,
java.lang.String destinationDictionaryUUName)
Transfer the contents from the indicated dictionary from one asset repository to another. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RepositoryViewImpl(ClientConnector connector, java.lang.String schemaName) throws AMSException
Method Detail |
public Infrastructure exposeDatabase()
public void publishAssetType(java.net.URL codebase, java.lang.String assetClassName) throws AMSException
AMSAsset
.
Also, tables required to represent these assets in the database are
created.
When this asset is read in, its uuName is checked against the existing database and if an asset is already defined there with that uuName, then another check is made, namely does this existing asset have the same serialization id for its bytecodes! If so, it is assumed that its already the same. If not, then the asset definition is updated/created as described above.
codebase
- URL for codebase (i.e. a classpath subsection), otherwise, if null, then use classpathfullClassName
- fully-qualified class name of asset definitionStandardAssetDefinition
,
AMSAsset
public java.lang.String[] listAssetTypeNames() throws AMSException
The list returned does include the AMS StandardAssetDefinition
, if published!
StandardAssetDefinition.toUUName()
,
AMSAsset.toUUName().
public void transferAssets(java.lang.String assetUUName, RepositoryView otherRepository, java.lang.String otherAssetUUName) throws AMSException
public AssetView getAssetView(java.lang.String assetUUName) throws AMSException
AssetView
from this repository, and for this
asset definition, as specified by uuname.assetUUName
- uuname for asset definition of requested asset viewStandardAssetDefinition.toUUName()
,
AMSAsset.toUUName().
public java.lang.String getStandardAssetName() throws AMSException
StandardAssetDefinition
StandardAssetDefinition.toUUName()
public void publishStandardAssetType() throws AMSException
StandardAssetDefinition
of the AMS into
the repository. Checks to see if this asset definition has already,
been published, and does nothing if it has. Publishing means creating
the entire database schema that goes along with an asset definition.StandardAssetDefinition.toUUName()
public AssetView getStandardAssetView() throws AMSException
StandardAssetDefinition
.
However, if the method publishStandardAssetType
has never been called for this repository, then an exception is thrown.
An asset view is a set of methods for manipulating the assets which
match their particular definition, in this case, the StandardAssetDefinition
.StandardAssetDefinition- See Also:
StandardAssetDefinition
public void publishDictionaryType(java.net.URL context, java.lang.String keyRecordClassName) throws AMSException
StandardDictionaryDefinition
supplied
by the AMS.
Use this method if the definition needs to add some user attributes, or change/evolve in some other way.
codebase
- URL for codebase (i.e. a classpath subsection), otherwise, if null, then use classpathfullClassName
- fully-qualified class name of key record definitionStandardDictionaryDefinition
,
AMSKeyRecord
public java.lang.String[] listDictionaryTypeNames() throws AMSException
listAssetNames
.listAssetTypeNames()
,
AMSKeyRecord.toUUName()
,
AMSKeyRecord.toUUName().
public void transferDictionary(java.lang.String sourceDictionaryUUName, RepositoryView destionaryRepository, java.lang.String destinationDictionaryUUName) throws AMSException
transferAssets
method.public DictionaryView getDictionaryView(java.lang.String dictionaryUUName) throws AMSException
StandardDictionaryDefinition.toUUName()
.
For an explanation of uuname, see listAssetNames
.dictionaryUUName
- uuname for specified dictionary (normally just StandardDictionaryDefinition)#listAssetNames()
,
AMSKeyRecord.toUUName()
,
AMSKeyRecord.toUUName()
public DictionaryView getDictionaryView(AMSAsset asset, java.lang.String attributeName) throws AMSException
StandardDictionaryDefinition
.asset
- an asset previously queried, or the template from the asset factoryattributeSpecifier
- the attribute specifier for the AMSKey or AMSKeyList attributeAMSKey.toUUName()
,
com.sun.mediametadata.objects.AMSKeyList#toUUName()
,
AMSKeyRecord.toUUName()
,
AssetView.getAssetFactory()
,
RecordFactory.getTemplate()
,
AttributeName
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |