Class ModelLoaderBase

    • Constructor Detail

      • ModelLoaderBase

        public ModelLoaderBase​(IRIFactory iriFactory)
    • Method Detail

      • getPredicateIriValue

        protected org.eclipse.rdf4j.model.IRI getPredicateIriValue​(org.eclipse.rdf4j.model.Model model,
                                                                   org.eclipse.rdf4j.model.IRI subject,
                                                                   org.eclipse.rdf4j.model.IRI predicate)
      • processContentRectProperty

        protected boolean processContentRectProperty​(org.eclipse.rdf4j.repository.RepositoryConnection con,
                                                     org.eclipse.rdf4j.model.IRI pred,
                                                     org.eclipse.rdf4j.model.Value value,
                                                     DefaultTreeContentRect<?> rect)
        Applies common ContentRect properties to a target rect.
        Parameters:
        con - repository connection used to load additional triples
        pred - the property predicate
        value - the property value
        rect - the target rect
        Returns:
        true when the property was applied, false when it was ignored
      • processStyleProperty

        protected boolean processStyleProperty​(org.eclipse.rdf4j.model.IRI pred,
                                               org.eclipse.rdf4j.model.Value value,
                                               ModelLoaderBase.RDFTextStyle style)
        Applies common text style properties to a target style.
        Parameters:
        pred - the property predicate
        value - the property value
        style - the target rect style
        Returns:
        true when the property was applied, false when it was ignored
      • createBorder

        protected Border createBorder​(org.eclipse.rdf4j.repository.RepositoryConnection con,
                                      org.eclipse.rdf4j.model.IRI borderIri)
      • createAttribute

        protected Map.Entry<String,​String> createAttribute​(org.eclipse.rdf4j.repository.RepositoryConnection con,
                                                                 org.eclipse.rdf4j.model.IRI attrIri)
      • createBounds

        protected Rectangular createBounds​(org.eclipse.rdf4j.repository.RepositoryConnection con,
                                           org.eclipse.rdf4j.model.IRI boundsIri)
      • getSourcePageIri

        protected org.eclipse.rdf4j.model.IRI getSourcePageIri​(org.eclipse.rdf4j.model.Model model,
                                                               org.eclipse.rdf4j.model.IRI areaTreeIri)
        Finds the source page IRI in the page model
        Parameters:
        model - The page model
        areaTreeIri - area tree IRI
        Returns:
        the source page IRI or null when not defined
      • getSourcePage

        protected RDFPage getSourcePage​(org.eclipse.rdf4j.model.IRI pageIri,
                                        ArtifactRepository repo)
        Loads the source page artifact of the area tree.
        Parameters:
        pageIri - the source page IRI
        repo - the repository used for loading the page artifact.
        Returns:
        the page artifact or null when not specified or not found
      • getSourceAreaTreeIri

        protected org.eclipse.rdf4j.model.IRI getSourceAreaTreeIri​(org.eclipse.rdf4j.model.Model model,
                                                                   org.eclipse.rdf4j.model.IRI logicalTreeIri)
        Finds the source page IRI in the page model
        Parameters:
        model - The page model
        logicalTreeIri - logical area tree IRI
        Returns:
        the source page IRI or null when not defined
      • getSourceAreaTree

        protected RDFAreaTree getSourceAreaTree​(org.eclipse.rdf4j.model.IRI areaTreeIri,
                                                ArtifactRepository repo)
        Loads the source area tree artifact of this area tree.
        Parameters:
        areaTreeIri - the source page IRI
        repo - the repository used for loading the page artifact.
        Returns:
        the page artifact or null when not specified or not found
      • loadTags

        protected void loadTags​(RDFArtifactRepository repo)
        Loads available tags from a RDF repository.
        Parameters:
        repo - the repository to use as the tag source
      • getTag

        protected Tag getTag​(org.eclipse.rdf4j.model.IRI tagIri)
        Gets an instance of a tag defined in the repository.
        Parameters:
        tagIri - the IRI of the tag
        Returns:
        a tag defined for the IRI or a "x" type tag the tag is not defined
      • getDataPropertyUnion

        protected String getDataPropertyUnion​(String[] dataObjectProperties)
        Creates SPAQRL union for the given data properties.
        Parameters:
        dataObjectProperties -
        Returns:
      • execArtifactReadQuery

        protected org.eclipse.rdf4j.model.Model execArtifactReadQuery​(RDFArtifactRepository artifactRepo,
                                                                      String query)
      • getPropertyValue

        public org.eclipse.rdf4j.model.Value getPropertyValue​(org.eclipse.rdf4j.repository.RepositoryConnection con,
                                                              org.eclipse.rdf4j.model.Resource subject,
                                                              org.eclipse.rdf4j.model.IRI predicate)
                                                       throws StorageException
        Throws:
        StorageException
      • checkChildOrderValues

        protected <T extends GenericTreeNode<T>> void checkChildOrderValues​(GenericTreeNode<T> root)
        Checks that each child area has a document order assigned and that the children are ordered by the assigned order.
        Type Parameters:
        T -
        Parameters:
        root -