-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declarative wrapping #96
base: main
Are you sure you want to change the base?
Conversation
5028aff
to
b48bd55
Compare
b48bd55
to
ac9290c
Compare
cda15ab
to
f446a96
Compare
f446a96
to
f15dd4d
Compare
At the moment, in the rdf-wrapping-java/declarative/test/src/main/java/com/inrupt/rdf/wrapping/declarative/test/X.java Lines 27 to 35 in f15dd4d
the following three implementation classes are generated during compilation in
package com.inrupt.rdf.wrapping.declarative.test;
import javax.annotation.processing.Generated;
import org.apache.jena.sparql.core.DatasetGraph;
import org.apache.jena.sparql.core.DatasetImpl;
/**
* Warning this class consists of generated code.
*/
@Generated(value = "com.inrupt.rdf.wrapping.declarative.processor.Processor", date = "2023-08-06T15:55:50.076240700Z")
public class X_$impl extends DatasetImpl implements com.inrupt.rdf.wrapping.declarative.test.X {
protected X_$impl(final DatasetGraph original) {
super(original);
}
}
package com.inrupt.rdf.wrapping.declarative.test;
import javax.annotation.processing.Generated;
import org.apache.jena.graph.Graph;
import org.apache.jena.rdf.model.impl.ModelCom;
/**
* Warning this class consists of generated code.
*/
@Generated(value = "com.inrupt.rdf.wrapping.declarative.processor.Processor", date = "2023-08-06T15:55:50.076240700Z")
public class X$Y_$impl extends ModelCom implements com.inrupt.rdf.wrapping.declarative.test.X.Y {
protected X$Y_$impl(final Graph original) {
super(original);
}
}
package com.inrupt.rdf.wrapping.declarative.test;
import com.inrupt.rdf.wrapping.jena.UriOrBlankFactory;
import com.inrupt.rdf.wrapping.jena.WrapperResource;
import javax.annotation.processing.Generated;
import org.apache.jena.enhanced.EnhGraph;
import org.apache.jena.enhanced.Implementation;
import org.apache.jena.graph.Node;
/**
* Warning this class consists of generated code.
*/
@Generated(value = "com.inrupt.rdf.wrapping.declarative.processor.Processor", date = "2023-08-06T15:55:50.076240700Z")
public class X$Y$Z_$impl extends WrapperResource implements com.inrupt.rdf.wrapping.declarative.test.X.Y.Z {
static final Implementation factory = new UriOrBlankFactory(X$Y$Z_$impl::new);
protected X$Y$Z_$impl(final Node node, final EnhGraph graph) {
super(node, graph);
}
} |
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package com.inrupt.rdf.wrapping.declarative.annotations; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: package names in java are generally singular. For annotations, both Jackson and JSON-B use just annotation
for their annotation libraries. So I would change annotations
to just annotation
.
Also, I would probably remove the declarative
qualifier in the name, so just com.inrupt.rdf.wrapping.annotation
Have now added Generating with JDeparser instead of string manipultaion, which is lovely. It's how JBoss Logging Tools generate their implementations. |
Rename predicate so it's easier in default case. Also simplify validation tests.
# Conflicts: # pom.xml
Graphs from other packages can access it
To minimize clashes
Towards annotation-based declarative wrapping inspired by @acoburn.