-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update README.md * Updated Javadoc references * Mlplan/bugfix/twophasehasco/wrongassert optimal solution (#128) * Modified logging behavior of MCCV, commented out incorrect assert * Removed .travis_push_javadoc.sh * Updated dependency specification examples in readme * Updated ML-Plan readme * removed unnessary files from ML-Plan top level * Update README.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Configured the projects correctly for mvn repository. (#129) * Configured the projects correctly for mvn repository. Moved resources to resource folder. Relaxed python version check. Included searchgraph stylesheet via resources. * Added empty default values for ossrhUsername and ossrhPassword * Removed signs from travis builds * Added intteruptible meka and weka via maven central. * Fixed typos in build.gradle files. * Configured the projects correctly for mvn repository. Moved resources to resource folder. Relaxed python version check. Included searchgraph stylesheet via resources. * Added empty default values for ossrhUsername and ossrhPassword * Removed signs from travis builds * Added intteruptible meka and weka via maven central. * Fixed typos in build.gradle files. * Renaming search packages. Fix for some resource loading issues. Fix for some logging issues. Fix for some search space configurations. * Update readme.md * Update README.md * modified travis.yml and removed settings.gradle from ML-Plan
- Loading branch information
Showing
355 changed files
with
12,152 additions
and
15,870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
JAICore/jaicore-basic/resources/ai/libs/jaicore/basic/testrsc/dummy2.resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Lorem ipsum dolor sit amet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
.../jaicore-basic/src/main/java/ai/libs/jaicore/basic/LoadResourceAsFileFailedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package ai.libs.jaicore.basic; | ||
|
||
public class LoadResourceAsFileFailedException extends RuntimeException { | ||
|
||
public LoadResourceAsFileFailedException(final String msg) { | ||
super(msg); | ||
} | ||
|
||
public LoadResourceAsFileFailedException(final String msg, final Throwable cause) { | ||
super(msg, cause); | ||
} | ||
|
||
} |
76 changes: 76 additions & 0 deletions
76
JAICore/jaicore-basic/src/main/java/ai/libs/jaicore/basic/ResourceFile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.io.File; | ||
import java.io.InputStream; | ||
import java.util.LinkedList; | ||
import java.util.List; | ||
|
||
import ai.libs.jaicore.basic.sets.SetUtil; | ||
|
||
public class ResourceFile extends File { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = -404232145050366072L; | ||
private final String pathName; | ||
|
||
public ResourceFile(final String pathname) { | ||
super(pathname); | ||
this.pathName = pathname; | ||
} | ||
|
||
public ResourceFile(final ResourceFile baseFile, final String pathname) { | ||
super(getPathName(baseFile, pathname)); | ||
this.pathName = getPathName(baseFile, pathname); | ||
} | ||
|
||
private static String getPathName(final ResourceFile baseFile, final String pathName) { | ||
List<String> pathConstruct = new LinkedList<>(); | ||
List<String> concatPaths = new LinkedList<>(); | ||
|
||
concatPaths.addAll(SetUtil.explode(baseFile.getPathName(), "/")); | ||
concatPaths.addAll(SetUtil.explode(pathName, "/")); | ||
|
||
for (String pathElement : concatPaths) { | ||
if (pathElement.equals(".")) { | ||
continue; | ||
} else if (pathElement.equals("..")) { | ||
if (pathConstruct.isEmpty()) { | ||
throw new IllegalArgumentException("Cannot construct path from " + baseFile.getPathName() + " and " + pathName); | ||
} else { | ||
pathConstruct.remove(pathConstruct.size() - 1); | ||
} | ||
} else { | ||
pathConstruct.add(pathElement); | ||
} | ||
} | ||
|
||
return SetUtil.implode(pathConstruct, "/"); | ||
} | ||
|
||
public InputStream getInputStream() { | ||
return this.getClass().getClassLoader().getResourceAsStream(this.pathName); | ||
} | ||
|
||
public final String getPathName() { | ||
return this.pathName; | ||
} | ||
|
||
@Override | ||
public final ResourceFile getParentFile() { | ||
List<String> stringList = SetUtil.explode(this.pathName, "/"); | ||
if (stringList.size() >= 1) { | ||
stringList.remove(stringList.size() - 1); | ||
return new ResourceFile(SetUtil.implode(stringList, "/")); | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
@Override | ||
public boolean exists() { | ||
return true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.