com.sap.mdm.extension.schema
Interface AttributeSchema


public interface AttributeSchema

This interface represents attribute schema of single repository


Method Summary
 AttributeProperties getAttribute(java.lang.String tableCode, java.lang.String attrCode)
          Returns attribute with the specified code belonging to the specified table
 AttributeProperties getAttribute(TableId tableId, AttributeId attrId)
          Returns attribute with the specified ID belonging to the specified table
 AttributeProperties getAttribute(TableId tableId, java.lang.String attrCode)
          Returns attribute with the specified code belonging to the specified table
 java.lang.String getAttributeCode(TableId tableId, AttributeId attrId)
          Converts the attribute ID to attribute code.
 AttributeId getAttributeId(java.lang.String tableCode, java.lang.String attrCode)
          Converts the attribute Code to attribute ID.
 AttributeId getAttributeId(TableId tableId, java.lang.String attrCode)
          Converts the attribute Code to attribute ID.
 AttributeProperties[] getAttributes(java.lang.String tableCode)
          Returns all attribute belonging to the specified taxonomy table
 AttributeProperties[] getAttributes(TableId tableId)
          Returns all attribute belonging to the specified taxonomy table
 LinkedAttribute[] getLinkedAttributes(java.lang.String tableCode, RecordId category)
          Returns linked attributes related to the specified category record in the specified taxonomy table
 LinkedAttribute[] getLinkedAttributes(TableId tableId, RecordId category)
          Returns linked attributes related to the specified category record in the specified taxonomy table
 RepositoryProperties getRepositoryProperties()
          Returns repository properties
 java.lang.String[] getTaxonomyTableCodes()
          Returns codes of taxonomy tables
 TableId[] getTaxonomyTableIds()
          Returns IDs of taxonomy tables
 

Method Detail

getRepositoryProperties

public RepositoryProperties getRepositoryProperties()
Returns repository properties

Returns:
repository properties

getTaxonomyTableCodes

public java.lang.String[] getTaxonomyTableCodes()
Returns codes of taxonomy tables

Returns:
array of taxonomy table codes

getTaxonomyTableIds

public TableId[] getTaxonomyTableIds()
Returns IDs of taxonomy tables

Returns:
array of taxonomy table IDs

getAttributes

public AttributeProperties[] getAttributes(TableId tableId)
                                    throws java.lang.IllegalArgumentException
Returns all attribute belonging to the specified taxonomy table

Parameters:
tableId - ID of taxonomy table
Returns:
array of AttributeProperties. Empty array is returned if no attributes are defined for this taxonomy table
Throws:
java.lang.IllegalArgumentException - if specified taxonomy table does not exist

getAttributes

public AttributeProperties[] getAttributes(java.lang.String tableCode)
                                    throws java.lang.IllegalArgumentException
Returns all attribute belonging to the specified taxonomy table

Parameters:
tableCode - Code of taxonomy table
Returns:
array of AttributeProperties. Empty array is returned if no attributes are defined for this taxonomy table
Throws:
java.lang.IllegalArgumentException - if specified taxonomy table does not exist

getAttribute

public AttributeProperties getAttribute(TableId tableId,
                                        AttributeId attrId)
                                 throws java.lang.IllegalArgumentException
Returns attribute with the specified ID belonging to the specified table

Parameters:
tableId - ID of taxonomy table
attrId - attribute ID
Returns:
AttributeProperties. Null is returned if attribute does not exist
Throws:
java.lang.IllegalArgumentException - if specified taxonomy table does not exist

getAttribute

public AttributeProperties getAttribute(java.lang.String tableCode,
                                        java.lang.String attrCode)
                                 throws java.lang.IllegalArgumentException
Returns attribute with the specified code belonging to the specified table

Parameters:
tableCode - code of taxonomy table
attrCode - attribute code
Returns:
AttributeProperties. Null is returned if attribute does not exist
Throws:
java.lang.IllegalArgumentException - if specified taxonomy table does not exist

getAttribute

public AttributeProperties getAttribute(TableId tableId,
                                        java.lang.String attrCode)
                                 throws java.lang.IllegalArgumentException
Returns attribute with the specified code belonging to the specified table

Parameters:
tableId - ID of taxonomy table
attrCode - attribute code
Returns:
AttributeProperties. Null is returned if attribute does not exist
Throws:
java.lang.IllegalArgumentException - if specified taxonomy table does not exist

getLinkedAttributes

public LinkedAttribute[] getLinkedAttributes(TableId tableId,
                                             RecordId category)
                                      throws java.lang.IllegalArgumentException
Returns linked attributes related to the specified category record in the specified taxonomy table

Parameters:
tableId - ID of taxonomy table
category - category record ID
Returns:
array of LinkedAttribute. Empty array is returned if there is no attributes linked to the specified category
Throws:
java.lang.IllegalArgumentException - if specified taxonomy table does not exist

getLinkedAttributes

public LinkedAttribute[] getLinkedAttributes(java.lang.String tableCode,
                                             RecordId category)
                                      throws java.lang.IllegalArgumentException
Returns linked attributes related to the specified category record in the specified taxonomy table

Parameters:
tableCode - code of taxonomy table
category - category record ID
Returns:
array of LinkedAttribute. Empty array is returned if there is no attributes linked to the specified category
Throws:
java.lang.IllegalArgumentException - if specified taxonomy table does not exist

getAttributeCode

public java.lang.String getAttributeCode(TableId tableId,
                                         AttributeId attrId)
                                  throws java.lang.IllegalArgumentException
Converts the attribute ID to attribute code.

Parameters:
tableId - ID of taxonomy table
attrId - the attribute ID.
Returns:
attribute code.
Throws:
java.lang.IllegalArgumentException - if attribute doesn't exist

getAttributeId

public AttributeId getAttributeId(java.lang.String tableCode,
                                  java.lang.String attrCode)
                           throws java.lang.IllegalArgumentException
Converts the attribute Code to attribute ID.

Parameters:
tableCode - the code of taxonomy table
attrCode - the attribute code.
Returns:
attribute ID.
Throws:
java.lang.IllegalArgumentException - if attribute doesn't exist

getAttributeId

public AttributeId getAttributeId(TableId tableId,
                                  java.lang.String attrCode)
                           throws java.lang.IllegalArgumentException
Converts the attribute Code to attribute ID.

Parameters:
tableId - the ID of taxonomy table
attrCode - the attribute code.
Returns:
attribute ID.
Throws:
java.lang.IllegalArgumentException - if attribute doesn't exist


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.