public com.sap.psr.vulas.shared.json.model.LibraryId toSharedType() { return new com.sap.psr.vulas.shared.json.model.LibraryId(this.mvnGroup, this.artifact, this.version); } }
public Artifact(String _g,String _a,String _v) { super(); libId = new LibraryId(_g,_a,_v); }
public void setLibsSameBytecodeAsString(String[] libsSameBytecode) { if (this.libsSameBytecode == null) this.libsSameBytecode= new ArrayList<LibraryId>(); for(int i=0;i<libsSameBytecode.length;i++){ String[] l = libsSameBytecode[i].split(":"); this.libsSameBytecode.add(new LibraryId(l[0],l[1],l[2])); } }
if(type!=null){ LibraryId current = new LibraryId(splitLine[2], splitLine[3], splitLine[4]); if(bytecodes.containsKey(splitLine[0].concat(splitLine[1]))){ ConstructBytecodeASTManager mgr = bytecodes.get(splitLine[0].concat(splitLine[1])); LibraryId current = new LibraryId(splitLine[2], splitLine[3], splitLine[4]); if(bytecodes.containsKey(splitLine[0].concat(splitLine[1]))){ ConstructBytecodeASTManager mgr = bytecodes.get(splitLine[0].concat(splitLine[1]));
lib.setLibraryId(new LibraryId(a.getGroupId(), a.getArtifactId(), a.getVersion()));
/** * Returns a {@link Library} representing the analyzed archive. * @return * @throws FileAnalysisException */ public Library getLibrary() throws FileAnalysisException { Library lib = null; if(this.fileAnalyzer!=null && this.fileAnalyzer instanceof PythonArchiveAnalyzer) { lib = ((PythonArchiveAnalyzer)this.fileAnalyzer).getLibrary(); lib.setLibraryId(new LibraryId(this.getName(), this.getName(), this.getVersion())); } else { lib = new Library(); lib.setDigest(this.getDigest()); lib.setDigestAlgorithm(DigestAlgorithm.MD5); lib.setLibraryId(new LibraryId(this.getName(), this.getName(), this.getVersion())); if(this.getConstructs()!=null) lib.setConstructs(ConstructId.getSharedType(this.getConstructs().keySet())); } final Set<Property> p = new HashSet<Property>(); for(String key: this.getProperties().keySet()) { p.add(new Property(PropertySource.PIP, key, this.getProperties().get(key))); } lib.setProperties(p); return lib; }