org.apache.jena.atlas.json.JsonArray Java Examples

The following examples show how to use org.apache.jena.atlas.json.JsonArray. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CutClustering.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Float");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "0.5");
    obj1.put("minValue", "0.1");
    obj1.put("maxValue", "0.95");
    obj1.put("stepValue", "0.05");
    obj1.put("description", getParameterDescription(0));

    JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Float");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "0.3");
    obj2.put("minValue", "0.1");
    obj2.put("maxValue", "0.95");
    obj2.put("stepValue", "0.05");
    obj2.put("description", getParameterDescription(1));

    JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #2
Source File: SuffixArraysBlocking.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "6");
    obj1.put("minValue", "2");
    obj1.put("maxValue", "6");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Integer");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "53");
    obj2.put("minValue", "2");
    obj2.put("maxValue", "100");
    obj2.put("stepValue", "1");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #3
Source File: ExtendedQGramsBlocking.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "6");
    obj1.put("minValue", "2");
    obj1.put("maxValue", "6");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Float");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "0.95");
    obj2.put("minValue", "0.8");
    obj2.put("maxValue", "0.95");
    obj2.put("stepValue", "0.05");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #4
Source File: ExtendedSuffixArraysBlocking.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "6");
    obj1.put("minValue", "2");
    obj1.put("maxValue", "6");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Integer");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "39");
    obj2.put("minValue", "2");
    obj2.put("maxValue", "100");
    obj2.put("stepValue", "1");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #5
Source File: LSHSuperBitBlocking.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "5");
    obj1.put("minValue", "2");
    obj1.put("maxValue", "10");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Integer");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "30");
    obj2.put("minValue", "10");
    obj2.put("maxValue", "100");
    obj2.put("stepValue", "10");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #6
Source File: AbstractHashBasedPrioritization.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "10000");
    obj1.put("minValue", "1000");
    obj1.put("maxValue", "1000000");
    obj1.put("stepValue", "1000");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "org.scify.jedai.utilities.enumerations.WeightingScheme");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "org.scify.jedai.utilities.enumerations.WeightingScheme.JS");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #7
Source File: GlobalProgressiveSortedNeighborhood.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "10000");
    obj1.put("minValue", "1000");
    obj1.put("maxValue", "1000000");
    obj1.put("stepValue", "1000");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Integer");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "5");
    obj1.put("minValue", "1");
    obj1.put("maxValue", "10");
    obj1.put("stepValue", "1");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #8
Source File: AbstractCharacterBasedJoin.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj = new JsonObject();
    obj.put("class", "java.lang.Integer");
    obj.put("name", getParameterName(0));
    obj.put("defaultValue", "3");
    obj.put("minValue", "1");
    obj.put("maxValue", "10");
    obj.put("stepValue", "1");
    obj.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj);

    return array;
}
 
Example #9
Source File: AbstractTokenBasedJoin.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj = new JsonObject();
    obj.put("class", "java.lang.Float");
    obj.put("name", getParameterName(0));
    obj.put("defaultValue", "0.8");
    obj.put("minValue", "0.025");
    obj.put("maxValue", "1.0");
    obj.put("stepValue", "0.025");
    obj.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj);

    return array;
}
 
Example #10
Source File: EntityXMLreader.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.String");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "-");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.util.Set<String>");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "-");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #11
Source File: EntityJSONRDFReader.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.String");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "-");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.util.Set<String>");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "-");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #12
Source File: EntityRDFReader.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.String");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "-");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.util.Set<String>");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "-");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #13
Source File: EntityHDTRDFReader.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.String");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "-");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.util.Set<String>");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "-");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #14
Source File: SizeBasedBlockPurging.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj = new JsonObject();
    obj.put("class", "java.lang.Float");
    obj.put("name", getParameterName(0));
    obj.put("defaultValue", "0.005");
    obj.put("minValue", "0.001");
    obj.put("maxValue", "0.200");
    obj.put("stepValue", "0.005");
    obj.put("description", getParameterDescription(0));
    
    final JsonArray array = new JsonArray();
    array.add(obj);
    
    return array;
}
 
Example #15
Source File: BlockFiltering.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj = new JsonObject();
    obj.put("class", "java.lang.Float");
    obj.put("name", getParameterName(0));
    obj.put("defaultValue", "0.8");
    obj.put("minValue", "0.025");
    obj.put("maxValue", "1.0");
    obj.put("stepValue", "0.025");
    obj.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj);

    return array;
}
 
Example #16
Source File: ComparisonsBasedBlockPurging.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj = new JsonObject();
    obj.put("class", "java.lang.Float");
    obj.put("name", getParameterName(0));
    obj.put("defaultValue", "1.0");
    obj.put("minValue", "1.0");
    obj.put("maxValue", "2.0");
    obj.put("stepValue", "0.01");
    obj.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj);

    return array;
}
 
Example #17
Source File: AbstractAttributeClustering.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "org.scify.jedai.utilities.enumerations.RepresentationModel");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "org.scify.jedai.utilities.enumerations.RepresentationModel.TOKEN_UNIGRAM_GRAPHS");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "org.scify.jedai.utilities.enumerations.SimilarityMetric");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "org.scify.jedai.utilities.enumerations.SimilarityMetric.GRAPH_VALUE_SIMILARITY");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #18
Source File: ExtendedCanopyClustering.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "10");
    obj1.put("minValue", "1");
    obj1.put("maxValue", "20");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Integer");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "1");
    obj2.put("minValue", "1");
    obj2.put("maxValue", "10");
    obj2.put("stepValue", "1");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #19
Source File: ProfileMatcher.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "org.scify.jedai.utilities.enumerations.RepresentationModel");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "org.scify.jedai.utilities.enumerations.RepresentationModel.CHARACTER_FOURGRAMS_TF_IDF");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "org.scify.jedai.utilities.enumerations.SimilarityMetric");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "org.scify.jedai.utilities.enumerations.SimilarityMetric.COSINE_SIMILARITY");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #20
Source File: CanopyClustering.java    From JedAIToolkit with Apache License 2.0 6 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.float");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "0.5");
    obj1.put("minValue", "0.1");
    obj1.put("maxValue", "0.9");
    obj1.put("stepValue", "0.05");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.float");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "0.75");
    obj2.put("minValue", "0.2");
    obj2.put("maxValue", "0.95");
    obj2.put("stepValue", "0.05");
    obj2.put("description", getParameterDescription(1));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    return array;
}
 
Example #21
Source File: DeltaLinkHTTP.java    From rdf-delta with Apache License 2.0 5 votes vote down vote up
@Override
public List<Id> listDatasets() {
    JsonObject obj = rpc(DeltaConst.OP_LIST_DS, emptyObject);
    JsonArray array = obj.get(DeltaConst.F_ARRAY).getAsArray();
    List<Id> x = array.stream()
        .map(jv->Id.fromString(jv.getAsString().value()))
        .collect(Collectors.toList()) ;
    return x ;
}
 
Example #22
Source File: ExtendedSortedNeighborhoodBlocking.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "2");
    obj1.put("minValue", "2");
    obj1.put("maxValue", "10");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    return array;
}
 
Example #23
Source File: AbstractEntityClustering.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Float");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "0.1");
    obj1.put("minValue", "0.1");
    obj1.put("maxValue", "0.95");
    obj1.put("stepValue", "0.05");
    obj1.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    return array;
}
 
Example #24
Source File: SortedNeighborhoodBlocking.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "4");
    obj1.put("minValue", "2");
    obj1.put("maxValue", "100");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    return array;
}
 
Example #25
Source File: GtDblpRdfAcmCsvReader.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.String");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "-");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Boolean");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "false");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonObject obj3 = new JsonObject();
    obj3.put("class", "java.lang.Character");
    obj3.put("name", getParameterName(2));
    obj3.put("defaultValue", ",");
    obj3.put("minValue", "-");
    obj3.put("maxValue", "-");
    obj3.put("stepValue", "-");
    obj3.put("description", getParameterDescription(2));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    array.add(obj3);
    return array;
}
 
Example #26
Source File: GroupLinkage.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "org.scify.jedai.utilities.enumerations.RepresentationModel");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "org.scify.jedai.utilities.enumerations.RepresentationModel.TOKEN_UNIGRAM_GRAPHS");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "org.scify.jedai.utilities.enumerations.SimilarityMetric");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "org.scify.jedai.utilities.enumerations.SimilarityMetric.GRAPH_VALUE_SIMILARITY");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonObject obj3 = new JsonObject();
    obj3.put("class", "java.lang.Float");
    obj3.put("name", getParameterName(2));
    obj3.put("defaultValue", "0.5");
    obj3.put("minValue", "0.1");
    obj3.put("maxValue", "0.95");
    obj3.put("stepValue", "0.05");
    obj3.put("description", getParameterDescription(2));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    array.add(obj3);
    return array;
}
 
Example #27
Source File: QGramsBlocking.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "6");
    obj1.put("minValue", "2");
    obj1.put("maxValue", "6");
    obj1.put("stepValue", "1");
    obj1.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    return array;
}
 
Example #28
Source File: GtRdfCsvReader.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.String");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "-");
    obj1.put("minValue", "-");
    obj1.put("maxValue", "-");
    obj1.put("stepValue", "-");
    obj1.put("description", getParameterDescription(0));

    final JsonObject obj2 = new JsonObject();
    obj2.put("class", "java.lang.Boolean");
    obj2.put("name", getParameterName(1));
    obj2.put("defaultValue", "false");
    obj2.put("minValue", "-");
    obj2.put("maxValue", "-");
    obj2.put("stepValue", "-");
    obj2.put("description", getParameterDescription(1));

    final JsonObject obj3 = new JsonObject();
    obj3.put("class", "java.lang.Character");
    obj3.put("name", getParameterName(2));
    obj3.put("defaultValue", ",");
    obj3.put("minValue", "-");
    obj3.put("maxValue", "-");
    obj3.put("stepValue", "-");
    obj3.put("description", getParameterDescription(2));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    array.add(obj2);
    array.add(obj3);
    return array;
}
 
Example #29
Source File: DeltaBackupServer.java    From rdf-delta with Apache License 2.0 5 votes vote down vote up
private void parseConf(BackupConfig cfg, String cfgFile) {
    try {
        JsonObject obj = JSON.read(cfgFile);
        cfg.port = obj.get(jPort).getAsNumber().value().intValue();
        JsonArray a = obj.get(jLogs).getAsArray();
        a.forEach(elt-> {
            BackupArea area = parseLogObject(cfg, elt);
            cfg.logs.add(area);
        });
    } catch (Exception ex) {
        throw new CmdException("Failed to process configuration file: "+ex.getMessage());
    }
}
 
Example #30
Source File: LocalProgressiveSortedNeighborhood.java    From JedAIToolkit with Apache License 2.0 5 votes vote down vote up
@Override
public JsonArray getParameterConfiguration() {
    final JsonObject obj1 = new JsonObject();
    obj1.put("class", "java.lang.Integer");
    obj1.put("name", getParameterName(0));
    obj1.put("defaultValue", "10000");
    obj1.put("minValue", "1000");
    obj1.put("maxValue", "1000000");
    obj1.put("stepValue", "1000");
    obj1.put("description", getParameterDescription(0));

    final JsonArray array = new JsonArray();
    array.add(obj1);
    return array;
}