Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
tirthmehta authored Aug 14, 2017
1 parent ac2ae5c commit 7a56ddc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions src/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
20 changes: 15 additions & 5 deletions src/Mapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -799,6 +801,8 @@ public String transformWINGSElaboratedTemplateToOPMW(String template,String mode
HashSet<String> hsi=new HashSet<>();
HashSet<String> hso=new HashSet<>();
Resource nodenew11=null;
if(rnew2==null)
System.out.println("rnew2 is null here only");
while(rnew2.hasNext())
{
QuerySolution qsnew = rnew2.next();
Expand Down Expand Up @@ -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)))
Expand All @@ -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;
Expand Down Expand Up @@ -1205,7 +1208,7 @@ else if(namesOfAbstractCompswithSameNames.size()!=0)
}
}

}

}


Expand Down Expand Up @@ -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<String,String> hsprops=new HashMap<>();
Expand Down

0 comments on commit 7a56ddc

Please sign in to comment.