/** * Defines the requirement for an instance that is defined in the knowledge base. * @param label: A human-readable label that describes the required static property. * @param supportedOntologyProperties: All RDF properties any instance in the knowledge base must provide. Use * {@link org.streampipes.sdk.helpers.OntologyProperties} to assign supported properties. * @return */ public BU requiredOntologyConcept(Label label, SupportedProperty... supportedOntologyProperties) { DomainStaticProperty dsp = prepareStaticProperty(label, new DomainStaticProperty()); dsp.setSupportedProperties(Arrays.asList(supportedOntologyProperties)); this.staticProperties.add(dsp); return me(); }
/** * * @param label: A human-readable label that describes the required static property. * @param requiredConceptUri: Limits the search for matching instance in the knowledge base to an instance of this * concept. * @param supportedOntologyProperties: All RDF properties any instance of the provided concept must provide. Use * {@link org.streampipes.sdk.helpers.OntologyProperties} to assign supported properties. * @return */ public BU requiredOntologyConcept(Label label, String requiredConceptUri, SupportedProperty... supportedOntologyProperties) { DomainStaticProperty dsp = prepareStaticProperty(label, new DomainStaticProperty()); dsp.setSupportedProperties(Arrays.asList(supportedOntologyProperties)); dsp.setRequiredClass(requiredConceptUri); this.staticProperties.add(dsp); return me(); }
public StaticProperty staticProperty(StaticProperty o) { if (o instanceof FreeTextStaticProperty) { return new FreeTextStaticProperty((FreeTextStaticProperty) o); } else if (o instanceof OneOfStaticProperty) { return new OneOfStaticProperty((OneOfStaticProperty) o); } else if (o instanceof RemoteOneOfStaticProperty) { return new RemoteOneOfStaticProperty((RemoteOneOfStaticProperty) o); } else if (o instanceof MappingPropertyNary) { return new MappingPropertyNary((MappingPropertyNary) o); } else if (o instanceof DomainStaticProperty) { return new DomainStaticProperty((DomainStaticProperty) o); } else if (o instanceof AnyStaticProperty) { return new AnyStaticProperty((AnyStaticProperty) o); } else if (o instanceof CollectionStaticProperty) { return new CollectionStaticProperty((CollectionStaticProperty) o); } else if (o instanceof MatchingStaticProperty) { return new MatchingStaticProperty((MatchingStaticProperty) o); } else if (o instanceof RuntimeResolvableOneOfStaticProperty) { return new RuntimeResolvableOneOfStaticProperty((RuntimeResolvableOneOfStaticProperty) o); } else if (o instanceof RuntimeResolvableAnyStaticProperty) { return new RuntimeResolvableAnyStaticProperty((RuntimeResolvableAnyStaticProperty) o); } else { return new MappingPropertyUnary((MappingPropertyUnary) o); } }