CARIS HPD : HPD Server API : Introduction : Migration notes : HPD 3.0
 

HPD 3.0

ENC_VIEW, AML_VIEW, GPE_VIEW

The views ENC_VIEW, AML_VIEW, and GPE_VIEW have been removed. Instead use vector_product_view which shows all vector products, including IENCs, ENCs, AMLs, GMLs, and other types.

Type_name and type_key were added so that one can limit the query to vector products of specific types, similar to how the previous views worked.

For example, the following would return the same results as the AML_VIEW:

select * from vector_product_view where type_key = 'AML'

For even more control, one could look at the type_name. Type_name (the name as a string) replaces the enctype column (the type as an integer):

select * from vector_product_view where type_key = 'AML' and type_name='SBO'

The retired and rejected columns were removed. The product_status column can be used instead. For example:

select * from vector_product_view where product_status='Rejected'

Vector product version

The parameter v_enc_version was added to P_ENCAPI.ADDENCDEFINITION and P_ENCAPI.UPDATEENCDEFINITION, and v_aml_version was added to P_ENCAPI.ADDAMLDEFINITION and P_ENCAPI.UPDATEAMLDEFINITION. While updating products, the default value is NULL which means "do not change", so existing code will continue to work. When creating products, the version field defaults to 3.1 for ENCs and 1.0 for AMLs.

Paper chart: charts

v_CHPRID is a new parameter on P_PPRAPI.ADDCHART. It represents the Chart Presentation Identifier and is similar to the panel's presid property.

v_CHPRID is also on P_PPRAPI.UPDATECHART, and defaults to NULL which means "do not change".

Paper chart: panels

The v_sdgsy and v_sdgun parameters were removed from P_PPRAPI.ADDPANEL, and v_sndrnd and v_frcdsp were added. V_sndrnd represents the sounding rounding and v_frcdsp represents the fractional display.

The p_sndrnd and p_frcdsp parameters were added to P_PPRAPI.UPDATEPANEL. The new properties represent the sounding rounding and

fractional display. They default to NULL which means "do not change".

p_project_manager

The functions GETFEATURECERTIFICATION and GETFEATUREUSAGECERTIFICATION have been removed. Both certifications can be obtained from the TMP_SRC_FEATURE_VERSION_INFO view.

-- Get foids of features modified by a project. DELETE from TEMPFOIDS;

insert into TEMPFOIDS (foid) (SELECT foid FROM table

(p_project_manager.getprojectfeatures (:project_id)));

-- Of those features, find features with feature certification "Accepted" select to_char(foid) internal_foid, FoidNumberToString(foid) display_foid, objectclass acronym, attributecertification, repcertification,

u.name usage_name, version_created modified from TMP_SRC_FEATURE_VERSION_INFO t, usages u WHERE t.usage_id = u.usages_id

and t.attributecertification = 'Accepted' and t.state = 'Latest Version';

-- Of those features, find features with representation certification "Accepted" on the Berthing usage

select to_char(foid) internal_foid, FoidNumberToString(foid) display_foid, objectclass acronym, attributecertification, repcertification,

u.name usage_name, version_created modified from TMP_SRC_FEATURE_VERSION_INFO t, usages u WHERE t.usage_id = u.usages_id

and t.REPCERTIFICATION = 'Accepted' and t.state = 'Latest Version'

and u.name = 'Berthing(1-2499)';

Vector Products: retire / reject

The following have been removed: P_ENCAPI.RETIRE_ENC, P_ENCAPI.REJECT_ENC, P_ENCAPI.RETIRE_AML, P_ENCAPI.REJECT_AML, P_GPEAPI.RETIRE_GPE, P_GPEAPI.REJECT_GPE. Call P_VECTORAPI.SET_PRODUCT_STATUS instead. The new method takes the name of the state to set the product to, whereas the old methods used 'Y' to mean reject/retire the product (depending on the method called), and 'N' to set it back to 'Active'. In both the old and new methods, the first parameter is the product_id.

Paper Products: retire / reject

The following have been removed: P_PPRAPI.RETIRE_PCE and P_PPRAPI.REJECT_PCE. Call P_PPRAPI.SET_PRODUCT_STATUS instead. The new method takes the name of the state to set the product to, whereas the old methods used 'Y' to mean reject/retire the product (depending on the method called), and 'N' to set it back to 'Active'. In both the old and new methods, the first parameter is the chart_id.

Vector Products: getFoids

P_ENCAPI.GETFOIDS and P_GPEAPI.GETFOIDS methods have been removed. PRODUCT_FEATURE_VW replaces those methods. While "getFoids" only returned foids that were current when the version was completed (does not include deleted or replaced features), the new view contains all foids that existed in the product version. You can identify which features were deleted or replaced using TMP_VP_FEATURE_STATE, if you want to replicate the previous results.

Vector Products: getUpdates

P_ENCAPI.GETUPDATES and P_GPEAPI.GETUPDATES methods have been removed. p_vectorapi.getUpdates replaces those methods. The methods all take the same parameters, and return results using the same view. The only difference is that the new method returns a number to indicate if the updates have been suppressed via calls to p_vectorAPI.allowSpecificCPSUpdate, whereas the old method would not give an indication that the updates were suppressed.

Projects: Changes to source data

P_Project_Manager.GETUSAGEPROJECTFEATURES and P_Project_Manager.GETLATESTUSAGEPROJECTFEATURES have been removed. The first one returned foids of all features that were modified by a given project on a given usage, while the second one returned foids and the latest representation id of all features where the last edit on the given usage was for a given project.

P_Project_Manager.GetProjectFeatures returns the foids of all features (including collections) modified by a given project, and the TMP_SRC_FEATURE_VERSION_INFO view can be used to limit the results to a given usage or get representation ids or other information.

GETUSAGEPROJECTFEATURES(v_project_id, v_usage_id):

-- Get foids of features modified by a project.

DELETE from TEMPFOIDS;

insert into TEMPFOIDS (foid) (SELECT foid FROM table

(p_project_manager.getprojectfeatures (:project_id)));

 

-- Of those features, find those where the last change was done under that project.

select to_char(foid) internal_foid, FoidNumberToString(foid) display_foid, objectclass, rep_id, attributecertification, repcertification

from TMP_SRC_FEATURE_VERSION_INFO

WHERE project_id = :project_id

and usage_id = :usage_id;

GETLATESTUSAGEPROJECTFEATURES(v_project_id, v_usage_id):

-- Get foids of features modified by a project.

DELETE from TEMPFOIDS;

insert into TEMPFOIDS (foid)

(SELECT foid FROM table

   (p_project_manager.getprojectfeatures (:project_id)));

 

-- Of those features, find those where the last change was done under that project.

select to_char(foid) internal_foid, FoidNumberToString(foid) display_foid,

objectclass, rep_id, attributecertification, repcertification

from TMP_SRC_FEATURE_VERSION_INFO

WHERE project_id = :project_id

and usage_id = :usage_id

and state = 'Latest Version';

Projects: Changes to paper product data

P_Project_Manager.GETLATESTPROJECTPAPERFEATURES has been removed. The same result can be obtained by calling GETPROJECTPAPERFEATURES and then removing all results which are not for the latest version.

GETLATESTPROJECTPAPERFEATURES(v_project_id, v_chartver_id):

-- Get foids of features modified by a project.

DELETE from TEMPFOIDS;

insert into TEMPFOIDS (foid)

(SELECT foid FROM table

   (p_project_manager.GETPROJECTPAPERFEATURES(:project_id, :chartver_id)));

 

-- Of those features, find features where the latest version was touched by the project.

select to_char(foid) internal_foid, FoidNumberToString(foid) display_foid, objectclass,

   attributecertification, repcertification

from TMP_PPR_FEATURE_VERSION_INFO

WHERE panelver_id = :panel_version_id

and project_id = :project_id

and state = 'Latest Version';

Projects: Changes to vector product data

P_Project_Manager.GETLATESTPROJECTVECTORFEATURES has been removed. The same result can be obtained by calling GETPROJECTVECTORFEATURES and then removing all results which are not for the latest version.

-- Get foids of features modified by a project.

DELETE from TEMPFOIDS;

insert into TEMPFOIDS (foid)

(SELECT foid FROM table

   (p_project_manager.GETPROJECTVECTORFEATURES(:project_id, :productversion_id)));

 

-- Of those features, find features with feature certification status = "Accepted"

select to_char(foid) internal_foid, FoidNumberToString(foid) display_foid, objectclass acronym,

   attributecertification, repcertification

from TMP_VP_FEATURE_VERSION_INFO

WHERE productversion_id = :productversion_id

and attributecertification = 'Accepted'

and state = 'Latest Version';

Tasks: createaddreptousagetask

P_HPDSOURCEAPI.createaddreptousagetask has been removed. Use P_SAVE_MANAGER.AddTask instead. The project id parameter has been removed, but all other parameters are the same.

Instead of:

DECLARE

   v_project_id      CONSTANT PROJECT.PJ_ID%TYPE := 1;

   v_task_id         tasks.task_id%TYPE;

BEGIN

   P_SAVE_MANAGER.STARTNEWSAVE(v_project_id);

   v_task_id := p_hpdsourceapi.createaddreptousagetask (v_project_id, 'add representations to usages');

END;

Use:

DECLARE

   v_project_id      CONSTANT PROJECT.PJ_ID%TYPE := 1;

   v_task_id         tasks.task_id%TYPE;

BEGIN

   -- Create a new 'save'. All edits are done under the specified project

   -- until a commit or rollback. Tasks belong to a 'save'.

   P_SAVE_MANAGER.StartNewSave(v_project_id);

   v_task_id := P_SAVE_MANAGER.AddTask('add representations to usages');

END;

VALID_CERTIFICATION_STATUS

The view VALID_CERTIFICATION_STATUS was removed. The various APIs that set or return certification now list the possible certifications. For example, p_hpdSourceAPI.SetRepresentationCertification lists all certifications as valid, while p_hpdConfig.SET_UPDATE_PCE_FROM_SRC_CERT only allows Verified and Under Construction.