@Override public boolean getDefaultBoolean() { return needDefaultStatement().getBoolean(); }
private boolean allLiteralsStructured(Resource config) { Statement check = config.getProperty(ELDA_API.allLiteralsStructured); return check == null ? false : check.getBoolean(); }
private boolean isCheckingRoundTrip(Resource config) { Statement check = config.getProperty(ELDA_API.checkJSONLDRoundTrip); return check == null ? false : check.getBoolean(); }
private static boolean configPlaceEarly(Resource endpoint, boolean placeEarly) { Statement b = endpoint.getProperty( ELDA_API.textPlaceEarly ); return b == null ? placeEarly : b.getBoolean(); }
private void disableDefaultMetadata(Resource root) { List<Statement> dd = root.listProperties(ELDA_API.disable_default_metadata).toList(); for (Statement d: dd) { boolean disable = d.getBoolean(); disableDefaultMetadata = disable; } }
/** * Answer true if this option is set to true, either on the command line * or in the config model * * @return boolean */ protected boolean isTrue( List<String> cmdLineArgs, Resource confRoot ) { if (cmdLineArgs.contains( m_cmdLineForm )) { return true; } if (confRoot.hasProperty( m_prop )) { return confRoot.getRequiredProperty( m_prop ).getBoolean(); } return false; }
private static boolean getJSONUseISOFormatting(Resource r) { return (r.hasProperty( ELDA_API.jsonUsesISOdate ) ? r.getProperty( ELDA_API.jsonUsesISOdate ).getBoolean() : false); }
public static boolean parseAskResult(final String resultURI) throws FileNotFoundException { if( resultURI.endsWith( "srx" ) ) { return XMLInput.booleanFromXML( new FileInputStream( resultURI.substring( 5 ) ) ); } else if( resultURI.endsWith( "ttl" ) || resultURI.endsWith( "rdf" ) ) { return FileManager .get() .loadModel( resultURI.substring( 5 ) ) .getProperty( null, ResourceFactory .createProperty( "http://www.w3.org/2001/sw/DataAccess/tests/result-set#boolean" ) ) .getBoolean(); } else { throw new RuntimeException( "Unknown format." ); } }
@Override public boolean getBoolean(int index) { checkIndex(index); return getRequiredProperty(RDF.li(index)).getBoolean(); }
protected boolean enableETags( Resource ep ) { Statement s = ep.getProperty(ELDA_API.enableETags); if (s == null) s = specForEndpoint(ep).getProperty(ELDA_API.enableETags); return s != null && s.getBoolean(); }
protected void createPropertyRecord( String name, Resource res ) { String uri = res.getURI(); ContextPropertyInfo prop = uriToProp.get(uri); if (prop == null) { prop = new ContextPropertyInfo(uri, name); uriToProp.put(uri, prop); } if (res.hasProperty( RDF.type, API.Multivalued)) prop.setMultivalued(true); if (res.hasProperty( API.multiValued )) prop.setMultivalued( res.getProperty( API.multiValued ).getBoolean() ); if (res.hasProperty( API.structured ) ) prop.setStructured( res.getProperty( API.structured ).getBoolean() ); if (res.hasProperty( RDF.type, API.Hidden)) prop.setHidden(true); if (res.hasProperty( RDF.type, OWL.ObjectProperty )) prop.setType(OWL.Thing.getURI()); if (res.hasProperty( RDFS.range ) && prop.getType() == null) prop.setType( getStringValue(res, RDFS.range) ); }
setCacheModels( s.getBoolean() ); setProcessImports( s.getBoolean() );