diff --git a/src/Constants.java b/src/Constants.java index f0f7e9e..1dab894 100644 --- a/src/Constants.java +++ b/src/Constants.java @@ -30,7 +30,7 @@ public class Constants { /***** COMPONENT CLASS AND ITS RELATIONS *****/ - public static final String COMPONENT_HAS_SUPERCLASS_FOLDER=PREFIX_COMPONENT+"hasFolder"; + public static final String COMPONENT_HAS_SUPERCLASS_FOLDER=PREFIX_COMPONENT+"hasFolder|SuperComponent"; public static final String COMPONENT_HAS_INPUT=PREFIX_COMPONENT+"hasInput"; public static final String COMPONENT_HAS_OUTPUT=PREFIX_COMPONENT+"hasOutput"; public static final String COMPONENT_HAS_LOCATION=PREFIX_COMPONENT+"hasLocation"; diff --git a/src/Main.java b/src/Main.java index 4093b1d..801be90 100644 --- a/src/Main.java +++ b/src/Main.java @@ -25,8 +25,8 @@ public static void main(String[] args) { String taxonomy_export="/Users/Tirthmehta/Desktop/TestingDomain1/Component/TestingDomain_TaxonomyHierarchyModel.owl"; // /Users/Tirthmehta/Documents/workspace/WINGS_PROVENANCE_EXPORT_SCENARIOS/LOCAL_FOLDER_COMPONENT_CATALOGS_OF_DIFFERENT_DOMAINS/Testing.owl - //String ans=instance.transformWINGSElaboratedTemplateToOPMW(template, mode, outFile, null,taxonomy_export,mode2); - String ans=instance.transformWINGSResultsToOPMW(execution, lib, mode, outFileOPMW, outFilePROV, null,data_catalog,mode2); + String ans=instance.transformWINGSElaboratedTemplateToOPMW(template, mode, outFile, null,taxonomy_export,mode2); + //String ans=instance.transformWINGSResultsToOPMW(execution, lib, mode, outFileOPMW, outFilePROV, null,data_catalog,mode2); System.out.println("--------------------------"); System.out.println("location is :"+ans); diff --git a/src/Mapper.java b/src/Mapper.java index f2211fc..d45a08d 100644 --- a/src/Mapper.java +++ b/src/Mapper.java @@ -636,8 +636,10 @@ public String transformWINGSElaboratedTemplateToOPMW(String template,String mode System.out.println("x is null"); } + + - if(concreteness!=null && concreteness.equals("true")) + if(concreteness!=null && concreteness.equals("true") && !AbstractSuperClass.getLocalName().equals("Component")) { hs1Concr.add(concrComponent.getLocalName().substring(0,concrComponent.getLocalName().length()-5)); hs2Abs.remove(AbstractSuperClass.getLocalName().substring(0,AbstractSuperClass.getLocalName().length()-5)); @@ -799,6 +801,8 @@ public String transformWINGSElaboratedTemplateToOPMW(String template,String mode HashSet hsi=new HashSet<>(); HashSet hso=new HashSet<>(); Resource nodenew11=null; + if(rnew2==null) + System.out.println("rnew2 is null here only"); while(rnew2.hasNext()) { QuerySolution qsnew = rnew2.next(); @@ -827,7 +831,7 @@ public String transformWINGSElaboratedTemplateToOPMW(String template,String mode */ - if(hs2Abs.contains(className) || hs2Abs.contains(className.substring(0,className.length()-5))) + if(hs2Abs.contains(className) || hs2Abs.contains(className.substring(0,className.length()-5)) && nodenew11!=null) { boolean specialFolder=false; if(specialCaseforFolders.contains(className) || specialCaseforFolders.contains(className.substring(0,className.length()-5))) @@ -836,8 +840,7 @@ public String transformWINGSElaboratedTemplateToOPMW(String template,String mode specialFolder=true; } System.out.println("ABSTRACT PART HEREEE: "+nodenew11.getLocalName()); - if(hs2Abs.contains(nodenew11.getLocalName())) - { + System.out.println("NOW UR INSIDE ABSTRACT COMPONENT CASE"); String taxonomyModelforAbstractComponent = Queries.TaxonomyExportQueryforSubclassCheckfinal(NEW_TAXONOMY_CLASS); ResultSet r2new = null; @@ -1205,7 +1208,7 @@ else if(namesOfAbstractCompswithSameNames.size()!=0) } } - } + } @@ -3592,7 +3595,14 @@ public String transformWINGSResultsToOPMW(String resultFile, String libraryFile, sb.append(x); // System.out.println("file is "+sb.toString()); System.out.println("hashed file version is "+MD5(sb.toString())); + try{ currentMD5=MD5(sb.toString()); + } + catch(Exception e) + { + System.out.println("Hashing is not possible for file size and hence we will not version it"); + continue; + } }catch(Exception e){} HashMap hsprops=new HashMap<>();