Skip to content

Commit

Permalink
Preparation for the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrkioraskari committed Oct 1, 2020
1 parent d96a1f6 commit 42dc568
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected void conversion(String target_file, boolean hasBuildingElements, boole
addBoundingBox(spo, guid_space);
spo.addProperty(RDF.type, LBD_NS.BOT.space);


Optional<Boolean> isExternal=Optional.empty();
IfcOWLUtils.listPropertysets(space.asResource(), ifcOWL).stream().map(rn -> rn.asResource()).forEach(propertyset -> {
PropertySet p_set = this.propertysets.get(propertyset.getURI());
if (p_set != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;

import org.apache.jena.rdf.model.Literal;
Expand Down Expand Up @@ -212,4 +213,22 @@ private void addUnit(Resource lbd_resource, String pname) {
}
}
}

public Optional<Boolean> isExternal()
{

RDFNode val=this.mapPnameValue.get("isExternal");

if(val==null)
return Optional.empty();
else
{
if(!val.isLiteral())
return Optional.empty();
if(val.asLiteral().getString().toLowerCase().contains("true"))
return Optional.of(true);
else
return Optional.of(false);
}
}
}

0 comments on commit 42dc568

Please sign in to comment.