(*
 * $Id$
 *
 * JSDAI(TM), a way to implement STEP, ISO 10303
 * Copyright (C) 1997-2008, LKSoftWare GmbH, Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License
 * version 3 as published by the Free Software Foundation (AGPL v3).
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * JSDAI is a registered trademark of LKSoftWare GmbH, Germany
 * This software is also available under commercial licenses.
 * See also http://www.jsdai.net/
 *)

(*schema_mapping product_occurrence(Product_occurrence_arm, Product_occurrence_mim);*)


entity_mapping Definition_based_function_occurrence(Definition_based_function_occurrence, product_definition);

mapping_constraints;

product_definition
{product_definition <-
product_definition_context_association.definition
product_definition_context_association
{product_definition_context_association.role ->
product_definition_context_role
product_definition_context_role.name = 'part definition type'}
product_definition_context_association.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'functional occurrence'}

end_mapping_constraints;

attribute_mapping derived_from(derived_from, $PATH, Functional_element_definition);

product_definition
{product_definition <-
product_definition_context_association.definition
product_definition_context_association
{product_definition_context_association.role ->
product_definition_context_role
product_definition_context_role.name = 'part definition type'}
product_definition_context_association.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'functional occurrence'}
product_definition <- product_definition_relationship.related_product_definition
product_definition_relationship
{product_definition_relationship.name = 'definition usage'}
{product_definition_relationship => product_definition_usage}
product_definition_relationship.relating_product_definition -> product_definition
{product_definition.frame_of_reference -> product_definition_context
product_definition_context <= application_context_element 
application_context_element.name = 'functional definition'}

end_attribute_mapping;

end_entity_mapping;

entity_mapping Specification_based_function_occurrence(Specification_based_function_occurrence, product_definition);

mapping_constraints;

product_definition
{product_definition <-
product_definition_context_association.definition
product_definition_context_association
{product_definition_context_association.role ->
product_definition_context_role
product_definition_context_role.name = 'part definition type'}
product_definition_context_association.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'functional occurrence'}
product_definition.formation -> product_definition_formation
{product_definition_formation.of_product -> product
product <- product_related_product_category.products[i]
product_related_product_category <= product_category
product_category.name = 'functionality'}
{product_definition_formation = configuration_design_item
configuration_design_item <- configuration_design.design
{configuration_design.name = 'product design'}
configuration_design.configuration -> configuration_item
(configuration_item => product_identification)
(configuration_item => product_identification
product_identification => product_specification)}

end_mapping_constraints;

end_entity_mapping;
(*end_schema_mapping;*)
