Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

pipeExist-method #27

@retog

Description

@retog

Currently in SourcingAdmin:

private boolean pipeExists(UriRef pipeRef) {
    boolean result = false;

    if (pipeRef != null) {
        GraphNode pipeNode = new GraphNode(pipeRef, getDlcGraph());
        if(pipeNode != null) {
            result = true;
        }
    }

    return result;

}

This is the same as:

private boolean pipeExists(UriRef pipeRef) {
   return pipreRef != null;
}

But probably what you want is something like

private boolean pipeExists(UriRef pipeRef) {
    boolean result = false;        
    if (pipeRef != null) {
        GraphNode pipeNode = new GraphNode(pipeRef, getDlcGraph());
        result = pipeNode.hasProperty(RDF.type, Ontology.Pipe);
    }
    return result;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions