com.sap.mdm.extension.schema
Interface AttributeSchema


public interface AttributeSchema

Represents the attribute schema of a single repository


Method Summary
 AttributeProperties getAttribute(String tableCode, String attrCode)
          Returns an attribute with the specified code belonging to the specified taxonomy table
 AttributeProperties getAttribute(String tableCode, String attrCode, boolean loadTextValues)
          Returns an attribute with the specified code belonging to the specified taxonomy table
 AttributeProperties getAttribute(TableId tableId, AttributeId attrId)
          Returns attribute with the specified ID belonging to the specified taxonomy table
 AttributeProperties getAttribute(TableId tableId, AttributeId attrId, boolean loadTextValues)
          Returns an attribute with the specified ID belonging to the specified taxonomy table
 AttributeProperties getAttribute(TableId tableId, String attrCode)
          Returns attribute with the specified code belonging to the specified taxonomy table
 AttributeProperties getAttribute(TableId tableId, String attrCode, boolean loadTextValues)
          Returns an attribute with the specified code belonging to the specified taxonomy table
 String getAttributeCode(TableId tableId, AttributeId attrId)
          Converts the attribute ID to attribute code.
 AttributeId getAttributeId(String tableCode, String attrCode)
          Converts the specified attribute code into attribute ID.
 AttributeId getAttributeId(TableId tableId, String attrCode)
          Converts the attribute Code to attribute ID.
 AttributeProperties[] getAttributes(String tableCode)
          Returns all attributes belonging to the specified taxonomy table
 AttributeProperties[] getAttributes(String tableCode, boolean loadTextValues)
          Returns all attributes belonging to the specified taxonomy table
 AttributeProperties[] getAttributes(TableId tableId)
          Returns all attribute belonging to the specified taxonomy table
 AttributeProperties[] getAttributes(TableId tableId, boolean loadTextValues)
          Returns all attributes belonging to the specified taxonomy table
 LinkedAttribute[] getLinkedAttributes(String tableCode, RecordId category)
          Returns linked attributes related to the specified category record in the specified taxonomy table
 LinkedAttribute[] getLinkedAttributes(String tableCode, RecordId category, boolean loadTextValues)
          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
 LinkedAttribute[] getLinkedAttributes(TableId tableId, RecordId category, boolean loadTextValues)
          Returns linked attributes related to the specified category record in the specified taxonomy table
 RepositoryProperties getRepositoryProperties()
          Returns repository properties
 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 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 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:
IllegalArgumentException - if specified taxonomy table does not exist

getAttribute

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

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

getAttribute

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

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

getLinkedAttributes

public LinkedAttribute[] getLinkedAttributes(TableId tableId,
                                             RecordId category)
                                      throws 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:
IllegalArgumentException - if specified taxonomy table does not exist

getAttributeCode

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

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

getAttributeId

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

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

getAttributes

public AttributeProperties[] getAttributes(String tableCode)
                                    throws IllegalArgumentException
Returns all attributes belonging to the specified taxonomy table

Parameters:
tableCode - the code of the taxonomy table
Returns:
an array of AttributeProperties, empty array if no attributes are defined for this taxonomy table
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getAttribute

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

Parameters:
tableCode - the code of the taxonomy table
attrCode - the attribute code
Returns:
AttributeProperties or null if the attribute does not exist
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getLinkedAttributes

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

Parameters:
tableCode - the code of the taxonomy table
category - the category record ID
Returns:
an array of LinkedAttribute or null if linked attributes for this category were not loaded An empty array is returned if there are no attributes linked to the specified category
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getAttributeId

public AttributeId getAttributeId(String tableCode,
                                  String attrCode)
                           throws IllegalArgumentException
Converts the specified attribute code into attribute ID.

Parameters:
tableCode - the code of the taxonomy table
attrCode - the attribute code
Returns:
the attribute ID.
Throws:
IllegalArgumentException - if the attribute no exist

getAttributes

public AttributeProperties[] getAttributes(TableId tableId,
                                           boolean loadTextValues)
                                    throws IllegalArgumentException
Returns all attributes belonging to the specified taxonomy table

Parameters:
tableId - the ID of the taxonomy table
loadTextValues - a boolean indicating if the values for text attributes should be loaded
Returns:
an array of AttributeProperties or empty array if no attributes are defined for this taxonomy table
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getAttributes

public AttributeProperties[] getAttributes(String tableCode,
                                           boolean loadTextValues)
                                    throws IllegalArgumentException
Returns all attributes belonging to the specified taxonomy table

Parameters:
tableCode - the code of the taxonomy table
loadTextValues - a boolean indicating if the values for text attributes should be loaded
Returns:
an array of AttributeProperties or empty array if no attributes are defined for this taxonomy table
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getAttribute

public AttributeProperties getAttribute(TableId tableId,
                                        AttributeId attrId,
                                        boolean loadTextValues)
                                 throws IllegalArgumentException
Returns an attribute with the specified ID belonging to the specified taxonomy table

Parameters:
tableId - the ID of the taxonomy table
attrId - the attribute ID
loadTextValues - a boolean indicating if the values for text attributes should be loaded
Returns:
AttributeProperties or null if the attribute does not exist
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getAttribute

public AttributeProperties getAttribute(String tableCode,
                                        String attrCode,
                                        boolean loadTextValues)
                                 throws IllegalArgumentException
Returns an attribute with the specified code belonging to the specified taxonomy table

Parameters:
tableCode - the code of the taxonomy table
attrCode - the attribute code
loadTextValues - a boolean indicating if the values for text attributes should be loaded
Returns:
AttributeProperties or null if the attribute does not exist
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getAttribute

public AttributeProperties getAttribute(TableId tableId,
                                        String attrCode,
                                        boolean loadTextValues)
                                 throws IllegalArgumentException
Returns an attribute with the specified code belonging to the specified taxonomy table

Parameters:
tableId - the ID of the taxonomy table
attrCode - the attribute code
loadTextValues - a boolean indicating if the values for text attributes should be loaded
Returns:
AttributeProperties or null if the attribute does not exist
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getLinkedAttributes

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

Parameters:
tableId - the ID of the taxonomy table
category - the category record ID
loadTextValues - a boolean indicating if the values for text attributes should be loaded
Returns:
array of LinkedAttribute or empty array if there are no attributes linked to the specified category
Throws:
IllegalArgumentException - if the specified taxonomy table does not exist

getLinkedAttributes

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

Parameters:
tableCode - the code of the taxonomy table
category - the category record ID
loadTextValues - a boolean indicating if the values for text attributes should be loaded
Returns:
array of LinkedAttribute or empty array if there are no attributes linked to the specified category
Throws:
IllegalArgumentException - if the specified taxonomy table does not 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.