Package org.apache.stanbol.enhancer.rdfentities

Examples of org.apache.stanbol.enhancer.rdfentities.Rdf


            interfaceSet.add(clazz);
            getSuperInterfaces(clazz, interfaceSet);
        }
        this.interfaces = Collections.unmodifiableSet(interfaceSet); //nobody should be able to change this!
        for (Class<?> clazz : this.interfaces){
            Rdf classAnnotation = clazz.getAnnotation(Rdf.class);
            if(classAnnotation == null){
            } else { //check of the type statement is present
                UriRef typeRef = new UriRef(classAnnotation.id());
                if(!nodeTypes.contains(typeRef)){
                    //TODO: Question: How to get the dependencies for logging working with maven :(
                    //log.debug("add type "+typeRef+" for interface "+clazz+" to node "+rdfNode);
                    addValue(Properties.RDF_TYPE, typeRef); //add the missing type!
                } else {
View Full Code Here


        }
        //implement toString
        if(method.equals(toString)){
            return "Proxy for Node "+rdfNode+" and interfaces "+interfaces;
        }
        Rdf rdf = method.getAnnotation(Rdf.class);
        if(rdf == null){
            throw new IllegalStateException("Invoked Method does not have an Rdf annotation!");
        }
        UriRef property;
        if(rdf.id().startsWith("http://") || rdf.id().startsWith("urn:")){
            property = new UriRef(rdf.id());
        } else {
            throw new IllegalStateException("The id=\""+rdf.id()+"\"provided by the rdf annotation is not an valid URI");
        }
        //check for Write (Setter) Method
        if(method.getReturnType().equals(void.class)){
            Type[] parameterTypes = method.getGenericParameterTypes();
            //check the parameter types to improve error messages!
View Full Code Here

TOP

Related Classes of org.apache.stanbol.enhancer.rdfentities.Rdf

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.